From c589cef163fddefcca977f130319f6b5e3657621 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Sat, 29 Aug 2026 11:32:16 -0400 Subject: Added vorsaint and settings file, refactor yabai --- hosts/RyanMac/configuration.nix | 93 ++++------------------------------------- 1 file changed, 8 insertions(+), 85 deletions(-) (limited to 'hosts') 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 ]; }); - mkSpace = i: { - name = toString (117+i); - value = { - enabled = true; - value = { - type = "standard"; - parameters = [ (48 + i) (builtins.elemAt [ 18 19 20 21 22 23 25 26 28 ] (i - 1)) 524288 ]; # opt + num - #parameters = [ (48 + i) (builtins.elemAt [ 18 19 20 21 22 23 25 26 28 ] (i - 1)) 1048576 ]; # cmd + num - }; - }; - }; - - spaceHotkeys = builtins.listToAttrs (map mkSpace (lib.range 1 9)); - manualHotkeys = { "64" = { enabled = true; @@ -49,6 +35,7 @@ in { imports = [ inputs.nix-homebrew.darwinModules.nix-homebrew ../../modules/darwin/random-wallpaper + ../../modules/darwin/yabai ]; # Define the system's user and home dir location @@ -69,43 +56,14 @@ in { }; # Configure yabai - services.yabai = { + local.yabai = { enable = true; - enableScriptingAddition = false; - config = { - mouse_follows_focus = "on"; - layout = "bsp"; - window_placement = "second_child"; - top_padding = "10"; - bottom_padding = "10"; - left_padding = "10"; - right_padding = "10"; - window_gap = "10"; - mouse_modifier = "alt"; - mouse_drop_action = "swap"; - mouse_action1 = "move"; - mouse_action2 = "resize"; - focus_follows_mouse = "autofocus"; + defaultPadding = 10; + defaultTopPadding = 10; + displayTopPadding = { + "6131F10F-6020-4D7E-8222-8702B5AEF45E" = 40; }; - extraConfig = '' - yabai -m rule --add app='System Settings' manage=off - yabai -m rule --add app="^Zen$" title="^Picture-in-Picture$" manage=off - '' - # Add simple-bar signals if enabled - + lib.optionalString config.home-manager.users.${username}.ryan.simple-bar.enable '' - 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" - 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" - 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" - 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" - 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" - 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" - 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" - 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" - 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" - 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" - 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" - 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" - ''; + extraSymbolicHotkeys = manualHotkeys; }; # Configure JankyBorders @@ -200,6 +158,7 @@ in { "gimp" "kdenlive" "rustdesk" + "vorssaint" ]; }; @@ -209,35 +168,6 @@ in { skhdConfig = '' alt - d : osascript -e 'tell application "System Events" to key code 49 using {command down}' alt - return : osascript -e 'tell application "Ghostty"' -e 'new window' -e 'activate' -e 'end tell' - - shift + alt - q : ${pkgs.yabai}/bin/yabai -m window --close - - alt - up : ${pkgs.yabai}/bin/yabai -m window --focus north || ${pkgs.yabai}/bin/yabai -m display --focus north - shift + alt - up : ${pkgs.yabai}/bin/yabai -m window --swap north || ${pkgs.yabai}/bin/yabai -m window --display north - alt - down : ${pkgs.yabai}/bin/yabai -m window --focus south || ${pkgs.yabai}/bin/yabai -m display --focus south - shift + alt - down : ${pkgs.yabai}/bin/yabai -m window --swap south || ${pkgs.yabai}/bin/yabai -m window --display south - alt - right : ${pkgs.yabai}/bin/yabai -m window --focus east || ${pkgs.yabai}/bin/yabai -m display --focus east - shift + alt - right : ${pkgs.yabai}/bin/yabai -m window --swap east || ${pkgs.yabai}/bin/yabai -m window --display east - alt - left : ${pkgs.yabai}/bin/yabai -m window --focus west || ${pkgs.yabai}/bin/yabai -m display --focus west - shift + alt - left: ${pkgs.yabai}/bin/yabai -m window --swap west || ${pkgs.yabai}/bin/yabai -m window --display west - - shift + alt - space: ${pkgs.yabai}/bin/yabai -m window --toggle float - - shift + alt - return: ${pkgs.yabai}/bin/yabai -m window --toggle sticky - - alt - f : ${pkgs.yabai}/bin/yabai -m window --toggle zoom-fullscreen - - shift + alt - f: ${pkgs.yabai}/bin/yabai -m window --toggle native-fullscreen - - shift + alt - 1 : ${pkgs.yabai}/bin/yabai -m window --space 1 - shift + alt - 2 : ${pkgs.yabai}/bin/yabai -m window --space 2 - shift + alt - 3 : ${pkgs.yabai}/bin/yabai -m window --space 3 - shift + alt - 4 : ${pkgs.yabai}/bin/yabai -m window --space 4 - shift + alt - 5 : ${pkgs.yabai}/bin/yabai -m window --space 5 - shift + alt - 6 : ${pkgs.yabai}/bin/yabai -m window --space 6 - shift + alt - 7 : ${pkgs.yabai}/bin/yabai -m window --space 7 - shift + alt - 8 : ${pkgs.yabai}/bin/yabai -m window --space 8 - shift + alt - 9 : ${pkgs.yabai}/bin/yabai -m window --space 9 ''; }; @@ -250,9 +180,6 @@ in { }; system.defaults = { - WindowManager = { - EnableTilingOptionAccelerator = false; - }; NSGlobalDomain = { # 24 hour time AppleICUForce24HourTime = true; @@ -391,10 +318,6 @@ in { "com.apple.Accessibility" = { ReduceMotionEnabled = 1; }; - - "com.apple.symbolichotkeys" = { - AppleSymbolicHotKeys = manualHotkeys // spaceHotkeys; - }; }; universalaccess.reduceMotion = true; }; -- cgit v1.3.1