aboutsummaryrefslogtreecommitdiff
path: root/status-linux
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-09-02 07:28:29 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-09-02 07:28:29 +0200
commitd24b871c47826eace3d7f6c642aaffdd01fe6ebe (patch)
tree996981952eb80a22ecefa483277045a0fa11698f /status-linux
parent61c59a6c1f356ed23983ad8625d199e4338f1f4d (diff)
downloadscripts-d24b871c47826eace3d7f6c642aaffdd01fe6ebe.tar.gz
scripts-d24b871c47826eace3d7f6c642aaffdd01fe6ebe.zip
Some small changes
Diffstat (limited to 'status-linux')
-rwxr-xr-xstatus-linux6
1 files changed, 3 insertions, 3 deletions
diff --git a/status-linux b/status-linux
index d881228..4f91dfe 100755
--- a/status-linux
+++ b/status-linux
@@ -16,13 +16,13 @@ date=$(date +"%a %d %b")
16if [ "$(pulsemixer --get-mute)" -eq 1 ]; then 16if [ "$(pulsemixer --get-mute)" -eq 1 ]; then
17 volume="Muted" 17 volume="Muted"
18else 18else
19 volume="Vol: $(pulsemixer --get-volume | awk '{print $1}')%" 19 volume="Vol $(pulsemixer --get-volume | awk '{print $1}')%"
20fi 20fi
21 21
22bat="/sys/class/power_supply/BAT0" 22bat="/sys/class/power_supply/BAT0"
23if [ -d $bat ]; then 23if [ -d $bat ]; then
24 charge_status="$(cat $bat/status | awk '{print substr ($0, 0, 2)}')" 24 charge_status="$(cat $bat/status | awk '{print substr ($0, 0, 2)}')"
25 battery="Bat: $(cat $bat/capacity)% $charge_status" 25 battery="Bat $(cat $bat/capacity)% $charge_status"
26else 26else
27 battery="No battery" 27 battery="No battery"
28fi 28fi
@@ -41,5 +41,5 @@ noticount=$(notify show | wc -l)
41 41
42printf '%s' "$network$sep$volume$sep$battery$sep$date$sep$time" 42printf '%s' "$network$sep$volume$sep$battery$sep$date$sep$time"
43[ "$noticount" = "1" ] && printf '%s' "$sep$(notify show)" 43[ "$noticount" = "1" ] && printf '%s' "$sep$(notify show)"
44[ "$noticount" -gt "1" ] && printf '%s' "${sep} [$noticount]" 44[ "$noticount" -gt "1" ] && printf '%s' "${sep}[$noticount]"
45printf '\n' 45printf '\n'

Generated with cgit - Back to sebastiano.tronto.net