diff --git a/README.md b/README.md index aac6f0d..89f295a 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,10 @@ events ### Device compatibility -| Product name | Device name | -|-----------------------|-------------------------| -| Lenovo Miix 320-10icr | `lenovo-miix-320-10icr` | +| Product name | Device name | Notes | +|---------------------------------------|-------------------------|----------------------------------------------| +| Lenovo Miix 320-10icr | `lenovo-miix-320-10icr` | | +| Samsung Chromebook Pro XE510C24-K01US | `google-caroline` | Thanks to nothingneko/@jaiden@ordinary.cafe! | ## Using fcitx hooks diff --git a/daemon/device_information.h b/daemon/device_information.h index c2b73c4..91dec98 100644 --- a/daemon/device_information.h +++ b/daemon/device_information.h @@ -33,6 +33,8 @@ static struct device_information DEVICE_INFORMATION_GENERIC = { static struct device_information DEVICE_INFOS[] = { { + // Lenovo Miix 320-10icr + // https://support.lenovo.com/us/en/solutions/pd104871-product-overview-miix-320-10icr .device_name = "lenovo-miix-320-10icr", .screen_rotation_supported = true, .target_output = "DSI-1", @@ -48,4 +50,22 @@ static struct device_information DEVICE_INFOS[] = { .basestation_vendor_id = 0x048d, .basestation_product_id = 0x8911, }, + { + // Samsung Chromebook Pro + // https://www.samsung.com/us/computing/chromebooks/12-14/samsung-chromebook-pro-xe510c24-k01us/ + .device_name = "google-caroline", + .screen_rotation_supported = true, + .target_output = "eDP-1", + .target_motion_sensor = "/sys/bus/iio/devices/iio:device1", + .sensor_to_output_rotation = + { + [ACCEL_ROTATION_0DEG] = WL_OUTPUT_TRANSFORM_NORAML, + [ACCEL_ROTATION_90DEG] = WL_OUTPUT_TRANSFORM_270, + [ACCEL_ROTATION_180DEG] = WL_OUTPUT_TRANSFORM_180, + [ACCEL_ROTATION_270DEG] = WL_OUTPUT_TRANSFORM_90, + }, + .basestation_detection_supported = false, + .basestation_vendor_id = 0, + .basestation_product_id = 0, + }, };