From de80fa4426b4dbbf8896be1d522825768320c77f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 14 Oct 2024 00:44:54 +0100 Subject: Update some scripts and SXHkD config --- Scripts/.local/scripts/status/battery | 7 +++++-- Scripts/.local/scripts/status/connection | 2 +- Scripts/.local/scripts/status/datetime | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'Scripts/.local/scripts/status') diff --git a/Scripts/.local/scripts/status/battery b/Scripts/.local/scripts/status/battery index ccbec38..133a153 100755 --- a/Scripts/.local/scripts/status/battery +++ b/Scripts/.local/scripts/status/battery @@ -5,7 +5,10 @@ status=$(cat /sys/class/power_supply/BAT0/status) if [[ $status == "Charging" ]] then - status="" + echo " $capacity% $time_left" +elif [[ $status == "Not charging" ]] +then + echo " $capacity%" else if [[ $capacity -ge 75 ]] then @@ -23,5 +26,5 @@ else notify-send -u critical "Charge now!" status="" fi + echo "$status $capacity% $time_left" fi -echo "$status $capacity% $time_left" diff --git a/Scripts/.local/scripts/status/connection b/Scripts/.local/scripts/status/connection index f2e6fb4..84f84dc 100755 --- a/Scripts/.local/scripts/status/connection +++ b/Scripts/.local/scripts/status/connection @@ -6,5 +6,5 @@ then con=$(nmcli | grep "connected to" | sed "s/.*: connected to \(.*\)/\1/g") echo "" $con else - echo " Not Connected" + echo "" fi diff --git a/Scripts/.local/scripts/status/datetime b/Scripts/.local/scripts/status/datetime index 2ec0b77..1691f34 100755 --- a/Scripts/.local/scripts/status/datetime +++ b/Scripts/.local/scripts/status/datetime @@ -1,2 +1,2 @@ #!/usr/bin/env bash -echo "⏲ $(date +'%a %d %b %R')" +echo "⏲ $(date +'%a %d/%m %R')" -- cgit v1.2.3-13-gbd6f