Commit a79014d

HPCesia <me@hpcesia.com>
2025-11-13 09:20:23
feat: update niri config
1 parent 47710d2
Changed files (3)
modules
desktop
desktop-environment
modules/desktop/desktop-environment/discrete/wm/niri/keybinding.nix
@@ -101,17 +101,16 @@
       "Mod+Shift+D".action = move-workspace-down;
       "Mod+Shift+U".action = move-workspace-up;
 
-      "Mod+1".action = focus-workspace "1terminal";
-      "Mod+2".action = focus-workspace "2browser";
-      "Mod+3".action = focus-workspace "3chat";
-      "Mod+4".action = focus-workspace "4media";
-      "Mod+5".action = focus-workspace "5read";
+      "Mod+1".action = focus-workspace 1;
+      "Mod+2".action = focus-workspace 2;
+      "Mod+3".action = focus-workspace 3;
+      "Mod+4".action = focus-workspace 4;
+      "Mod+5".action = focus-workspace 5;
       "Mod+6".action = focus-workspace 6;
       "Mod+7".action = focus-workspace 7;
       "Mod+8".action = focus-workspace 8;
-      "Mod+9".action = focus-workspace "9other";
+      "Mod+9".action = focus-workspace 9;
 
-      # TODO: Uncomment below if niri-flake has `move-column-to-workspace`
       "Mod+Ctrl+1".action = {move-column-to-workspace = [1];};
       "Mod+Ctrl+2".action = {move-column-to-workspace = [2];};
       "Mod+Ctrl+3".action = {move-column-to-workspace = [3];};
modules/desktop/desktop-environment/discrete/wm/niri/window-rules.nix
@@ -13,9 +13,22 @@
       {
         # Maximize
         matches = [
-          {app-id = "com.mitchellh.ghostty";}
+          {app-id = "code";}
+          {app-id = "dev.zed.Zed";}
+
           {app-id = "firefox";}
+          # {app-id = "chromium-browser";} # Not maximizing Chromium because I usually use it for web apps
+
           {app-id = "thunderbird";}
+          {app-id = "CherryStudio";} # Maximize Cherry Studio because default half-size is too small to it's minimum usable size
+
+          {app-id = "deadbeef";}
+          {app-id = "mpv";}
+
+          {
+            title = "^Steam$"; # Only match the main Steam window
+            app-id = "steam";
+          }
         ];
         open-maximized = true;
       }
@@ -27,8 +40,11 @@
           {app-id = "com.mitchellh.ghostty";}
           {app-id = "foot";}
           {app-id = "org.wezfurlong.wezterm";}
+
+          {app-id = "code";}
+          {app-id = "dev.zed.Zed";}
         ];
-        open-on-workspace = "1terminal";
+        open-on-workspace = "1dev";
       }
       {
         matches = [
@@ -43,6 +59,7 @@
           {app-id = "wechat";}
           {app-id = "QQ";}
           {app-id = "thunderbird";}
+          {app-id = "CherryStudio";} # AI Chat is also a chat app :)
         ];
         open-on-workspace = "3chat";
       }
@@ -56,9 +73,18 @@
       {
         matches = [
           {app-id = "readest";}
+          {app-id = "org.kde.okular";}
         ];
         open-on-workspace = "5read";
       }
+      {
+        matches = [
+          {app-id = "org.prismlauncher.PrismLauncher";}
+          {app-id = "^Minecraft\* 1\.[0-9]*\.[0-9]*$";}
+          {app-id = "steam";}
+        ];
+        open-on-workspace = "6game";
+      }
     ];
   };
 }
modules/desktop/desktop-environment/discrete/wm/niri/workspaces.nix
@@ -1,11 +1,12 @@
 {
   flake.modules.homeManager.wm-niri = _: {
     programs.niri.settings.workspaces = {
-      "1terminal" = {};
+      "1dev" = {};
       "2browser" = {};
       "3chat" = {};
       "4media" = {};
       "5read" = {};
+      "6game" = {};
       "9other" = {};
     };
   };