diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-25 11:00:04 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-25 11:00:04 +0530 |
| commit | 6621b1998e6f02772adb2df2fc19343691b086cf (patch) | |
| tree | fa37ae8f1d97bc96d640b0d1ee4ed843028e480a | |
| parent | 939f188a9b2c6dccbe15bf7893ca10de1981f405 (diff) | |
| download | home-manager-config-6621b1998e6f02772adb2df2fc19343691b086cf.tar.gz home-manager-config-6621b1998e6f02772adb2df2fc19343691b086cf.zip | |
feat(display): using proper window classes for i3
| -rw-r--r-- | modules/desktop/i3/default.nix | 8 | ||||
| -rw-r--r-- | modules/desktop/i3/keybindings.nix | 4 | ||||
| -rw-r--r-- | modules/file-management/yazi/assertions.nix | 13 | ||||
| -rw-r--r-- | modules/file-management/yazi/default.nix | 15 | ||||
| -rw-r--r-- | modules/web/chromium/default.nix | 2 |
5 files changed, 32 insertions, 10 deletions
diff --git a/modules/desktop/i3/default.nix b/modules/desktop/i3/default.nix index 5a428d3..b3d0672 100644 --- a/modules/desktop/i3/default.nix +++ b/modules/desktop/i3/default.nix @@ -53,7 +53,7 @@ window.commands = [ { - command = "floating enable, resize set 1400 800, move position center"; + command = "floating enable, resize set 1280 720, move position center"; criteria.class = "file-explorer"; } { @@ -61,13 +61,9 @@ criteria.class = "application-launcher"; } { - command = "floating enable, resize set 1000 600, move position center"; + command = "floating enable, resize set 1280 720, move position center"; criteria.class = "keybindings-viewer"; } - { - command = "if_floating_resize_set 1280 720"; - criteria.class = ".*"; - } ]; focus.followMouse = true; diff --git a/modules/desktop/i3/keybindings.nix b/modules/desktop/i3/keybindings.nix index b421dba..8857e7d 100644 --- a/modules/desktop/i3/keybindings.nix +++ b/modules/desktop/i3/keybindings.nix @@ -15,7 +15,7 @@ in lib.mkIf config.terminal.kitty.enable "exec ${lib.getExe config.terminal.kitty.package}"; "${mod}+f" = lib.mkIf (config.terminal.kitty.enable && config.file-management.yazi.enable) - "exec ${lib.getExe config.terminal.kitty.package} --title 'Yazi' -e ${lib.getExe config.file-management.yazi.package}"; + "exec ${lib.getExe config.terminal.kitty.package} --class file-explorer --title 'Yazi' -e ${lib.getExe config.file-management.yazi.package}"; "${mod}+s" = lib.mkIf config.terminal.kitty.enable "exec ${lib.getExe config.terminal.kitty.package} --title 'Keybindings' --class keybindings-viewer -e ${lib.getExe config.scripts.i3-keybindings.package}"; "${mod}+q" = "kill"; @@ -54,7 +54,7 @@ in "${mod}+Control+l" = "resize grow width 20 px or 20 ppt"; # Layout Modes - "${mod}+d" = "floating toggle"; + "${mod}+d" = "floating toggle, resize set 1280 720, move position center"; "${mod}+m" = "fullscreen toggle"; # --- Workspaces --- diff --git a/modules/file-management/yazi/assertions.nix b/modules/file-management/yazi/assertions.nix new file mode 100644 index 0000000..b100fca --- /dev/null +++ b/modules/file-management/yazi/assertions.nix @@ -0,0 +1,13 @@ +# Assertions - Validates kitty is enabled for yazi desktop entry +{ config, ... }: +{ + assertions = [ + { + assertion = !config.file-management.yazi.enable || config.terminal.kitty.enable; + message = '' + file-management.yazi is enabled but terminal.kitty.enable is not. + yazi's desktop entry requires kitty as the terminal launcher. Please enable terminal.kitty. + ''; + } + ]; +} diff --git a/modules/file-management/yazi/default.nix b/modules/file-management/yazi/default.nix index b43ed5e..f52943f 100644 --- a/modules/file-management/yazi/default.nix +++ b/modules/file-management/yazi/default.nix @@ -1,7 +1,10 @@ # yazi - Terminal file manager with native previews { config, lib, ... }: { - imports = [ ./theme.nix ]; + imports = [ + ./theme.nix + ./assertions.nix + ]; options.file-management.yazi = { enable = lib.mkEnableOption "Enables yazi."; @@ -25,6 +28,16 @@ }; }; + xdg.desktopEntries."yazi" = { + name = "Yazi"; + exec = "${lib.getExe config.terminal.kitty.package} -e ${lib.getExe config.file-management.yazi.package}"; + icon = "kitty"; + categories = [ "Utility" ]; + comment = "Terminal file manager"; + terminal = false; + type = "Application"; + }; + xdg.mimeApps.defaultApplications = { "inode/directory" = "yazi.desktop"; }; diff --git a/modules/web/chromium/default.nix b/modules/web/chromium/default.nix index 4296430..380d2ea 100644 --- a/modules/web/chromium/default.nix +++ b/modules/web/chromium/default.nix @@ -30,7 +30,7 @@ extensions = [ { id = "ddkjiahejlhfcafbddmgiahcphecmpfh"; } # uBlock Origin Lite { id = "naepdomgkenhinolocfifgehidddafch"; } # Browserpass - { id = "mpkodccbngfoacfalldjimigbofkhgjn"; } # Dark Reader + { id = "kioklelcojgbjoljlilalgdcppkiioge"; } # Quite Black { id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; } # Dark Reader { id = "hpejmncgbammabkkodflfeekpcicfjnk"; } # Aria2 Explorer ]; |
