diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-03-13 20:18:32 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-03-13 20:18:32 +0530 |
| commit | 9bdba2ca39d7356f67c2f8f8c13e0f6a973c460b (patch) | |
| tree | 09effa198aedae0281bb7432ffedddf48679596c /modules/desktop/i3/default.nix | |
| parent | e0c724f14042bd90b9eb5687a351c9945b74fc9b (diff) | |
| download | home-manager-config-9bdba2ca39d7356f67c2f8f8c13e0f6a973c460b.tar.gz home-manager-config-9bdba2ca39d7356f67c2f8f8c13e0f6a973c460b.zip | |
Using i3 instead of bspwm
Diffstat (limited to 'modules/desktop/i3/default.nix')
| -rw-r--r-- | modules/desktop/i3/default.nix | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/modules/desktop/i3/default.nix b/modules/desktop/i3/default.nix new file mode 100644 index 0000000..e24f95b --- /dev/null +++ b/modules/desktop/i3/default.nix @@ -0,0 +1,93 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + config = lib.mkIf config.desktop.enable { + xsession.windowManager.i3.enable = true; + + xsession.windowManager.i3.config = with config.scheme.withHashtag; { + modifier = "Mod4"; # Super + + bars = [ ]; + + gaps = { + inner = 10; + outer = 0; + }; + + window = { + border = 1; + titlebar = false; + }; + + colors = { + focused = { + border = base03; + background = base03; + text = base07; + indicator = base03; + childBorder = base03; + }; + focusedInactive = { + border = base02; + background = base02; + text = base05; + indicator = base02; + childBorder = base02; + }; + unfocused = { + border = base02; + background = base02; + text = base05; + indicator = base02; + childBorder = base02; + }; + }; + + defaultWorkspace = "workspace number 1"; + + window.commands = [ + { + command = "floating enable, sticky enable, resize set 1000 600, move position center"; + criteria = { + class = "floating-termial"; + }; + } + ]; + + focus.followMouse = true; + + startup = [ + # { + # command = "${config.services.polybar.script}"; + # always = true; + # notification = false; + # } + { + command = "xrandr -q | grep -w 'connected' | cut -d' ' -f1 | xargs -I{} i3-msg \"workspace 1 output {}\""; + always = false; + notification = false; + } + { + command = + if config.tools.feh.enable then + "${pkgs.feh}/bin/feh --bg-scale ${../../../assets/skeleton-mage.png}" + else + "xsetroot -solid \"${config.scheme.withHashtag.base00}\""; + always = true; + notification = false; + } + ]; + + keybindings = lib.mkOptionDefault (import ./keybindings.nix { inherit pkgs lib; }); + }; + + xsession.windowManager.i3.extraConfig = '' + exec_always --no-startup-id xrandr -q | grep -w 'connected' | cut -d' ' -f1 | xargs -I{} i3-msg "workspace 1 output {}" + ''; + }; +} |
