-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from asus-linux-drivers/display-rotation
- Loading branch information
Showing
5 changed files
with
157 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
from libevdev import EV_KEY | ||
|
||
to_tablet_mode_actions = [ | ||
orientation_bottom_up_actions = [ | ||
"cat /sys/class/leds/asus::kbd_backlight/brightness | sudo tee /tmp/kbd_backlight_brightness", | ||
"echo 0 | sudo tee /sys/class/leds/asus::kbd_backlight/brightness", | ||
"cat /sys/class/leds/input3\:\:capslock/brightness | sudo tee /tmp/input3_capslock_brightness", | ||
"echo 0 | sudo tee /sys/class/leds/input3\:\:capslock/brightness" | ||
] | ||
|
||
to_laptop_mode_actions = [ | ||
"cat /tmp/kbd_backlight_brightness | sudo tee /sys/class/leds/asus::kbd_backlight/brightness", | ||
"cat /tmp/input3_capslock_brightness | sudo tee /sys/class/leds/input3\:\:capslock/brightness" | ||
orientation_left_up_actions = [ | ||
"sudo rm -f /tmp/kbd_backlight_brightness", | ||
"sudo rm -f /tmp/input3_capslock_brightness" | ||
# TODO: enable touchpad (is disabled by default for every rotation probably) | ||
#"xinput set-prop 17 'Device Enabled' 0" | ||
] | ||
|
||
orientation_right_up_actions = [ | ||
"sudo rm -f /tmp/kbd_backlight_brightness", | ||
"sudo rm -f /tmp/input3_capslock_brightness", | ||
# TODO: enable touchpad (is disabled by default for every rotation probably) | ||
] | ||
|
||
orientation_normal_actions = [ | ||
# backward setting up saved backlight brightness (only in case inverted was previous state! otherwise tmp file does not exist) | ||
"test -f /tmp/kbd_backlight_brightness && cat /tmp/kbd_backlight_brightness | sudo tee /sys/class/leds/asus::kbd_backlight/brightness", | ||
# backward setting up saved capslock led (only in case inverted was previous state! otherwise tmp file does not exist) | ||
"test -f /tmp/input3_capslock_brightness && cat /tmp/input3_capslock_brightness | sudo tee /sys/class/leds/input3\:\:capslock/brightness" | ||
] | ||
|
||
flip_key = EV_KEY.KEY_PROG2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.