diff --git a/configs/fwbook/hypr/ABOUTME.md b/configs/fwbook/hypr/ABOUTME.md index e274ec2..02f53b3 100644 --- a/configs/fwbook/hypr/ABOUTME.md +++ b/configs/fwbook/hypr/ABOUTME.md @@ -57,7 +57,21 @@ hypr/ - `Mod+Escape` (toggle-keyboard-shortcuts-inhibit) — no native equivalent; omitted. - `Mod+W` (toggle-column-tabbed-display) — mapped to `hl.dsp.group.toggle()` as the nearest analog. - `Mod+Tab` (toggle-overview) — no native overview / no buildable plugin; mapped to `cyclenext`. -- Workspace-to-monitor moves (niri used touchpad scroll) — approximated with `Mod + mouse wheel`. + +## Touchpad gestures (niri parity) + +niri's 3-finger swipes are mirrored in `conf/inputs.lua`: +- **Horizontal** → `scroll_move` (scroll through columns along the tape) +- **Vertical** → `workspace` (switch workspaces up/down) +- **Mod + swipe (any direction)** → move the whole workspace to the monitor in + that direction (`movecurrentworkspacetomonitor`), mirroring niri's + `Mod+TouchpadScroll*` binds. This replaced the old `Mod + mouse wheel` approach. + +> The gesture action is `scroll_move` (underscore), not `scrollmove`. The +> `mods = "SUPER"` mask is what lets the Mod + swipe variants coexist with the +> plain swipes. Both require a Hyprland new enough to expose configurable Lua +> gestures (0.55+). The older `scrollmove` name and the `scrollmove` action do +> not exist — they error with "unknown action". ## Behavior deltas from the old hyprlang config diff --git a/configs/fwbook/hypr/conf/inputs.lua b/configs/fwbook/hypr/conf/inputs.lua index 97b81b5..2d863a4 100644 --- a/configs/fwbook/hypr/conf/inputs.lua +++ b/configs/fwbook/hypr/conf/inputs.lua @@ -12,11 +12,22 @@ hl.config({ touchpad = { natural_scroll = true, - ["tap-to-click"] = true, + -- ["tap-to-click"] = true, disable_while_typing = true, }, }, }) --- Three-finger horizontal swipe to move across workspaces (niri-like). -hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) +-- Match niri's touchpad axes: 3-finger horizontal scrolls through columns +-- (scroll_move drives the scrolling-layout tape), vertical switches workspaces. +hl.gesture({ fingers = 3, direction = "horizontal", action = "scroll_move" }) +hl.gesture({ fingers = 3, direction = "vertical", action = "workspace" }) + +-- niri moved a whole workspace to another monitor via Mod + touchpad scroll. +-- Hyprland gestures take a `mods` mask, so mirror that with Mod + 3-finger +-- swipes. Directions mirror niri's binds (swipe up -> monitor down, etc.); +-- flip the monitor letters if the axis feels reversed on your hardware. +hl.gesture({ fingers = 3, direction = "up", mods = "SUPER", action = function() hl.exec_cmd("hyprctl dispatch movecurrentworkspacetomonitor d") end }) +hl.gesture({ fingers = 3, direction = "down", mods = "SUPER", action = function() hl.exec_cmd("hyprctl dispatch movecurrentworkspacetomonitor u") end }) +hl.gesture({ fingers = 3, direction = "left", mods = "SUPER", action = function() hl.exec_cmd("hyprctl dispatch movecurrentworkspacetomonitor r") end }) +hl.gesture({ fingers = 3, direction = "right", mods = "SUPER", action = function() hl.exec_cmd("hyprctl dispatch movecurrentworkspacetomonitor l") end }) diff --git a/configs/fwbook/hypr/conf/keybindings.lua b/configs/fwbook/hypr/conf/keybindings.lua index 75727a6..d56b7cb 100644 --- a/configs/fwbook/hypr/conf/keybindings.lua +++ b/configs/fwbook/hypr/conf/keybindings.lua @@ -86,10 +86,8 @@ hl.bind(mod .. " + ALT + left", hl.dsp.window.move({ monitor = "l" })) hl.bind(mod .. " + ALT + right", hl.dsp.window.move({ monitor = "r" })) hl.bind(mod .. " + ALT + up", hl.dsp.window.move({ monitor = "u" })) --- niri moved workspaces between monitors via touchpad scroll; approximate with --- Mod + mouse wheel (move current workspace to next/prev monitor). -hl.bind(mod .. " + mouse_down", hl.dsp.workspace.move({ monitor = "+1" })) -hl.bind(mod .. " + mouse_up", hl.dsp.workspace.move({ monitor = "-1" })) +-- niri moved workspaces between monitors via Mod + touchpad scroll. That now +-- lives in conf/inputs.lua as Mod + 3-finger swipe gestures (mods = "SUPER"). -- ========================= -- Mouse drag (move / resize windows) diff --git a/configs/fwbook/hypr/dms/layout.lua b/configs/fwbook/hypr/dms/layout.lua new file mode 100644 index 0000000..73ce139 --- /dev/null +++ b/configs/fwbook/hypr/dms/layout.lua @@ -0,0 +1,18 @@ +-- Auto-generated by DMS — do not edit manually + +hl.config({ + general = { + gaps_in = 4, + gaps_out = 4, + border_size = 2, + resize_on_border = false, + }, + decoration = { + rounding = 12, + }, +}) + +hl.layer_rule({ + match = { namespace = "^dms:bar$" }, + xray = true, +}) diff --git a/configs/fwbook/hypr/dms/windowrules.lua b/configs/fwbook/hypr/dms/windowrules.lua new file mode 100644 index 0000000..e69de29 diff --git a/modules/nixos/desktop/tiler/default.nix b/modules/nixos/desktop/tiler/default.nix index b7c7b7d..e2a05ba 100644 --- a/modules/nixos/desktop/tiler/default.nix +++ b/modules/nixos/desktop/tiler/default.nix @@ -31,6 +31,7 @@ in dgop.package = unstablePkgs.dgop; systemd = { enable = true; # Systemd service for auto-start + target = "niri.service"; restartIfChanged = true; # Auto-restart dms.service when dankMaterialShell changes }; };