Added events for title change

This commit is contained in:
Federico Rossi 2023-11-19 08:26:06 +01:00
parent 9c416de308
commit 514628270b
2 changed files with 15 additions and 6 deletions

View file

@ -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.."

View file

@ -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