From 5ea7d41fee5412aed0458de6f0c1d766a16a404b Mon Sep 17 00:00:00 2001 From: Ray Andrew Date: Wed, 9 Apr 2025 01:22:26 -0500 Subject: [PATCH] add more homebrew packages --- darwin/aerospace.nix | 68 ++++++++++++++++++++++++++++++++++++----- darwin/homebrew.nix | 18 +++++++++++ hosts/dango/default.nix | 7 +++-- 3 files changed, 82 insertions(+), 11 deletions(-) diff --git a/darwin/aerospace.nix b/darwin/aerospace.nix index c043208..0156a60 100644 --- a/darwin/aerospace.nix +++ b/darwin/aerospace.nix @@ -31,7 +31,7 @@ in enable = true; settings = { enable-normalization-flatten-containers = false; - enable-normalization-opposite-orientation-for-nested-containers = true; + enable-normalization-opposite-orientation-for-nested-containers = false; accordion-padding = 0; on-focused-monitor-changed = [ "move-mouse monitor-lazy-center" ]; default-root-container-layout = "tiles"; @@ -77,15 +77,20 @@ in alt-shift-v = "split horizontal"; # alt-v = "join-with down"; # alt-shift-v = "join-with right"; - alt-h = "focus left"; - alt-l = "focus right"; - alt-j = "focus down"; - alt-k = "focus up"; + alt-h = "focus --boundaries-action wrap-around-the-workspace left"; + alt-l = "focus --boundaries-action wrap-around-the-workspace right"; + alt-j = "focus --boundaries-action wrap-around-the-workspace down"; + alt-k = "focus --boundaries-action wrap-around-the-workspace up"; alt-shift-h = "move left"; alt-shift-l = "move right"; alt-shift-j = "move down"; alt-shift-k = "move up"; + cmd-h = [ ]; # Disable "hide application" + cmd-alt-h = [ ]; # Disable "hide others" + cmd-q = [ ]; # Disable "quit" + cmd-shift-q = [ ]; # Disable "logout" + alt-1 = "workspace 1"; alt-2 = "workspace 2"; alt-3 = "workspace 3"; @@ -138,6 +143,7 @@ in # "workspace 10" ]; + alt-shift-c = "reload-config"; alt-tab = "workspace-back-and-forth"; alt-shift-tab = "move-workspace-to-monitor --wrap-around next"; alt-r = "mode resize"; @@ -219,23 +225,69 @@ in }; on-window-detected = [ + # workspace + # media { "if".app-id = "com.spotify.client"; run = [ "move-node-to-workspace 7" ]; } + # browser { "if".app-id = "app.zen-browser.zen"; run = [ "move-node-to-workspace 10" ]; } { - "if".app-id = "com.mitchellh.ghostty"; - run = [ "layout tiling" ]; + "if".app-id = "app.mozilla.firefox"; + run = [ "move-node-to-workspace 10" ]; } + { + "if".app-id = "com.google.Chrome"; + run = [ "move-node-to-workspace 10" ]; + } + { + "if".app-id = "org.chromium.Chromium"; + run = [ "move-node-to-workspace 10" ]; + } + # communications { "if".app-id = "com.tinyspeck.slackmacgap"; run = [ "move-node-to-workspace 9" ]; } - + { + "if".app-id = "com.microsoft.teams2"; + run = [ "move-node-to-workspace 9" ]; + } + # special app's layout + ## tiling + { + "if".app-id = "com.mitchellh.ghostty"; + run = [ "layout tiling" ]; + } + ## floating + { + "if".app-id = "com.renfei.SnippetsLab"; + run = [ "layout floating" ]; + } + { + "if".app-id = "com.colliderli.iina"; + run = [ "layout tiling" ]; + } + { + "if".app-id = "com.apple.ActivityMonitor"; + run = [ "layout floating" ]; + } + { + "if".app-id = "com.apple.calculator"; + run = [ "layout floating" ]; + } + { + "if".app-id = "com.apple.finder"; + run = [ "layout floating" ]; + } + { + "if".app-id = "com.1password.1password"; + run = [ "layout floating" ]; + } ]; }; }; diff --git a/darwin/homebrew.nix b/darwin/homebrew.nix index cad8f5e..c81f77b 100644 --- a/darwin/homebrew.nix +++ b/darwin/homebrew.nix @@ -30,6 +30,9 @@ contexts = mkEnableOption "Enable Contexts"; forklift = mkEnableOption "Enable Forklift 4"; flux = mkEnableOption "Enable f.lux"; + cleanshot = mkEnableOption "Enable cleanshot"; + snippets-lab = mkEnableOption "Enable SnippetsLab"; + iina = mkEnableOption "Enable IINA"; }; config = lib.mkMerge [ @@ -62,6 +65,11 @@ "Amphetamine" = 937984704; }; }) + (lib.mkIf config.custom.brew.snippets-lab { + homebrew.masApps = { + "SnippetsLab" = 1006087419; + }; + }) # casks (lib.mkIf config.custom.brew.zen-browser { homebrew.casks = [ @@ -163,5 +171,15 @@ "flux" ]; }) + (lib.mkIf config.custom.brew.cleanshot { + homebrew.casks = [ + "cleanshot" + ]; + }) + (lib.mkIf config.custom.brew.iina { + homebrew.casks = [ + "iina" + ]; + }) ]; } diff --git a/hosts/dango/default.nix b/hosts/dango/default.nix index 367331b..437d7c3 100644 --- a/hosts/dango/default.nix +++ b/hosts/dango/default.nix @@ -11,8 +11,6 @@ ... }: { - imports = [ ]; - custom = { aerospace.enable = true; sketchybar.enable = true; @@ -38,12 +36,15 @@ ice = true; contexts = true; flux = true; + cleanshot = true; + snippets-lab = true; + iina = true; }; }; hm.custom = { emacs.enable = true; - latex.enable = false; + latex.enable = true; gui = { default.enable = true; darwin.enable = true;