diff options
Diffstat (limited to 'spectrwm')
-rwxr-xr-x | spectrwm/.config/spectrwm/statusbar | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spectrwm/.config/spectrwm/statusbar b/spectrwm/.config/spectrwm/statusbar index 5f6918c..01e1223 100755 --- a/spectrwm/.config/spectrwm/statusbar +++ b/spectrwm/.config/spectrwm/statusbar | |||
@@ -7,7 +7,12 @@ vol(){ | |||
7 | 7 | ||
8 | bat() { | 8 | bat() { |
9 | power=$(cat /sys/class/power_supply/BAT0/capacity) | 9 | power=$(cat /sys/class/power_supply/BAT0/capacity) |
10 | echo -e "+@fg=1;bat+@fg=0; $power% " | 10 | status=$(cat /sys/class/power_supply/BAT0/status) |
11 | if [ "$status" == "Charging" ]; then | ||
12 | echo -e "+@fg=1;bat+@fg=0; +$power% " | ||
13 | elif [ "$status" == "Discharging" ]; then | ||
14 | echo -e "+@fg=1;bat+@fg=0; -$power% " | ||
15 | fi | ||
11 | } | 16 | } |
12 | 17 | ||
13 | dte() { | 18 | dte() { |