From f3724945465b691ad6ea7c64ac2e6e962314b703 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 2 May 2024 12:48:59 -0400 Subject: [PATCH] fix(yabai): format --- modules/yabai.nix | 62 +++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/modules/yabai.nix b/modules/yabai.nix index c19a320..41fa5b5 100644 --- a/modules/yabai.nix +++ b/modules/yabai.nix @@ -34,42 +34,46 @@ services.skhd = { enable = true; skhdConfig = '' - ctrl + alt - h: yabai -m window --focus west - ctrl + alt - j: yabai -m window --focus south - ctrl + alt - k: yabai -m window --focus north - ctrl + alt - l: yabai -m window --focus east + ctrl + alt - h: yabai -m window --focus west + ctrl + alt - j: yabai -m window --focus south + ctrl + alt - k: yabai -m window --focus north + ctrl + alt - l: yabai -m window --focus east - cmd + ctrl + alt - h : yabai -m window --warp west - cmd + ctrl + alt - j : yabai -m window --warp south - cmd + ctrl + alt - k : yabai -m window --warp north - cmd + ctrl + alt - l : yabai -m window --warp east + cmd + ctrl + alt - h : yabai -m window --warp west + cmd + ctrl + alt - j : yabai -m window --warp south + cmd + ctrl + alt - k : yabai -m window --warp north + cmd + ctrl + alt - l : yabai -m window --warp east - ctrl + alt - 1 : yabai -m space --focus 1 - ctrl + alt - 2 : yabai -m space --focus 2 - ctrl + alt - 3 : yabai -m space --focus 3 - ctrl + alt - 4 : yabai -m space --focus 4 - ctrl + alt - 5 : yabai -m space --focus 5 - ctrl + alt - 6 : yabai -m space --focus 6 - ctrl + alt - 7 : yabai -m space --focus 7 - ctrl + alt - 8 : yabai -m space --focus 8 - ctrl + alt - 9 : yabai -m space --focus 9 + ctrl + alt - 1 : yabai -m space --focus 1 + ctrl + alt - 2 : yabai -m space --focus 2 + ctrl + alt - 3 : yabai -m space --focus 3 + ctrl + alt - 4 : yabai -m space --focus 4 + ctrl + alt - 5 : yabai -m space --focus 5 + ctrl + alt - 6 : yabai -m space --focus 6 + ctrl + alt - 7 : yabai -m space --focus 7 + ctrl + alt - 8 : yabai -m space --focus 8 + ctrl + alt - 9 : yabai -m space --focus 9 - ctrl + alt - q: yabai -m window --close + ctrl + alt - q: yabai -m window --close + + ## stack window + # Note that this only works when the active window does *not* already belong to a stack + shift + alt + cmd - left : yabai -m window west --stack $(yabai -m query --windows --window | jq -r '.id') + shift + alt + cmd - right : yabai -m window east --stack $(yabai -m query --windows --window | jq -r '.id') # 0x21 - [ # 0x1E - ] - ctrl + alt - 0x21 : yabai -m query --spaces --space \ - | jq -re ".index" \ - | xargs -I{} yabai -m query --windows --space {} \ - | jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.y, .id) | nth(index(map(select(.focused == 1))) - 1).id" \ - | xargs -I{} yabai -m window --focus {} - - ctrl + alt - 0x1E : yabai -m query --spaces --space \ - | jq -re ".index" \ - | xargs -I{} yabai -m query --windows --space {} \ - | jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.x, .id) | reverse | nth(index(map(select(.focused == 1))) - 1).id" \ - | xargs -I{} yabai -m window --focus {} + ctrl + alt - 0x21 : yabai -m query --spaces --space \ + | jq -re ".index" \ + | xargs -I{} yabai -m query --windows --space {} \ + | jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.y, .id) | nth(index(map(select(.focused == 1))) - 1).id" \ + | xargs -I{} yabai -m window --focus {} + ctrl + alt - 0x1E : yabai -m query --spaces --space \ + | jq -re ".index" \ + | xargs -I{} yabai -m query --windows --space {} \ + | jq -sre "add | map(select(.minimized != 1)) | sort_by(.display, .frame.y, .frame.x, .id) | reverse | nth(index(map(select(.focused == 1))) - 1).id" \ + | xargs -I{} yabai -m window --focus {} ''; }; }