|
|
@ -7,8 +7,7 @@ R="A3:$BRIGHTNESS_CONTROL s 30:" |
|
|
|
U="A4:$BRIGHTNESS_CONTROL u 10:" |
|
|
|
U="A4:$BRIGHTNESS_CONTROL u 10:" |
|
|
|
D="A5:$BRIGHTNESS_CONTROL d 10:" |
|
|
|
D="A5:$BRIGHTNESS_CONTROL d 10:" |
|
|
|
|
|
|
|
|
|
|
|
PERCENTAGE=$(brightnessctl \ |
|
|
|
PERCENTAGE=$($BRIGHTNESS_CONTROL getbrightness) |
|
|
|
| awk '/\([0-9]+%\)/ { print substr($4, 2, length($4) - 3) }') |
|
|
|
|
|
|
|
if [ "$PERCENTAGE" -ge "75" ]; then |
|
|
|
if [ "$PERCENTAGE" -ge "75" ]; then |
|
|
|
ICON="" # f111 |
|
|
|
ICON="" # f111 |
|
|
|
elif [ "$PERCENTAGE" -ge "25" ]; then |
|
|
|
elif [ "$PERCENTAGE" -ge "25" ]; then |
|
|
@ -20,6 +19,6 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
INPUT="%{$R}%{$U}%{$D}" |
|
|
|
INPUT="%{$R}%{$U}%{$D}" |
|
|
|
END="%{A}%{A}%{A}" |
|
|
|
END="%{A}%{A}%{A}" |
|
|
|
PIPE="$($(dirname $0)/lemonbar.sh getpipe)" |
|
|
|
PIPE="$("$(dirname "$0")"/lemonbar.sh getpipe)" |
|
|
|
|
|
|
|
|
|
|
|
printf "%s\n" "brightness$INPUT$ICON $PERCENTAGE%$END" > "$PIPE" & |
|
|
|
printf "%s\n" "brightness$INPUT$ICON $PERCENTAGE%$END" > "$PIPE" & |
|
|
|