Compare commits

..

2 commits

Author SHA1 Message Date
Viyurz
07f846c29e
Waybar pkg updates: recheck for updates every hour. 2024-02-15 15:51:54 +01:00
Viyurz
f576a7224e
Waybar pkg updates: Show latest run time. 2024-02-15 15:50:58 +01:00
2 changed files with 9 additions and 10 deletions

View file

@ -22,8 +22,7 @@
"memory", "memory",
"custom/cpu-temp", "custom/cpu-temp",
"cpu", "cpu",
"clock#date", "clock"
"clock#time"
], ],
"hyprland/workspaces": { "hyprland/workspaces": {
"disable-scroll": true, "disable-scroll": true,
@ -37,7 +36,7 @@
}, },
"custom/pkg-update-count": { "custom/pkg-update-count": {
"exec": "$HOME/.scripts/waybar-pkg-update-count.sh", "exec": "$HOME/.scripts/waybar-pkg-update-count.sh",
"interval": "once", "interval": 3600,
"on-click": "$HOME/.scripts/waybar-pkg-update-count.sh", "on-click": "$HOME/.scripts/waybar-pkg-update-count.sh",
"signal": 3, "signal": 3,
"return-type": "json", "return-type": "json",
@ -213,9 +212,9 @@
"format": " {usage}%", "format": " {usage}%",
"interval": 5 "interval": 5
}, },
"clock#date": { "clock": {
"interval": 1, "interval": 1,
"format": "󰃭 {:%Ex}", "format": "󰥔 {:%e %b %Y - %EX}",
"tooltip-format": "<tt>{calendar}</tt>", "tooltip-format": "<tt>{calendar}</tt>",
"calendar": { "calendar": {
"mode": "month", "mode": "month",
@ -226,10 +225,5 @@
"today": "<span color='#ff6699'><b>{}</b></span>" "today": "<span color='#ff6699'><b>{}</b></span>"
} }
} }
},
"clock#time": {
"interval": 1,
"format": "󰥔 {:%EX}",
"tooltip": false
} }
} }

View file

@ -39,6 +39,11 @@ while [[ $retry_count -le $max_retries && $success -ne 1 ]]; do
done done
# Show time of check
time="$(date '+%H:%M:%S')"
tooltip="$tooltip\nLatest check: $time"
cat << EOF cat << EOF
{"text": "$output", "alt": "$class", "tooltip": "$tooltip", "class": "$class"} {"text": "$output", "alt": "$class", "tooltip": "$tooltip", "class": "$class"}
EOF EOF