aboutsummaryrefslogtreecommitdiff
path: root/status
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-06-19 10:09:47 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-06-19 10:09:47 +0200
commitc5d101ab2c9db3b1a001cb56953cb90b24f8fdcf (patch)
tree1286eccbd051723e443c26b43e739007ee53dc06 /status
parent2c065927ff405b2d8b2eec6fc1fbee9c4f93e0a8 (diff)
downloadscripts-c5d101ab2c9db3b1a001cb56953cb90b24f8fdcf.tar.gz
scripts-c5d101ab2c9db3b1a001cb56953cb90b24f8fdcf.zip
Added notify
Diffstat (limited to 'status')
-rwxr-xr-xstatus10
1 files changed, 6 insertions, 4 deletions
diff --git a/status b/status
index 10b43f9..abd9bad 100755
--- a/status
+++ b/status
@@ -26,14 +26,16 @@ else
26 battery="No battery" 26 battery="No battery"
27fi 27fi
28 28
29#network=$(nmcli device status | head -n 2 | tail -n 1 | awk '{print "Network: " $4}')
30# NetworkManager has a dreadful command line interface 29# NetworkManager has a dreadful command line interface
31# It makes cry every time 30# It makes cry every time
32# pls help 31# pls help
33network="Network: $(nmcli device status | head -n 2 | tail -n 1 | sed 's/ *$//' | sed 's/.* //')" 32nwline="$(nmcli device status | head -n 2 | tail -n 1)"
33nwclean="$(echo "$nwline" | sed 's/ *$//' | sed 's/.* //')"
34network="Network: $nwclean"
34 35
35events=$(sdep-list past | wc -l) 36noticount=$(notify show | wc -l)
36 37
37printf "$network$sep$volume$sep$battery$sep$date$sep$time" 38printf "$network$sep$volume$sep$battery$sep$date$sep$time"
38[ "$events" != "0" ] && printf "$sep$events TODO task(s)" 39[ "$noticount" = "1" ] && printf "$sep$(notify show)"
40[ "$noticount" -gt "1" ] && printf "${sep}Unread notifications: $noticount"
39printf "\n" 41printf "\n"

Generated with cgit - Back to sebastiano.tronto.net