Skip to content

Commit

Permalink
update github notifications after clicking on one
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixKratz committed Oct 25, 2023
1 parent 08c2db1 commit 8f96b87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .config/sketchybar/items/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ github_template=(
icon.background.y_offset=-12
)

sketchybar --add item github.bell right \
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 \
github.update \
\
--add item github.template popup.github.bell \
--set github.template "${github_template[@]}"
4 changes: 2 additions & 2 deletions .config/sketchybar/plugins/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ update() {
position=popup.github.bell
icon.background.color=$COLOR
drawing=on
click_script="open \"$URL\"; sketchybar --set github.bell popup.drawing=off"
click_script="open \"$URL\"; sketchybar --set github.bell popup.drawing=off; sleep 5; sketchybar --trigger github.update"
)

args+=(--clone github.notification.$COUNTER github.template \
Expand All @@ -79,7 +79,7 @@ popup() {
}

case "$SENDER" in
"routine"|"forced") update
"routine"|"forced"|"github.update") update
;;
"mouse.entered") popup on
;;
Expand Down

0 comments on commit 8f96b87

Please sign in to comment.