Added screen brightness to dwmblocks
This commit is contained in:
parent
6437278329
commit
88e708fa55
2 changed files with 13 additions and 0 deletions
|
@ -7,6 +7,8 @@ static const Block blocks[] = {
|
|||
|
||||
{"", "$HOME/.config/suckless/dwmblocks/scripts/battery", 1, 1},
|
||||
|
||||
{"", "$HOME/.config/suckless/dwmblocks/scripts/brightness", 1, 1},
|
||||
|
||||
{"", "$HOME/.config/suckless/dwmblocks/scripts/volume", 1, 1},
|
||||
|
||||
{"", "$HOME/.config/suckless/dwmblocks/scripts/clock", 5, 0},
|
||||
|
|
11
user/.config/suckless/dwmblocks/scripts/brightness
Executable file
11
user/.config/suckless/dwmblocks/scripts/brightness
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
brt=$(xbacklight -get)
|
||||
if [ "$brt" = "100.000000" ]; then
|
||||
icon=🔆
|
||||
elif [ "$brt" \> "50%.*" ]; then
|
||||
icon=🔆
|
||||
elif [ "$brt" \< "49%.*" ]; then
|
||||
icon=🔅
|
||||
fi
|
||||
echo " $icon ${brt%.*}% "
|
Loading…
Reference in a new issue