From a656c375e9ce53b2074ae5798abd436f5daf8d9b Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Wed, 24 Jun 2020 16:08:07 +0530 Subject: added + & - for bat --- bin/.local/bin/passmenu | 2 +- spectrwm/.config/spectrwm/statusbar | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/.local/bin/passmenu b/bin/.local/bin/passmenu index 9c611a7..1d22303 100755 --- a/bin/.local/bin/passmenu +++ b/bin/.local/bin/passmenu @@ -2,4 +2,4 @@ password=$(find ~/.password-store/ -type f -name '*.gpg' | sed 's/.*\/\(.*\)\.gpg$/\1/' | dmenu -l 5 -p "Pass:") -[ -n "$password" ] && urxvtc -e pass -c "$password" +[ -n "$password" ] && st -e pass -c "$password" 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(){ bat() { power=$(cat /sys/class/power_supply/BAT0/capacity) - echo -e "+@fg=1;bat+@fg=0; $power% " + status=$(cat /sys/class/power_supply/BAT0/status) + if [ "$status" == "Charging" ]; then + echo -e "+@fg=1;bat+@fg=0; +$power% " + elif [ "$status" == "Discharging" ]; then + echo -e "+@fg=1;bat+@fg=0; -$power% " + fi } dte() { -- cgit v1.2.3