Browse Source

Added error handling to mail syncing notification on polybar

ansible
Micah Halter 4 months ago
parent
commit
8d2eed6d63

+ 1
- 1
offlineimap/.config/systemd/user/offlineimap-oneshot.service.d/override.conf View File

@@ -1,4 +1,4 @@
1 1
 [Service]
2 2
 Environment=DISPLAY=:0
3 3
 ExecStartPre=polybar-msg hook mail 2
4
-ExecStop=polybar-msg hook mail 1
4
+ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" = 0 ]; then polybar-msg hook mail 1; else polybar-msg hook mail 3; fi'

+ 1
- 0
polybar/.config/polybar/config View File

@@ -140,6 +140,7 @@ format-prefix = " "
140 140
 format-prefix-foreground = ${colors.foreground-alt}
141 141
 hook-0 = /home/micah/.config/polybar/scripts/mail
142 142
 hook-1 = echo -e '\u21bb'
143
+hook-2 = echo -e '\ue0ae'
143 144
 initial = 1
144 145
 
145 146
 [module/backup]

Loading…
Cancel
Save