1
0
Fork 0

yabai: upgrade yabai configuration

This commit is contained in:
Daniel Kempkens 2024-03-12 18:26:17 +01:00
parent ef1c8684c3
commit 6c9639f8ce
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -7,7 +7,7 @@ let
window_padding = 5; window_padding = 5;
native-tab-apps = [ "Finder" ]; native-tab-apps = [ "Finder" "TablePlus" ];
unmanaged-apps = [ unmanaged-apps = [
"Dash" "Dash"
@ -71,7 +71,8 @@ in
split_type = "auto"; split_type = "auto";
}; };
extraConfig = (lib.strings.concatMapStringsSep "\n" (app: "yabai -m rule --add app='^${app}$' manage=off") unmanaged-apps) + '' extraConfig = (lib.strings.concatMapStrings (app: "yabai -m rule --add app='^${app}$' manage=off\n") unmanaged-apps) + ''
# Auto-float certain windows
yabai -m signal --add event=window_created action=' yabai -m signal --add event=window_created action='
yabai -m query --windows --window $YABAI_WINDOW_ID | ${jq-bin} -er ".\"can-resize\" or .\"is-floating\"" || \ yabai -m query --windows --window $YABAI_WINDOW_ID | ${jq-bin} -er ".\"can-resize\" or .\"is-floating\"" || \
yabai -m window $YABAI_WINDOW_ID --toggle float yabai -m window $YABAI_WINDOW_ID --toggle float
@ -83,6 +84,7 @@ in
'' + lib.strings.concatMapStrings '' + lib.strings.concatMapStrings
# Hacky workaround for https://github.com/koekeishiya/yabai/issues/68 # Hacky workaround for https://github.com/koekeishiya/yabai/issues/68
(app: '' (app: ''
# Native tab handling for ${app}
yabai -m signal --add event=window_created app="^${app}$" action='${script-native-tab-fix}' yabai -m signal --add event=window_created app="^${app}$" action='${script-native-tab-fix}'
yabai -m signal --add event=window_destroyed app="^${app}$" action='${script-native-tab-fix}' yabai -m signal --add event=window_destroyed app="^${app}$" action='${script-native-tab-fix}'
yabai -m signal --add event=window_moved app="^${app}$" action='${script-native-tab-fix}' yabai -m signal --add event=window_moved app="^${app}$" action='${script-native-tab-fix}'