diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
| commit | 07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (patch) | |
| tree | a6818f0d64438c5fdb88b00a35d944f80c056213 /mac/.config/sketchybar/plugins/space.sh | |
| parent | 6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff) | |
updates
Diffstat (limited to 'mac/.config/sketchybar/plugins/space.sh')
| -rw-r--r-- | mac/.config/sketchybar/plugins/space.sh | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/mac/.config/sketchybar/plugins/space.sh b/mac/.config/sketchybar/plugins/space.sh deleted file mode 100644 index 70f3ac4..0000000 --- a/mac/.config/sketchybar/plugins/space.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -source "$CONFIG_DIR/globalstyles.sh" - -if [ "$SELECTED" = "true" ]; then - COLOR=$HIGHLIGHT - OFFSET=-12 # under line - WIDTH="dynamic" -else - COLOR=$TRANSPARENT -fi - -sketchybar --animate tanh 10 \ - --set $NAME icon.highlight=$SELECTED \ - label.highlight=$SELECTED \ - background.color=$COLOR \ - background.y_offset=$OFFSET - -update() { - source "$CONFIG_DIR/colors.sh" - COLOR=$BACKGROUND_2 - WIDTH="dynamic" - - sketchybar --set $NAME icon.highlight=$SELECTED \ - label.highlight=$SELECTED \ - background.border_color=$COLOR \ - sketchybar --animate tanh 8 \ - label.width=$WIDTH \ -} - -set_space_label() { - sketchybar --set $NAME icon="$@" -} - -mouse_clicked() { - if [ "$BUTTON" = "right" ]; then - yabai -m space --destroy $SID - sketchybar --trigger space_change --trigger windows_on_spaces - else - if [ "$MODIFIER" = "shift" ]; then - SPACE_LABEL="$(osascript -e "return (text returned of (display dialog \"Give a name to space $NAME:\" default answer \"\" with icon note buttons {\"Cancel\", \"Continue\"} default button \"Continue\"))")" - if [ $? -eq 0 ]; then - if [ "$SPACE_LABEL" = "" ]; then - set_space_label "${NAME:6}" - else - set_space_label "${NAME:6} ($SPACE_LABEL)" - fi - fi - else - yabai -m space --focus $SID 2>/dev/null - fi - fi -} - -case "$SENDER" in -"mouse.clicked") - mouse_clicked - ;; -*) - update - ;; -esac |
