Last active
July 16, 2017 02:29
-
-
Save yshui/7218e0ca03e47519f856ec3f3fd34b98 to your computer and use it in GitHub Desktop.
Key bindings with deai
This file contains hidden or 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
| xc = di.xorg.connect() | |
| o = get_output("eDP1") | |
| xc.key.new(nil, "xf86monbrightnessup", false).on("pressed", function() | |
| o.backlight = math.min(math.ceil(o.backlight+o.max_backlight/10),o.max_backlight) | |
| print("up", o.backlight) | |
| end) | |
| xc.key.new(nil, "xf86monbrightnessdown", false).on("pressed", function() | |
| o.backlight = math.max(math.floor(o.backlight-o.max_backlight/10),0) | |
| print("down",o.backlight) | |
| end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment