rofi-light: rofi-based pop up for changing backlight brightness
authorAmin Bandali <amin@aminb.org>
Mon, 1 Jan 2018 04:25:42 +0000 (23:25 -0500)
committerAmin Bandali <amin@aminb.org>
Mon, 1 Jan 2018 04:27:53 +0000 (23:27 -0500)
Requires light (light-git on AUR) and rofi

P.S. Happy New Year :)

sxhkd/.config/sxhkd/sxhkdrc
sxhkd/.local/bin/rofi-light [new file with mode: 0755]

index 6fe437c..fc2d4c1 100644 (file)
@@ -68,6 +68,9 @@ XF86LaunchB
 #XF86MonBrightness{Up,Down}
 #      light -{A,U} 5
 
+super + apostrophe
+       rofi-light
+
 # keyboard brightness
 #XF86KbdBrightness{Up,Down}
 #      kbdlight {up,down}
diff --git a/sxhkd/.local/bin/rofi-light b/sxhkd/.local/bin/rofi-light
new file mode 100755 (executable)
index 0000000..96b0126
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cur=$(light -G)
+val=$(rofi -dmenu -mesg "light    $cur" -p "light -S " -l 0 -width 8)
+light -S $val