Compare commits
No commits in common. "f25a84d4e3aeabf64c7d6de01be5627be7604052" and "f56ac10f6a11f57d1db6c78fd9d61e75708356a2" have entirely different histories.
f25a84d4e3
...
f56ac10f6a
@ -103,7 +103,7 @@ bottom = false
|
||||
;border-right-size = 16
|
||||
;unused modules - mpd xbacklight backlight-acpi alsa
|
||||
modules-left = i3
|
||||
modules-center = temperature battery xkeyboard memory cpu filesystem updates-arch reboot-check xbacklight top-process mail-status
|
||||
modules-center = temperature battery xkeyboard memory cpu filesystem updates-pacman reboot-check xbacklight top-process obelisk-status
|
||||
modules-right = net wifi0 vpn powermenu
|
||||
|
||||
; TRAY MANAGEMENT
|
||||
@ -159,12 +159,6 @@ exec = ~/scripts/obelisk.status.sh
|
||||
tail = false
|
||||
interval = 10
|
||||
|
||||
[module/mail-status]
|
||||
type = custom/script
|
||||
exec = ~/scripts/mail.status.sh
|
||||
tail = false
|
||||
interval = 10
|
||||
|
||||
[module/top-process]
|
||||
type = custom/script
|
||||
format-prefix = " "
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
STATUSURL=https://mail.nielandt.be
|
||||
STATUS=$(curl -s -I $STATUSURL 2>/dev/null | head -n 1 | cut -d$' ' -f2)
|
||||
|
||||
# colors
|
||||
HEALTHY="#b8bb26"
|
||||
DEGRADED="#fe8019"
|
||||
FAILED="#fb4934"
|
||||
UNKNOWN="#928374"
|
||||
|
||||
# echo the status in polybar format
|
||||
# the {F}x{F-} syntax allows you to color stuff
|
||||
# could have failed completely (network down etc)
|
||||
# -z tests for empty string
|
||||
if [ -z $STATUS ]; then
|
||||
echo "%{F$FAILED} %{F-}"
|
||||
# expected statuses, healthy, degraded, failed
|
||||
elif [ $STATUS = "200" ]; then
|
||||
echo "%{F$HEALTHY} %{F-}"
|
||||
#elif [ $STATUS = "degraded" ]; then
|
||||
# echo "%{F$DEGRADED} %{F-}"
|
||||
#elif [ $STATUS = "failed" ]; then
|
||||
# echo "%{F$FAILED} %{F-}"
|
||||
else
|
||||
echo "%{F$FAILED} %{F-}"
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user