diff --git a/hosts/nabro/dwl-config.h b/hosts/nabro/dwl-config.h index c1d6a53..062bb3c 100644 --- a/hosts/nabro/dwl-config.h +++ b/hosts/nabro/dwl-config.h @@ -118,7 +118,7 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA /* commands */ static const char *termcmd[] = { "foot", NULL }; static const char *browsercmd[] = { "zen-beta", NULL }; -static const char *menucmd[] = { "wmenu-run", NULL }; +static const char *menucmd[] = { "fuzzel", NULL }; static const char *volup[] = { "pamixer", "-i", "5", NULL }; static const char *voldown[] = { "pamixer", "-d", "5", NULL }; @@ -136,7 +136,7 @@ const Key keys[] = { { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightup} }, { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightdown} }, - { 0, XKB_KEY_Print, spawn, SHCMD("grim -g \"$(slurp)\" - | wl-copy") }, + /* { 0, XKB_KEY_Print, spawn, SHCMD("grim -g \"$(slurp)\" - | wl-copy") }, */ { MODKEY, XKB_KEY_p, spawn, {.v = menucmd} }, { MODKEY, XKB_KEY_w, spawn, {.v = browsercmd} }, diff --git a/modules/default.nix b/modules/default.nix index c2ca280..32f2416 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -25,6 +25,8 @@ allModules self.nixosModules.zsh self.nixosModules.helix self.nixosModules.zen-browser + self.nixosModules.niri + self.nixosModules.greetd ]; }; diff --git a/modules/desktop.nix b/modules/desktop.nix index 418f71b..84bf9d3 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -38,28 +38,44 @@ programs.dconf.enable = true; security.pam.services.swaylock = { }; + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + config = { + common = { + default = [ "gtk" ]; + }; + }; + }; + qt = { enable = true; platformTheme = "gnome"; style = "adwaita-dark"; }; - services.getty.autologinUser = "${userVars.username}"; + # services.getty.autologinUser = "${userVars.username}"; environment.systemPackages = with pkgs; [ pamixer brightnessctl wl-clipboard - wmenu + fuzzel fnott foot tor-browser - grim - slurp + # grim + # slurp wlopm ]; home-manager.users."${userVars.username}" = { + dconf.settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + gtk = { enable = true; theme = { diff --git a/modules/greetd.nix b/modules/greetd.nix new file mode 100644 index 0000000..35ad29c --- /dev/null +++ b/modules/greetd.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd niri"; + user = "greeter"; + }; + }; + }; +} diff --git a/modules/niri.nix b/modules/niri.nix new file mode 100644 index 0000000..c73d855 --- /dev/null +++ b/modules/niri.nix @@ -0,0 +1,133 @@ +{ + config, + lib, + pkgs, + userVars, + ... +}: + +{ + programs.niri.enable = true; + + home-manager.users."${userVars.username}" = { + xdg.configFile."niri/config.kdl".text = '' + prefer-no-csd + + workspace "browser" + workspace "term" + + input { + keyboard { + xkb { + options "ctrl:swapcaps" + } + } + + touchpad { + tap + dwt + natural-scroll + } + + mouse { + } + } + + output "eDP-1" { + } + + layout { + gaps 12 + center-focused-column "never" + default-column-width { proportion 0.5; } + + preset-column-widths { + proportion 0.333 + proportion 0.5 + proportion 0.667 + } + + focus-ring { + width 2 + } + } + + spawn-at-startup "fnott" + + binds { + Mod+Shift+Slash { show-hotkey-overlay; } + + Mod+H { focus-column-left; } + Mod+L { focus-column-right; } + Mod+J { focus-window-down; } + Mod+K { focus-window-up; } + + Mod+Shift+H { move-column-left; } + Mod+Shift+L { move-column-right; } + Mod+Shift+J { move-window-down; } + Mod+Shift+K { move-window-up; } + + Mod+1 { focus-workspace "browser"; } + Mod+2 { focus-workspace "term"; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+6 { focus-workspace 6; } + Mod+7 { focus-workspace 7; } + Mod+8 { focus-workspace 8; } + Mod+9 { focus-workspace 9; } + + Mod+Shift+1 { move-column-to-workspace "browser"; } + Mod+Shift+2 { move-column-to-workspace "term"; } + Mod+Shift+3 { move-column-to-workspace 3; } + Mod+Shift+4 { move-column-to-workspace 4; } + Mod+Shift+5 { move-column-to-workspace 5; } + Mod+Shift+6 { move-column-to-workspace 6; } + Mod+Shift+7 { move-column-to-workspace 7; } + Mod+Shift+8 { move-column-to-workspace 8; } + Mod+Shift+9 { move-column-to-workspace 9; } + + Mod+Q { close-window; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + Mod+Space { switch-preset-column-width; } + + Mod+Return { spawn "foot"; } + Mod+D { spawn "fuzzel"; } + Mod+B { spawn "zen-beta"; } + Mod+Ctrl+L { spawn "swaylock"; } + Mod+Shift+E { quit; } + + Mod+V { toggle-window-floating; } + Mod+Shift+V { switch-focus-between-floating-and-tiling; } + + Mod+O repeat=false { toggle-overview; } + + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + Mod+Comma { consume-window-into-column; } + Mod+Period { expel-window-from-column; } + + XF86AudioRaiseVolume { spawn "pamixer" "-i" "5"; } + XF86AudioLowerVolume { spawn "pamixer" "-d" "5"; } + XF86AudioMute { spawn "pamixer" "-t"; } + XF86MonBrightnessUp { spawn "brightnessctl" "set" "10%+"; } + XF86MonBrightnessDown { spawn "brightnessctl" "set" "10%-"; } + + Print { screenshot; } + Mod+Print { screenshot-screen; } + Mod+Shift+S { screenshot; } + } + + window-rule { + match app-id=r#"^zen.*$"# + open-on-workspace "browser" + } + + window-rule { + match app-id="^foot$" + open-on-workspace "term" + } + ''; + }; +} diff --git a/modules/zsh.nix b/modules/zsh.nix index d72665b..225fe55 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -31,9 +31,9 @@ fi # Automatically start dwl on TTY 1 - if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then - exec dwl - fi + # if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then + # exec dwl + # fi ''; history = {