diff --git a/configs/nixos/modules/desktop/session/hyprland/default.nix b/configs/nixos/modules/desktop/session/hyprland/default.nix index 687e629..2d335e8 100644 --- a/configs/nixos/modules/desktop/session/hyprland/default.nix +++ b/configs/nixos/modules/desktop/session/hyprland/default.nix @@ -19,10 +19,7 @@ let # Numbered-workspace switch and move for 1..9, the operator's i3 muscle memory. workspaceBinds = lib.concatMap (n: [ - (mkBind ''mod .. " + ${toString n}"'' - (lua "hl.dsp.workspace.change_id(${builtins.toJSON (toString n)})") - { } - ) + (mkBind ''mod .. " + ${toString n}"'' (lua ''hl.dsp.focus({ workspace = "${toString n}" })'') { }) (mkBind ''mod .. " + SHIFT + ${toString n}"'' (lua ''hl.dsp.window.move({ workspace = "${toString n}", follow = false })'') { } @@ -132,7 +129,7 @@ in accel_profile = "flat"; touchpad = { natural_scroll = true; - tap-to-click = true; + tap_to_click = true; disable_while_typing = true; }; }; @@ -225,10 +222,10 @@ in (mkBind ''mod .. " + RETURN"'' (lua "hl.dsp.exec_cmd(terminal)") { }) # Move focus. - (mkBind ''mod .. " + H"'' (lua ''hl.dsp.focus("l")'') { }) - (mkBind ''mod .. " + J"'' (lua ''hl.dsp.focus("d")'') { }) - (mkBind ''mod .. " + K"'' (lua ''hl.dsp.focus("u")'') { }) - (mkBind ''mod .. " + L"'' (lua ''hl.dsp.focus("r")'') { }) + (mkBind ''mod .. " + H"'' (lua ''hl.dsp.focus({ direction = "left" })'') { }) + (mkBind ''mod .. " + J"'' (lua ''hl.dsp.focus({ direction = "down" })'') { }) + (mkBind ''mod .. " + K"'' (lua ''hl.dsp.focus({ direction = "up" })'') { }) + (mkBind ''mod .. " + L"'' (lua ''hl.dsp.focus({ direction = "right" })'') { }) # Move the window within the layout. (mkBind ''mod .. " + SHIFT + H"'' (lua ''hl.dsp.window.move({ direction = "l" })'') { }) diff --git a/configs/nixos/modules/desktop/session/login.nix b/configs/nixos/modules/desktop/session/login.nix index 7e6c0dc..8147850 100644 --- a/configs/nixos/modules/desktop/session/login.nix +++ b/configs/nixos/modules/desktop/session/login.nix @@ -6,6 +6,10 @@ }: # Text login: greetd running the tuigreet greeter, which starts the session # through the universal Wayland session manager. +let + hyprlandConfig = + config.home-manager.users.${config.user.name}.xdg.configFile."hypr/hyprland.lua".source; +in { options.modules.desktop.session.login.enable = lib.mkEnableOption "greetd with the tuigreet text greeter"; @@ -15,7 +19,7 @@ enable = true; settings.default_session.command = "${lib.getExe pkgs.tuigreet} --time --remember " - + "--cmd 'uwsm start -e -D Hyprland hyprland.desktop'"; + + "--cmd 'uwsm start -e -D Hyprland ${config.programs.hyprland.package}/bin/Hyprland --config ${hyprlandConfig}'"; }; }; }