Updated yabairc
This commit is contained in:
parent
23c8a4d236
commit
c038995ea2
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
## Set PATH
|
||||
PATH="/opt/homebrew/bin:${PATH}"
|
||||
|
||||
## Path to yabai
|
||||
yabai="/usr/local/bin/yabai"
|
||||
yabai
|
||||
|
||||
## Name of yabai bitbar plugin
|
||||
yabai_bitbar_plugin="yabai_enhanced.*?.sh"
|
||||
@ -16,137 +19,137 @@ yabai_bitbar_refresh_cmd="set SHELL=/bin/sh && open -g 'bitbar://refreshPlugin?n
|
||||
yabai_create_spaces_count=$(set -- ${yabai_create_spaces} && echo $#)
|
||||
|
||||
## Get number of existing spaces
|
||||
yabai_spaces=$(${yabai} -m query --spaces | jq length)
|
||||
yabai_spaces=$(yabai -m query --spaces | jq length)
|
||||
|
||||
## Check version of scripting additions
|
||||
yabai_sa=$(${yabai} --check-sa)
|
||||
yabai_sa=$(yabai --check-sa)
|
||||
|
||||
## Install or update scripting additions
|
||||
if ${yabai_sa}; then
|
||||
sudo ${yabai} --uninstall-sa
|
||||
sudo ${yabai} --install-sa
|
||||
sudo yabai --uninstall-sa
|
||||
sudo yabai --install-sa
|
||||
fi
|
||||
|
||||
## Load scripting additions
|
||||
sudo ${yabai} --load-sa ## sudo needed since Big Sur
|
||||
${yabai} -m signal --add event=dock_did_restart action="sudo ${yabai} --load-sa"
|
||||
sudo yabai --load-sa ## sudo needed since Big Sur
|
||||
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
|
||||
|
||||
## Global settings
|
||||
${yabai} -m config mouse_follows_focus off
|
||||
${yabai} -m config focus_follows_mouse off
|
||||
${yabai} -m config window_placement second_child
|
||||
yabai -m config mouse_follows_focus off
|
||||
yabai -m config focus_follows_mouse off
|
||||
yabai -m config window_placement second_child
|
||||
|
||||
${yabai} -m config split_ratio 0.6
|
||||
${yabai} -m config window_shadow float
|
||||
${yabai} -m config mouse_modifier fn
|
||||
${yabai} -m config mouse_action1 move
|
||||
${yabai} -m config mouse_action2 resize
|
||||
yabai -m config split_ratio 0.6
|
||||
yabai -m config window_shadow float
|
||||
yabai -m config mouse_modifier fn
|
||||
yabai -m config mouse_action1 move
|
||||
yabai -m config mouse_action2 resize
|
||||
|
||||
## General space settings
|
||||
${yabai} -m config layout bsp
|
||||
${yabai} -m config top_padding 10
|
||||
${yabai} -m config bottom_padding 10
|
||||
${yabai} -m config left_padding 10
|
||||
${yabai} -m config right_padding 10
|
||||
${yabai} -m config window_gap 10
|
||||
yabai -m config layout bsp
|
||||
yabai -m config top_padding 10
|
||||
yabai -m config bottom_padding 10
|
||||
yabai -m config left_padding 10
|
||||
yabai -m config right_padding 10
|
||||
yabai -m config window_gap 10
|
||||
|
||||
## Specific space settings
|
||||
${yabai} -m space 1 --layout stack
|
||||
yabai -m space 1 --layout stack
|
||||
|
||||
# Yabai-Spaces for BitBar
|
||||
${yabai} -m signal --add event=space_changed action="${yabai_bitbar_refresh_cmd}"
|
||||
${yabai} -m signal --add event=display_added action="${yabai_bitbar_refresh_cmd}"
|
||||
${yabai} -m signal --add event=display_removed action="${yabai_bitbar_refresh_cmd}"
|
||||
${yabai} -m signal --add event=display_changed action="${yabai_bitbar_refresh_cmd}"
|
||||
${yabai} -m signal --add event=display_moved action="${yabai_bitbar_refresh_cmd}"
|
||||
yabai -m signal --add event=space_changed action="${yabai_bitbar_refresh_cmd}"
|
||||
yabai -m signal --add event=display_added action="${yabai_bitbar_refresh_cmd}"
|
||||
yabai -m signal --add event=display_removed action="${yabai_bitbar_refresh_cmd}"
|
||||
yabai -m signal --add event=display_changed action="${yabai_bitbar_refresh_cmd}"
|
||||
yabai -m signal --add event=display_moved action="${yabai_bitbar_refresh_cmd}"
|
||||
|
||||
## Destroy all spaces in reverse order(except of the first one)
|
||||
i=${yabai_spaces}; while [ ${i} -ne 1 ]; do
|
||||
${yabai} -m space ${i} --destroy
|
||||
yabai -m space ${i} --destroy
|
||||
i=$((i-1))
|
||||
done
|
||||
|
||||
## Create spaces and label them
|
||||
i=0; for name in ${yabai_create_spaces}; do
|
||||
i=$((i+1))
|
||||
${yabai} -m space ${i} --label ${name}
|
||||
yabai -m space ${i} --label ${name}
|
||||
|
||||
if [ ${i} -lt ${yabai_create_spaces_count} ]; then
|
||||
${yabai} -m space --create
|
||||
yabai -m space --create
|
||||
fi
|
||||
done
|
||||
|
||||
## Sticky Windows
|
||||
${yabai} -m rule --add app="^Todoist$" sticky=on
|
||||
${yabai} -m rule --add app="^Bitwarden$" sticky=on
|
||||
yabai -m rule --add app="^Todoist$" sticky=on
|
||||
yabai -m rule --add app="^Bitwarden$" sticky=on
|
||||
|
||||
space=Main
|
||||
${yabai} -m rule --add app="^Firefox$" space="${space}"
|
||||
${yabai} -m rule --add app="^Reeder$" space="${space}"
|
||||
yabai -m rule --add app="^Firefox$" space="${space}"
|
||||
yabai -m rule --add app="^Reeder$" space="${space}"
|
||||
|
||||
space=Mail
|
||||
${yabai} -m rule --add app="^Mail$" space="${space}"
|
||||
${yabai} -m rule --add app="^Thunderbird$" space="${space}"
|
||||
yabai -m rule --add app="^Mail$" space="${space}"
|
||||
yabai -m rule --add app="^Thunderbird$" space="${space}"
|
||||
|
||||
space=Messaging
|
||||
${yabai} -m rule --add app="^Threema$" space="${space}"
|
||||
${yabai} -m rule --add app="^WhatsApp$" space="${space}"
|
||||
${yabai} -m rule --add app="^Nachrichten$" space="${space}"
|
||||
yabai -m rule --add app="^Threema$" space="${space}"
|
||||
yabai -m rule --add app="^WhatsApp$" space="${space}"
|
||||
yabai -m rule --add app="^Nachrichten$" space="${space}"
|
||||
|
||||
space=PIM
|
||||
${yabai} -m rule --add app="^Kalender$" space="${space}"
|
||||
${yabai} -m rule --add app="^Fantastical$" space="${space}"
|
||||
${yabai} -m rule --add app="^Kontakte$" space="${space}"
|
||||
yabai -m rule --add app="^Kalender$" space="${space}"
|
||||
yabai -m rule --add app="^Fantastical$" space="${space}"
|
||||
yabai -m rule --add app="^Kontakte$" space="${space}"
|
||||
|
||||
space=Shell
|
||||
${yabai} -m rule --add app="^iTerm2$" space="${space}"
|
||||
${yabai} -m rule --add app="^Terminal$" space="${space}"
|
||||
yabai -m rule --add app="^iTerm2$" space="${space}"
|
||||
yabai -m rule --add app="^Terminal$" space="${space}"
|
||||
|
||||
space=Code
|
||||
${yabai} -m rule --add app="^VSCodium$" space="${space}"
|
||||
${yabai} -m rule --add app="^VSCode$" space="${space}"
|
||||
${yabai} -m rule --add app="^Fork$" space="${space}"
|
||||
yabai -m rule --add app="^VSCodium$" space="${space}"
|
||||
yabai -m rule --add app="^VSCode$" space="${space}"
|
||||
yabai -m rule --add app="^Fork$" space="${space}"
|
||||
|
||||
space=Misc.
|
||||
${yabai} -m rule --add app="^MoneyMoney$" space="${space}"
|
||||
${yabai} -m rule --add app="^YNAB$" space="${space}"
|
||||
${yabai} -m rule --add app="^Portfolio Performance$" space="${space}"
|
||||
${yabai} -m rule --add app="^Affinity .*$" space="${space}"
|
||||
yabai -m rule --add app="^MoneyMoney$" space="${space}"
|
||||
yabai -m rule --add app="^YNAB$" space="${space}"
|
||||
yabai -m rule --add app="^Portfolio Performance$" space="${space}"
|
||||
yabai -m rule --add app="^Affinity .*$" space="${space}"
|
||||
|
||||
## Unmanaged applications
|
||||
${yabai} -m rule --add app="^App Store$" manage=off
|
||||
${yabai} -m rule --add app="^iStat Menus$" manage=off
|
||||
${yabai} -m rule --add app="^Bartender .*$" manage=off
|
||||
${yabai} -m rule --add app="^Rechner$" manage=off
|
||||
${yabai} -m rule --add app="^Numi$" manage=off
|
||||
${yabai} -m rule --add app="Vorschau" manage=off
|
||||
${yabai} -m rule --add app="^System.*einstellungen$" manage=off
|
||||
${yabai} -m rule --add app="^System.*informationen$" manage=off
|
||||
${yabai} -m rule --add app="^Festplatten.*dienstprogramm$" manage=off
|
||||
${yabai} -m rule --add app="^VirtualBox$" manage=off
|
||||
${yabai} -m rule --add app="^nextcloud$" manage=off
|
||||
${yabai} -m rule --add app="^Hazel$" manage=off
|
||||
${yabai} -m rule --add app="^Color Picker$" manage=off
|
||||
${yabai} -m rule --add app="^ColorSlurp$" manage=off
|
||||
${yabai} -m rule --add app="^PrinterProxy$" manage=off
|
||||
${yabai} -m rule --add app="^ExactScan Pro$" manage=off
|
||||
${yabai} -m rule --add app="^coconutBattery$" manage=off
|
||||
${yabai} -m rule --add app="^Arq$" manage=off
|
||||
${yabai} -m rule --add app="^The Unarchiver$" manage=off
|
||||
${yabai} -m rule --add app="^VMware Fusion$" manage=off
|
||||
${yabai} -m rule --add app="^Passepartout$" manage=off
|
||||
yabai -m rule --add app="^App Store$" manage=off
|
||||
yabai -m rule --add app="^iStat Menus$" manage=off
|
||||
yabai -m rule --add app="^Bartender .*$" manage=off
|
||||
yabai -m rule --add app="^Rechner$" manage=off
|
||||
yabai -m rule --add app="^Numi$" manage=off
|
||||
yabai -m rule --add app="^Vorschau$" manage=off
|
||||
yabai -m rule --add app="^System.*einstellungen$" manage=off
|
||||
yabai -m rule --add app="^System.*informationen$" manage=off
|
||||
yabai -m rule --add app="^Festplatten.*dienstprogramm$" manage=off
|
||||
yabai -m rule --add app="^VirtualBox$" manage=off
|
||||
yabai -m rule --add app="^nextcloud$" manage=off
|
||||
yabai -m rule --add app="^Hazel$" manage=off
|
||||
yabai -m rule --add app="^Color Picker$" manage=off
|
||||
yabai -m rule --add app="^ColorSlurp$" manage=off
|
||||
yabai -m rule --add app="^PrinterProxy$" manage=off
|
||||
yabai -m rule --add app="^ExactScan Pro$" manage=off
|
||||
yabai -m rule --add app="^coconutBattery$" manage=off
|
||||
yabai -m rule --add app="^Arq$" manage=off
|
||||
yabai -m rule --add app="^The Unarchiver$" manage=off
|
||||
yabai -m rule --add app="^VMware Fusion$" manage=off
|
||||
yabai -m rule --add app="^Passepartout$" manage=off
|
||||
|
||||
## Unmanaged windows of specific applications
|
||||
${yabai} -m rule --add app="^Alfred Preferences$" manage=off
|
||||
${yabai} -m rule --add app="^Thunderbird$" title="(Nachricht wird gesendet|Aktivitäten|Öffnen von)" manage=off
|
||||
${yabai} -m rule --add app="^MoneyMoney$" title="(Einstellungen)" manage=off
|
||||
${yabai} -m rule --add app="^DBeaver$" title="(Treibereinstellungen|Neue Verbindung anlegen)" manage=off
|
||||
${yabai} -m rule --add app="^Fantastical Helper$" manage=off
|
||||
${yabai} -m rule --add app="^Affinity .*$" title="(Dokument)" manage=off
|
||||
${yabai} -m rule --add app="^Fantastical$" title="(Allgemein|Darstellung|Accounts|Kalender|Erinnerungen|Wetter|Erweitert|Aktualisieren)" manage=off
|
||||
${yabai} -m rule --add app="^Finder$" title="(Kopieren|Bewegen|Verbinden|Infos|Einstellungen|Über|Papierkorb)" manage=off
|
||||
${yabai} -m rule --add app="^FileBot$" title="(Invalid Characters|Preset Editor|Conflicts|TheTVDB|TheMovieDB|AccoustID)" manage=off
|
||||
${yabai} -m rule --add app="^Fork$" title="(General|Commit|Git|Integration|Custom Commands|Updates)" manage=off
|
||||
${yabai} -m rule --add app="^Mail$" title="(Accountinformationen|Aktivität|Allgemein|Accounts|Spam|Schrift & Farbe|Darstellung|Verfassen|Signaturen|Regeln)" manage=off
|
||||
yabai -m rule --add app="^Alfred Preferences$" manage=off
|
||||
yabai -m rule --add app="^Thunderbird$" title="(Nachricht wird gesendet|Aktivitäten|Öffnen von)" manage=off
|
||||
yabai -m rule --add app="^MoneyMoney$" title="(Einstellungen)" manage=off
|
||||
yabai -m rule --add app="^DBeaver$" title="(Treibereinstellungen|Neue Verbindung anlegen)" manage=off
|
||||
yabai -m rule --add app="^Fantastical Helper$" manage=off
|
||||
yabai -m rule --add app="^Affinity .*$" title="(Dokument)" manage=off
|
||||
yabai -m rule --add app="^Fantastical$" title="(Allgemein|Darstellung|Accounts|Kalender|Erinnerungen|Wetter|Erweitert|Aktualisieren)" manage=off
|
||||
yabai -m rule --add app="^Finder$" title="(Kopieren|Bewegen|Verbinden|Infos|Einstellungen|Über|Papierkorb)" manage=off
|
||||
yabai -m rule --add app="^FileBot$" title="(Invalid Characters|Preset Editor|Conflicts|TheTVDB|TheMovieDB|AccoustID)" manage=off
|
||||
yabai -m rule --add app="^Fork$" title="(General|Commit|Git|Integration|Custom Commands|Updates)" manage=off
|
||||
yabai -m rule --add app="^Mail$" title="(Accountinformationen|Aktivität|Allgemein|Accounts|Spam|Schrift & Farbe|Darstellung|Verfassen|Signaturen|Regeln)" manage=off
|
||||
|
||||
echo "yabai configuration loaded.."
|
||||
|
Loading…
Reference in New Issue
Block a user