fix(nixos): launch Hyprland with Lua configuration
This commit is contained in:
@@ -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" })'') { })
|
||||
|
||||
@@ -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}'";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user