1
0
mirror of https://github.com/Dejvino/pinephone-sway-poc.git synced 2024-11-22 05:52:36 +00:00
pinephone-sway-poc/usr/local/bin/swayphone_backlightselect
2021-01-03 11:24:26 +01:00

22 lines
365 B
Bash
Executable File

#!/bin/bash
BACKLIGHT=~/.backlight
usleep 250000 # term stabilization
DEFAULT=$(((`pptk-backlight get_percent`+5)/10*10))
dialog --scrollbar --default-item $DEFAULT --menu Backlight 0 0 10 \
100 FULL \
90 :::: \
80 :::. \
70 ::: \
60 ::. \
50 :: \
40 :. \
30 : \
20 . \
10 MIN \
2>$BACKLIGHT && pptk-backlight set_percent `cat $BACKLIGHT`