Tiny fixes.
This commit is contained in:
parent
a97f5d52ad
commit
e91baa3ae5
@ -385,7 +385,7 @@ label = %percentage_used%%
|
||||
[module/updates-arch]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/polybar-scripts/polybar-scripts/updates-arch/updates-arch.sh
|
||||
format-prefix = " "
|
||||
format-prefix = "ﮮ "
|
||||
format-prefix-foreground = ${colors.bright_green}
|
||||
;format-underline = ${colors.light3}
|
||||
interval = 600
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
STATUSURL=https://obelisk.ilabt.imec.be/api/v2/status
|
||||
STATUS=$(curl -s $STATUSURL | jq -r '.status')
|
||||
STATUS=$(curl -s $STATUSURL | jq -r '.status' 2>/dev/null)
|
||||
|
||||
# colors
|
||||
HEALTHY="#b8bb26"
|
||||
@ -10,7 +10,11 @@ UNKNOWN="#928374"
|
||||
|
||||
# echo the status in polybar format
|
||||
# the {F}x{F-} syntax allows you to color stuff
|
||||
if [ $STATUS = "healthy" ]; then
|
||||
# could have failed completely (network down etc)
|
||||
if [ -z $STATUS ]; then
|
||||
echo "%{F$UNKNOWN} %{F-} obelisk"
|
||||
# expected statuses, healthy, degraded, failed
|
||||
elif [ $STATUS = "healthy" ]; then
|
||||
echo "%{F$HEALTHY} %{F-} obelisk"
|
||||
elif [ $STATUS = "degraded" ]; then
|
||||
echo "%{F$DEGRADED} %{F-} obelisk"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user