mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-27 13:50:33 +00:00
11 lines
305 B
Bash
Executable file
11 lines
305 B
Bash
Executable file
#!/usr/bin/env bash
|
|
RUNNING=$(osascript -e 'if application "Mail" is running then return 0')
|
|
COUNT=0
|
|
|
|
if [ $RUNNING == 0 ]; then
|
|
COUNT=$(osascript -e 'tell application "Mail" to return the unread count of inbox')
|
|
sketchybar -m --set $NAME label="$COUNT"
|
|
else
|
|
sketchybar -m --set $NAME label=
|
|
fi
|
|
|