summaryrefslogtreecommitdiff
path: root/mac/.config/sketchybar.yabai/items/github.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mac/.config/sketchybar.yabai/items/github.sh')
-rwxr-xr-xmac/.config/sketchybar.yabai/items/github.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/mac/.config/sketchybar.yabai/items/github.sh b/mac/.config/sketchybar.yabai/items/github.sh
new file mode 100755
index 0000000..1a27fd5
--- /dev/null
+++ b/mac/.config/sketchybar.yabai/items/github.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+POPUP_CLICK_SCRIPT="sketchybar --set \$NAME popup.drawing=toggle"
+
+github_bell=(
+ padding_right=-5
+ update_freq=180
+ icon=$BELL
+ icon.font="$FONT:Bold:15.0"
+ icon.color=$BLUE
+ label=$LOADING
+ label.highlight_color=$BLUE
+ popup.align=right
+ script="$PLUGIN_DIR/github.sh"
+ click_script="$POPUP_CLICK_SCRIPT"
+)
+
+github_template=(
+ drawing=off
+ background.corner_radius=12
+ padding_left=7
+ padding_right=7
+ icon.background.height=2
+ icon.background.y_offset=-12
+)
+
+sketchybar --add event github.update \
+ --add item github.bell right \
+ --set github.bell "${github_bell[@]}" \
+ --subscribe github.bell mouse.entered \
+ mouse.exited \
+ mouse.exited.global \
+ system_woke \
+ github.update \
+ \
+ --add item github.template popup.github.bell \
+ --set github.template "${github_template[@]}"