Share your custom widgets #396
nikth0
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Hi @nikitathomas342! I converted your issue into a discussion as it is more exchange about the project than an issue. On my end I'm simply using 2 custom widgets:
Slacksimple-bar configurationslack.zshSTATUS_LABEL=$(lsappinfo info -only StatusLabel "Slack")
if [[ $STATUS_LABEL =~ \"label\"=\"([^\"]*)\" ]]; then
LABEL="${BASH_REMATCH[1]}"
COUNT=""
if [[ $LABEL == "" ]]; then
COUNT="-"
elif [[ $LABEL == "•" ]]; then
COUNT=$LABEL
elif [[ $LABEL =~ ^[0-9]+$ ]]; then
COUNT="$LABEL"
fi
echo "$COUNT"
else
echo "-"
fi OutputI got this script from the Sketchy Bar github discussion section and I adapted it to suits my needs. SSH key switchI'm not exposing this script here but this is a simple script that toggle the content of my |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just as the name suggests. I'm interested to see how you guys create your own widgets. Let's share
Beta Was this translation helpful? Give feedback.
All reactions