diff options
author | Shubham Saini <shubham6405@pm.me> | 2020-06-24 10:38:07 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@pm.me> | 2020-06-24 10:38:07 +0000 |
commit | a656c375e9ce53b2074ae5798abd436f5daf8d9b (patch) | |
tree | 848d56183e0e72fadc8fafad05296accad2bdb58 /spectrwm | |
parent | 362996db066e0c54870cbadec6bb017d1733a180 (diff) |
added + & - for bat
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() { |