Skip to content

Commit 617d574

Browse files
committed
fix: improve uptime status sed script to report correct units for few uptime scenarios
1 parent 1795723 commit 617d574

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

status/uptime.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
set -ogq @catppuccin_uptime_icon "󰔟 "
55
set -ogqF @catppuccin_uptime_color "#{E:@thm_sapphire}"
6-
set -ogq @catppuccin_uptime_text " #(uptime | sed 's/^[^,]*up *//; s/, *[[:digit:]]* user.*//; s/ day.*, */d /; s/:/h /; s/ min//; s/$/m/')"
6+
set -ogq @catppuccin_uptime_text " #(uptime | sed 's/^[^,]*up *//; s/, *[[:digit:]]* user.*//; s/ day.*, */d /; s/ hr\\(s*\\).*/h/; s/ min\\(s*\\).*/m/; s/ sec\\(s*\\).*/s/; s/\\([0-9]\\{1,2\\}\\):\\([0-9]\\{1,2\\}\\)/\\1h \\2m/;')"
77

88
source -F "#{d:current_file}/../utils/status_module.conf"

0 commit comments

Comments
 (0)