i3: Improve backlight performance

This commit is contained in:
Sijmen 2019-02-18 17:38:21 +01:00
parent 3dd9e96ac1
commit 1b487b649f

View file

@ -1,10 +1,10 @@
#!/usr/bin/fish
xbacklight $argv[1..-1]
set brightness (xbacklight -get)
set bar (seq -s "─" 0 (math $brightness / 3) | tr -d '[:digit:]')
set brightness (cat /sys/class/backlight/intel_backlight/brightness)
set bar (seq -s "─" 0 (math $brightness / 36) | tr -d '[:digit:]')
set percentage (printf '%44s%d%%' '' "$brightness")
set percentage (printf '%44s%d%%' '' (math $brightness / 12))
set body "$percentage\n $bar"
set title ' Brightness'