1
0
mirror of https://github.com/Dejvino/pinephone-sway-poc.git synced 2024-12-22 10:38:50 +00:00
pinephone-sway-poc/usr/local/bin/swayphone_backlightselect

22 lines
365 B
Plaintext
Raw Normal View History

2020-05-31 01:21:22 +00:00
#!/bin/bash
BACKLIGHT=~/.backlight
2020-06-14 08:11:44 +00:00
usleep 250000 # term stabilization
2021-01-03 10:22:50 +00:00
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`
2020-05-31 01:21:22 +00:00