[XMonad] Show current brightness when adjusting with volnoti

This commit is contained in:
Ivan Malison 2017-03-02 15:29:38 -08:00
parent 190c2852e5
commit 95dc5cd777
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/usr/bin/env sh
actual="$(cat /sys/class/backlight/intel_backlight/actual_brightness)"
max="$(cat /sys/class/backlight/intel_backlight/max_brightness)"
temp="$(( $actual * 100 ))"
percentage="$(( $temp/$max ))"
volnoti-show "$percentage"

View File

@ -740,6 +740,9 @@ addKeys conf@XConfig {modMask = modm} =
, ((mod3Mask, xK_w), spawn "set_volume.sh up")
, ((mod3Mask, xK_s), spawn "set_volume.sh down")
, ((0, xF86XK_MonBrightnessUp), spawn "show_brightness.sh")
, ((0, xF86XK_MonBrightnessDown), spawn "show_brightness.sh")
] ++
-- Replace moving bindings