aboutsummaryrefslogtreecommitdiff
path: root/status
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-06-19 08:25:41 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-06-19 08:25:41 +0200
commitdc98cba24cb5f1f3e260c49fc61add4a113a1df0 (patch)
tree2f5b996f57a2e332884849e7d29fdadf5c698382 /status
parentaf05c6c366ce928818848a3d8c897e7c52ae9d0f (diff)
downloadscripts-dc98cba24cb5f1f3e260c49fc61add4a113a1df0.tar.gz
scripts-dc98cba24cb5f1f3e260c49fc61add4a113a1df0.zip
Update to status (now I use a statusbar)
Diffstat (limited to 'status')
-rwxr-xr-xstatus10
1 files changed, 8 insertions, 2 deletions
diff --git a/status b/status
index 7a2825f..10b43f9 100755
--- a/status
+++ b/status
@@ -10,9 +10,15 @@
10 10
11sep=${1:-" | "} 11sep=${1:-" | "}
12 12
13time=$(date +"%H:%M:%S") 13time=$(date +"%H:%M")
14date=$(date +"%d %B %Y, %A") 14date=$(date +"%d %B %Y, %A")
15 15
16if [ "$(pulsemixer --get-mute)" -eq 1 ]; then
17 volume="Audio muted"
18else
19 volume="Volume: $(pulsemixer --get-volume | awk '{print $1}')%%"
20fi
21
16bat="/sys/class/power_supply/BAT0" 22bat="/sys/class/power_supply/BAT0"
17if [ -d $bat ]; then 23if [ -d $bat ]; then
18 battery="Battery: $(cat $bat/capacity)%% $(cat $bat/status)" 24 battery="Battery: $(cat $bat/capacity)%% $(cat $bat/status)"
@@ -28,6 +34,6 @@ network="Network: $(nmcli device status | head -n 2 | tail -n 1 | sed 's/ *$//'
28 34
29events=$(sdep-list past | wc -l) 35events=$(sdep-list past | wc -l)
30 36
31printf "$time$sep$date$sep$battery$sep$network" 37printf "$network$sep$volume$sep$battery$sep$date$sep$time"
32[ "$events" != "0" ] && printf "$sep$events TODO task(s)" 38[ "$events" != "0" ] && printf "$sep$events TODO task(s)"
33printf "\n" 39printf "\n"

Generated with cgit - Back to sebastiano.tronto.net