summaryrefslogtreecommitdiff
path: root/waybar/uptime
diff options
context:
space:
mode:
authorryukamish <[email protected]>2026-04-11 23:13:59 +0530
committerryukamish <[email protected]>2026-04-11 23:13:59 +0530
commit909a6da9cf342ccc4d1eef0dbdb12b56d211fafe (patch)
tree3a88ca28ff8f5cfc7b24d194ac1a84f6214d0010 /waybar/uptime
parent7486374c3679c85ebf7670c7976e607d1509be1b (diff)
add: visual indicators with uptime module
Diffstat (limited to 'waybar/uptime')
-rwxr-xr-xwaybar/uptime6
1 files changed, 6 insertions, 0 deletions
diff --git a/waybar/uptime b/waybar/uptime
new file mode 100755
index 0000000..d01e388
--- /dev/null
+++ b/waybar/uptime
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+UPTIME_PRETTY=$(uptime -p)
+
+UPTIME_FORMATTED=$(echo "$UPTIME_PRETTY" | sed 's/^up //;s/,*$//;s/minute/M/; s/hour/H/; s/day/D/; s/s//g')
+
+echo "$UPTIME_FORMATTED"