summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2026-08-29 11:32:16 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2026-08-29 11:32:16 -0400
commitc589cef163fddefcca977f130319f6b5e3657621 (patch)
tree3e53b706d4529ef0a015ec6c91f186e24aafcc36 /hosts
parentcd1edb8102b069072cafb8b7e399ab252472b995 (diff)
Added vorsaint and settings file, refactor yabai
Diffstat (limited to 'hosts')
-rw-r--r--hosts/RyanMac/configuration.nix93
1 files changed, 8 insertions, 85 deletions
diff --git a/hosts/RyanMac/configuration.nix b/hosts/RyanMac/configuration.nix
index e8339e6..307c7f0 100644
--- a/hosts/RyanMac/configuration.nix
+++ b/hosts/RyanMac/configuration.nix
@@ -24,20 +24,6 @@ let
24 ]; 24 ];
25 }); 25 });
26 26
27 mkSpace = i: {
28 name = toString (117+i);
29 value = {
30 enabled = true;
31 value = {
32 type = "standard";
33 parameters = [ (48 + i) (builtins.elemAt [ 18 19 20 21 22 23 25 26 28 ] (i - 1)) 524288 ]; # opt + num
34 #parameters = [ (48 + i) (builtins.elemAt [ 18 19 20 21 22 23 25 26 28 ] (i - 1)) 1048576 ]; # cmd + num
35 };
36 };
37 };
38
39 spaceHotkeys = builtins.listToAttrs (map mkSpace (lib.range 1 9));
40
41 manualHotkeys = { 27 manualHotkeys = {
42 "64" = { 28 "64" = {
43 enabled = true; 29 enabled = true;
@@ -49,6 +35,7 @@ in {
49 imports = [ 35 imports = [
50 inputs.nix-homebrew.darwinModules.nix-homebrew 36 inputs.nix-homebrew.darwinModules.nix-homebrew
51 ../../modules/darwin/random-wallpaper 37 ../../modules/darwin/random-wallpaper
38 ../../modules/darwin/yabai
52 ]; 39 ];
53 40
54 # Define the system's user and home dir location 41 # Define the system's user and home dir location
@@ -69,43 +56,14 @@ in {
69 }; 56 };
70 57
71 # Configure yabai 58 # Configure yabai
72 services.yabai = { 59 local.yabai = {
73 enable = true; 60 enable = true;
74 enableScriptingAddition = false; 61 defaultPadding = 10;
75 config = { 62 defaultTopPadding = 10;
76 mouse_follows_focus = "on"; 63 displayTopPadding = {
77 layout = "bsp"; 64 "6131F10F-6020-4D7E-8222-8702B5AEF45E" = 40;
78 window_placement = "second_child";
79 top_padding = "10";
80 bottom_padding = "10";
81 left_padding = "10";
82 right_padding = "10";
83 window_gap = "10";
84 mouse_modifier = "alt";
85 mouse_drop_action = "swap";
86 mouse_action1 = "move";
87 mouse_action2 = "resize";
88 focus_follows_mouse = "autofocus";
89 }; 65 };
90 extraConfig = '' 66 extraSymbolicHotkeys = manualHotkeys;
91 yabai -m rule --add app='System Settings' manage=off
92 yabai -m rule --add app="^Zen$" title="^Picture-in-Picture$" manage=off
93 ''
94 # Add simple-bar signals if enabled
95 + lib.optionalString config.home-manager.users.${username}.ryan.simple-bar.enable ''
96 yabai -m signal --add event=window_focused action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows when focused application changes"
97 yabai -m signal --add event=window_resized action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows when a window is resized"
98 yabai -m signal --add event=window_destroyed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-ba spaces & windows when an application window is closed"
99 yabai -m signal --add event=space_changed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows on space change"
100 yabai -m signal --add event=display_changed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows on display focus change"
101 yabai -m signal --add event=window_title_changed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows when current window title changes"
102 yabai -m signal --add event=space_destroyed action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows on space removal"
103 yabai -m signal --add event=space_created action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows on space creation"
104 yabai -m signal --add event=application_activated action="curl http://localhost:7776/yabai/spaces/refresh && curl http://localhost:7776/yabai/windows/refresh" label="Refresh simple-bar spaces & windows when application is activated"
105 yabai -m signal --add event=display_added action="curl http://localhost:7776/yabai/displays/refresh" label="Refresh simple-bar displays when a new dispay is added"
106 yabai -m signal --add event=display_removed action="curl http://localhost:7776/yabai/displays/refresh" label="Refresh simple-bar displays when a dispay is removed"
107 yabai -m signal --add event=display_moved action="curl http://localhost:7776/yabai/displays/refresh" label="Refresh simple-bar displays when a dispay is moved"
108 '';
109 }; 67 };
110 68
111 # Configure JankyBorders 69 # Configure JankyBorders
@@ -200,6 +158,7 @@ in {
200 "gimp" 158 "gimp"
201 "kdenlive" 159 "kdenlive"
202 "rustdesk" 160 "rustdesk"
161 "vorssaint"
203 ]; 162 ];
204 }; 163 };
205 164
@@ -209,35 +168,6 @@ in {
209 skhdConfig = '' 168 skhdConfig = ''
210 alt - d : osascript -e 'tell application "System Events" to key code 49 using {command down}' 169 alt - d : osascript -e 'tell application "System Events" to key code 49 using {command down}'
211 alt - return : osascript -e 'tell application "Ghostty"' -e 'new window' -e 'activate' -e 'end tell' 170 alt - return : osascript -e 'tell application "Ghostty"' -e 'new window' -e 'activate' -e 'end tell'
212
213 shift + alt - q : ${pkgs.yabai}/bin/yabai -m window --close
214
215 alt - up : ${pkgs.yabai}/bin/yabai -m window --focus north || ${pkgs.yabai}/bin/yabai -m display --focus north
216 shift + alt - up : ${pkgs.yabai}/bin/yabai -m window --swap north || ${pkgs.yabai}/bin/yabai -m window --display north
217 alt - down : ${pkgs.yabai}/bin/yabai -m window --focus south || ${pkgs.yabai}/bin/yabai -m display --focus south
218 shift + alt - down : ${pkgs.yabai}/bin/yabai -m window --swap south || ${pkgs.yabai}/bin/yabai -m window --display south
219 alt - right : ${pkgs.yabai}/bin/yabai -m window --focus east || ${pkgs.yabai}/bin/yabai -m display --focus east
220 shift + alt - right : ${pkgs.yabai}/bin/yabai -m window --swap east || ${pkgs.yabai}/bin/yabai -m window --display east
221 alt - left : ${pkgs.yabai}/bin/yabai -m window --focus west || ${pkgs.yabai}/bin/yabai -m display --focus west
222 shift + alt - left: ${pkgs.yabai}/bin/yabai -m window --swap west || ${pkgs.yabai}/bin/yabai -m window --display west
223
224 shift + alt - space: ${pkgs.yabai}/bin/yabai -m window --toggle float
225
226 shift + alt - return: ${pkgs.yabai}/bin/yabai -m window --toggle sticky
227
228 alt - f : ${pkgs.yabai}/bin/yabai -m window --toggle zoom-fullscreen
229
230 shift + alt - f: ${pkgs.yabai}/bin/yabai -m window --toggle native-fullscreen
231
232 shift + alt - 1 : ${pkgs.yabai}/bin/yabai -m window --space 1
233 shift + alt - 2 : ${pkgs.yabai}/bin/yabai -m window --space 2
234 shift + alt - 3 : ${pkgs.yabai}/bin/yabai -m window --space 3
235 shift + alt - 4 : ${pkgs.yabai}/bin/yabai -m window --space 4
236 shift + alt - 5 : ${pkgs.yabai}/bin/yabai -m window --space 5
237 shift + alt - 6 : ${pkgs.yabai}/bin/yabai -m window --space 6
238 shift + alt - 7 : ${pkgs.yabai}/bin/yabai -m window --space 7
239 shift + alt - 8 : ${pkgs.yabai}/bin/yabai -m window --space 8
240 shift + alt - 9 : ${pkgs.yabai}/bin/yabai -m window --space 9
241 ''; 171 '';
242 }; 172 };
243 173
@@ -250,9 +180,6 @@ in {
250 }; 180 };
251 181
252 system.defaults = { 182 system.defaults = {
253 WindowManager = {
254 EnableTilingOptionAccelerator = false;
255 };
256 NSGlobalDomain = { 183 NSGlobalDomain = {
257 # 24 hour time 184 # 24 hour time
258 AppleICUForce24HourTime = true; 185 AppleICUForce24HourTime = true;
@@ -391,10 +318,6 @@ in {
391 "com.apple.Accessibility" = { 318 "com.apple.Accessibility" = {
392 ReduceMotionEnabled = 1; 319 ReduceMotionEnabled = 1;
393 }; 320 };
394
395 "com.apple.symbolichotkeys" = {
396 AppleSymbolicHotKeys = manualHotkeys // spaceHotkeys;
397 };
398 }; 321 };
399 universalaccess.reduceMotion = true; 322 universalaccess.reduceMotion = true;
400 }; 323 };