From 514628270b0e74e745f10664a385bd9294e966c9 Mon Sep 17 00:00:00 2001 From: Federico Rossi Date: Sun, 19 Nov 2023 08:26:06 +0100 Subject: [PATCH] Added events for title change --- .yabairc | 13 ++++++++++--- sketchybar/sketchybarrc | 8 +++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.yabairc b/.yabairc index 9bb15e1..3d756c3 100755 --- a/.yabairc +++ b/.yabairc @@ -13,7 +13,7 @@ sudo yabai --load-sa #open -a dmenu-mac # global settings yabai -m config \ - mouse_follows_focus on \ + mouse_follows_focus off \ focus_follows_mouse autoraise \ window_origin_display default \ window_placement second_child \ @@ -29,7 +29,7 @@ yabai -m config \ split_ratio 0.50 \ split_type auto \ auto_balance off \ - top_padding 5 \ + top_padding 10 \ bottom_padding 15 \ left_padding 15 \ right_padding 15 \ @@ -40,7 +40,14 @@ yabai -m config \ mouse_action2 resize \ mouse_drop_action swap \ -yabai -m config external_bar all:32:0 +yabai -m config external_bar all:28:28 borders active_color=0xff9fa7cf inactive_color=0xff494d64 width=5.0 2>/dev/null 1>&2 & +sketchybar & +bottom_bar & + +yabai -m signal --add event=window_focused action="sketchybar --trigger window_focus" +yabai -m signal --add event=window_title_changed action="sketchybar --trigger title_change" + + echo "yabai configuration loaded.." diff --git a/sketchybar/sketchybarrc b/sketchybar/sketchybarrc index 7c2948d..93507ab 100755 --- a/sketchybar/sketchybarrc +++ b/sketchybar/sketchybarrc @@ -17,8 +17,10 @@ sketchybar --bar height=28 \ sticky=off \ padding_left=10 \ padding_right=10 \ - color=0x15ffffff - + color=0x15ffffff \ + --add event window_focus \ + --add event title_change + ##### Changing Defaults ##### # We now change some default values that are applied to all further items # For a full list of all available item properties see: @@ -48,7 +50,7 @@ sketchybar --default icon.font="Hack Nerd Font:Bold:17.0" \ sketchybar --add item window_handler left \ --set window_handler script="$PLUGIN_DIR/windows.py" \ icon.drawing=off \ - --subscribe window_handler front_app_switched space_windows_change space_change display_change + --subscribe window_handler front_app_switched space_windows_change space_change display_change title_change window_focus