forked from colonelpanic/dotfiles
[XMonad] Show current brightness when adjusting with volnoti
This commit is contained in:
parent
190c2852e5
commit
95dc5cd777
9
dotfiles/lib/bin/show_brightness.sh
Executable file
9
dotfiles/lib/bin/show_brightness.sh
Executable 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"
|
@ -740,6 +740,9 @@ addKeys conf@XConfig {modMask = modm} =
|
|||||||
, ((mod3Mask, xK_w), spawn "set_volume.sh up")
|
, ((mod3Mask, xK_w), spawn "set_volume.sh up")
|
||||||
, ((mod3Mask, xK_s), spawn "set_volume.sh down")
|
, ((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
|
-- Replace moving bindings
|
||||||
|
Loading…
Reference in New Issue
Block a user