diff --git a/configs/fwbook/hypr/ABOUTME.md b/configs/fwbook/hypr/ABOUTME.md index aeb2020..e274ec2 100644 --- a/configs/fwbook/hypr/ABOUTME.md +++ b/configs/fwbook/hypr/ABOUTME.md @@ -12,13 +12,23 @@ The Hyprland module links `configs//hypr` -> `~/.config/hypr`, with without stepping on other machines. The old shared `configs/hypr/` (waybar + hyprpanel) was removed when this replaced it. +## Config format: Lua + +Written in **Lua** (`hyprland.lua`), not hyprlang. Hyprland 0.55+ deprecated +hyprlang in favor of Lua, and reads `~/.config/hypr/hyprland.lua`. Files are +split under `conf/` and pulled in with `require()`. + +> The folder is named `conf`, not `hyprland.d`, because Hyprland's `require()` +> treats `.` as a path separator — `require("hyprland.d/env")` would resolve to +> `hyprland/d/env`. + ## Design - **Layout:** Hyprland's native `scrolling` layout (0.54+), no plugins required. - This mirrors niri's scrollable-tiling model. See `hyprland.d/general.conf`. -- **Shell:** noctalia (`noctalia-shell`), autostarted in `hyprland.d/autostart.conf`. - There is intentionally no waybar/hyprpanel here. -- **Keybinds:** `hyprland.d/keybindings.conf` mirrors `configs/niri/shared/binds.kdl` + This mirrors niri's scrollable-tiling model. See `conf/general.lua`. +- **Shell:** noctalia (`noctalia-shell`), autostarted in `conf/autostart.lua` + via `hl.on("hyprland.start", ...)`. There is intentionally no waybar/hyprpanel. +- **Keybinds:** `conf/keybindings.lua` mirrors `configs/niri/shared/binds.kdl` and `configs/niri/noctalia/binds.kdl` as closely as Hyprland allows. - **Overview:** there is no native Hyprland overview, and no overview plugin that reliably builds against current Hyprland (hyprexpo was retired from the @@ -29,23 +39,29 @@ hyprpanel) was removed when this replaced it. ``` hypr/ -├── hyprland.conf # variables + sources hyprland.d/*.conf -├── screen-record.sh # wf-recorder toggle (bound to Mod+R) -└── hyprland.d/ - ├── env.conf # cursor size + Wayland/Qt/Electron env hints - ├── general.conf # scrolling layout, gaps/border/rounding - ├── monitors.conf # translated from configs/niri/shared/outputs.kdl - ├── inputs.conf # touchpad tap + natural scroll, kb us, swipe - ├── window-rules.conf # float small dialogs/utilities - ├── keybindings.conf # niri + noctalia binds, scrolling dispatchers - └── autostart.conf # noctalia, hypridle (via UWSM) +├── hyprland.lua # entry point; require()s conf/*.lua in order +├── screen-record.sh # wf-recorder toggle (bound to Mod+R) +└── conf/ + ├── env.lua # cursor size + Wayland/Qt/Electron env hints (hl.env) + ├── general.lua # scrolling layout, gaps/border/rounding (hl.config) + ├── monitors.lua # hl.monitor per display (from configs/niri/.../outputs.kdl) + ├── inputs.lua # touchpad tap + natural scroll, kb us, hl.gesture + ├── window-rules.lua # hl.window_rule floats for small dialogs/utilities + ├── keybindings.lua # niri + noctalia binds, scrolling dispatchers (hl.bind/hl.dsp) + └── autostart.lua # noctalia, hypridle via UWSM (hl.on hyprland.start) ``` ## Bindings without a clean 1:1 niri mapping - `Mod+Shift+H` (show-hotkey-overlay) — no native Hyprland equivalent; left commented. - `Mod+Escape` (toggle-keyboard-shortcuts-inhibit) — no native equivalent; omitted. -- `Mod+W` (toggle-column-tabbed-display) — mapped to `togglegroup` as the nearest analog. +- `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`. +- Workspace-to-monitor moves (niri used touchpad scroll) — approximated with `Mod + mouse wheel`. + +## Behavior deltas from the old hyprlang config + +- `Ctrl+Alt+Delete` runs `uwsm stop` (not the `exit` dispatcher). The Hyprland + wiki warns UWSM users that `exit` breaks the ordered shutdown sequence. +- `Mod+Shift+-/=` (window height) uses a fixed pixel delta instead of a percent, + since the Lua `window.resize` dispatcher takes pixels, not `%`. diff --git a/configs/fwbook/hypr/conf/autostart.lua b/configs/fwbook/hypr/conf/autostart.lua new file mode 100644 index 0000000..c8bcb51 --- /dev/null +++ b/configs/fwbook/hypr/conf/autostart.lua @@ -0,0 +1,12 @@ +-- ========================= +-- Autostart +-- ========================= +-- Launched via UWSM (`uwsm app --`) so processes land in the correct +-- systemd scope for the graphical session. + +hl.on("hyprland.start", function() + -- noctalia shell (bar / launcher / control center / notifications) + hl.exec_cmd("uwsm app -- noctalia-shell") + -- Idle management + hl.exec_cmd("uwsm app -- hypridle") +end) diff --git a/configs/fwbook/hypr/conf/env.lua b/configs/fwbook/hypr/conf/env.lua new file mode 100644 index 0000000..285297f --- /dev/null +++ b/configs/fwbook/hypr/conf/env.lua @@ -0,0 +1,11 @@ +-- ========================= +-- Environment +-- ========================= +-- Mirrors the environment block in configs/niri/shared/general.kdl. + +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") +hl.env("NIXOS_OZONE_WL", "1") +hl.env("QT_QPA_PLATFORM", "wayland") +hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1") +hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") diff --git a/configs/fwbook/hypr/conf/general.lua b/configs/fwbook/hypr/conf/general.lua new file mode 100644 index 0000000..75a2910 --- /dev/null +++ b/configs/fwbook/hypr/conf/general.lua @@ -0,0 +1,38 @@ +-- ========================= +-- General / Layout +-- ========================= +-- Native scrolling layout (Hyprland 0.54+) — no plugins needed. This mirrors +-- niri's scrollable-tiling model. Gaps/border/corner-radius mirror +-- configs/niri/shared/layout.kdl (gaps 5, border 2, corner radius 12). + +hl.config({ + general = { + gaps_in = 5, + gaps_out = 5, + border_size = 2, + layout = "scrolling", + resize_on_border = true, + }, + + decoration = { + rounding = 12, + }, + + -- https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/ + scrolling = { + -- Default column width as a fraction of the screen [0.1 - 1.0]. + column_width = 0.5, + -- A lone column fills the screen (matches niri's single-column feel). + fullscreen_on_one_column = true, + -- Center the focused column when it comes into view (niri-like). + focus_fit_method = 0, + follow_focus = true, + explicit_column_widths = "0.333, 0.5, 0.667, 1.0", + }, + + -- Disable Hyprland's logo wallpaper (niri: hot-corners off has no analog). + misc = { + disable_hyprland_logo = true, + focus_on_activate = true, + }, +}) diff --git a/configs/fwbook/hypr/conf/inputs.lua b/configs/fwbook/hypr/conf/inputs.lua new file mode 100644 index 0000000..97b81b5 --- /dev/null +++ b/configs/fwbook/hypr/conf/inputs.lua @@ -0,0 +1,22 @@ +-- ========================= +-- Input +-- ========================= +-- Mirrors configs/niri/shared/general.kdl (touchpad tap + natural scroll) +-- and kb_layout = us. `tap-to-click` is hyphenated in Hyprland, so it uses +-- bracket-key notation. + +hl.config({ + input = { + kb_layout = "us", + follow_mouse = 1, + + touchpad = { + natural_scroll = 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" }) diff --git a/configs/fwbook/hypr/conf/keybindings.lua b/configs/fwbook/hypr/conf/keybindings.lua new file mode 100644 index 0000000..75727a6 --- /dev/null +++ b/configs/fwbook/hypr/conf/keybindings.lua @@ -0,0 +1,123 @@ +-- ========================= +-- Keybindings +-- ========================= +-- Mirrors configs/niri/shared/binds.kdl and configs/niri/noctalia/binds.kdl, +-- adapted to Hyprland's scrolling-layout dispatchers (hl.dsp.layout("...")). + +local mod = "SUPER" + +-- ========================= +-- General / Apps +-- ========================= +-- niri: Mod+Shift+H show-hotkey-overlay — no native Hyprland equivalent. +hl.bind(mod .. " + T", hl.dsp.exec_cmd("ghostty")) +hl.bind(mod .. " + Z", hl.dsp.exec_cmd("flatpak run app.zen_browser.zen")) +hl.bind(mod .. " + B", hl.dsp.exec_cmd("chromium")) +hl.bind(mod .. " + E", hl.dsp.exec_cmd("wofi-emoji")) +hl.bind(mod .. " + Q", hl.dsp.window.close()) + +-- ========================= +-- Navigation +-- ========================= +hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" })) +hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" })) +-- niri workspaces are vertical stacks; map Up/Down to workspace switching. +hl.bind(mod .. " + up", hl.dsp.focus({ workspace = "e-1" })) +hl.bind(mod .. " + down", hl.dsp.focus({ workspace = "e+1" })) + +-- niri: toggle-overview — no native overview / no buildable plugin; cycle windows. +hl.bind(mod .. " + Tab", hl.dsp.window.cycle_next()) +-- niri: focus-monitor-next +hl.bind(mod .. " + SHIFT + Tab", hl.dsp.focus({ monitor = "+1" })) + +-- ========================= +-- Window Management +-- ========================= +-- niri swap-window-left/right -> scrolling swapcol +hl.bind(mod .. " + CTRL + right", hl.dsp.layout("swapcol r")) +hl.bind(mod .. " + CTRL + left", hl.dsp.layout("swapcol l")) +-- niri move-window-to-workspace-up/down (follow the window) +hl.bind(mod .. " + CTRL + up", hl.dsp.window.move({ workspace = "e-1", follow = true })) +hl.bind(mod .. " + CTRL + down", hl.dsp.window.move({ workspace = "e+1", follow = true })) + +-- niri: toggle-column-tabbed-display (closest: group/tab windows together) +hl.bind(mod .. " + W", hl.dsp.group.toggle()) +-- niri: maximize-column (fill screen, keep bar/margins) +hl.bind(mod .. " + F", hl.dsp.window.fullscreen({ mode = "maximized", action = "toggle" })) +-- niri: fullscreen-window (true fullscreen) +hl.bind(mod .. " + SHIFT + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" })) +-- niri: reset-window-height (scrolling has no per-window height; refit column) +hl.bind(mod .. " + CTRL + F", hl.dsp.layout("fit_into_view")) +-- niri: toggle-window-floating +hl.bind(mod .. " + V", hl.dsp.window.float({ action = "toggle" })) +-- niri: center-column (recenter focused column in view) +hl.bind(mod .. " + C", hl.dsp.layout("focus current")) + +-- ========================= +-- Resizing +-- ========================= +-- niri set-column-width -/+10% -> scrolling colresize +hl.bind(mod .. " + minus", hl.dsp.layout("colresize -0.1")) +hl.bind(mod .. " + equal", hl.dsp.layout("colresize +0.1")) +-- niri set-window-height -/+10% -> pixel delta (Lua resize takes px, not %) +hl.bind(mod .. " + SHIFT + minus", hl.dsp.window.resize({ x = 0, y = -50, relative = true })) +hl.bind(mod .. " + SHIFT + equal", hl.dsp.window.resize({ x = 0, y = 50, relative = true })) + +-- ========================= +-- Screenshots & Recording +-- ========================= +hl.bind("Print", hl.dsp.exec_cmd('grim -g "$(slurp)" - | satty -f -')) +hl.bind(mod .. " + P", hl.dsp.exec_cmd('grim -g "$(slurp)" - | satty -f -')) +hl.bind(mod .. " + R", hl.dsp.exec_cmd("~/.config/hypr/screen-record.sh")) + +-- ========================= +-- Session +-- ========================= +-- niri: Mod+Escape toggle-keyboard-shortcuts-inhibit — no native equivalent. +-- UWSM: use `uwsm stop` instead of the `exit` dispatcher (ordered shutdown). +hl.bind("CTRL + ALT + Delete", hl.dsp.exec_cmd("uwsm stop")) + +-- ========================= +-- Monitor Movement +-- ========================= +-- niri move-column-to-monitor-{down,left,right,up} +hl.bind(mod .. " + ALT + down", hl.dsp.window.move({ monitor = "d" })) +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" })) + +-- ========================= +-- Mouse drag (move / resize windows) +-- ========================= +hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- ========================= +-- Noctalia shell (mirrors configs/niri/noctalia/binds.kdl) +-- ========================= +hl.bind(mod .. " + Space", hl.dsp.exec_cmd("noctalia-shell ipc call launcher toggle")) +hl.bind(mod .. " + S", hl.dsp.exec_cmd("noctalia-shell ipc call controlCenter toggle")) +hl.bind(mod .. " + comma", hl.dsp.exec_cmd("noctalia-shell ipc call settings toggle")) + +-- Clipboard history +hl.bind(mod .. " + ALT + P", hl.dsp.exec_cmd('rofi -modi "clipboard:greenclip print" -show clipboard')) +-- Dismiss all notifications +hl.bind(mod .. " + ALT + L", hl.dsp.exec_cmd("noctalia-shell ipc call notifications dismissAll")) + +-- Media & brightness +hl.bind(mod .. " + SHIFT + up", hl.dsp.exec_cmd("noctalia-shell ipc call volume increase")) +hl.bind(mod .. " + SHIFT + down", hl.dsp.exec_cmd("noctalia-shell ipc call volume decrease")) +hl.bind(mod .. " + SHIFT + right", hl.dsp.exec_cmd("playerctl next")) +hl.bind(mod .. " + SHIFT + left", hl.dsp.exec_cmd("playerctl previous")) +hl.bind(mod .. " + SHIFT + Space", hl.dsp.exec_cmd("playerctl play-pause")) + +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("noctalia-shell ipc call volume increase"), { locked = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("noctalia-shell ipc call volume decrease"), { locked = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("noctalia-shell ipc call volume muteOutput"), { locked = true }) +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("noctalia-shell ipc call brightness increase"), { locked = true }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("noctalia-shell ipc call brightness decrease"), { locked = true }) diff --git a/configs/fwbook/hypr/conf/monitors.lua b/configs/fwbook/hypr/conf/monitors.lua new file mode 100644 index 0000000..2c5ccba --- /dev/null +++ b/configs/fwbook/hypr/conf/monitors.lua @@ -0,0 +1,23 @@ +-- ========================= +-- Monitors +-- ========================= +-- Translated from configs/niri/shared/outputs.kdl. + +-- Laptop internal panel +hl.monitor({ output = "eDP-1", mode = "2256x1504@60", position = "859x1080", scale = 1.5 }) + +-- Work monitor (ASUS VE278) +hl.monitor({ output = "desc:Ancor Communications Inc ASUS VE278 E5LMTF016849", mode = "1920x1080@60", position = "1027x0", scale = 1 }) + +-- Assorted external displays +hl.monitor({ output = "DP-9", mode = "1920x1080@74.97", position = "0x0", scale = 1 }) +hl.monitor({ output = "desc:Samsung Electric Company S22R35x H4TR604392", mode = "1920x1080@60", position = "106x0", scale = 1 }) +hl.monitor({ output = "DP-10", mode = "1920x1080@74.97", position = "1920x0", scale = 1 }) +hl.monitor({ output = "desc:Samsung Electric Company S22R35x H4TR503886", mode = "1920x1080@60", position = "2026x0", scale = 1 }) +hl.monitor({ output = "desc:PNP(GWD) ARZOPA", mode = "1920x1080@60", position = "2860x1080", scale = 1 }) +hl.monitor({ output = "DP-2", mode = "1920x1080@60", position = "3115x1504", scale = 1 }) +hl.monitor({ output = "desc:Dell Inc. DELL SE3223Q 1WDWKK3", mode = "preferred", position = "4780x0", scale = 2 }) +hl.monitor({ output = "desc:Dell Inc. DELL SE3223Q 1TRXKK3", mode = "preferred", position = "6700x0", scale = 2 }) + +-- Fallback for anything not explicitly configured above +hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "auto" }) diff --git a/configs/fwbook/hypr/conf/window-rules.lua b/configs/fwbook/hypr/conf/window-rules.lua new file mode 100644 index 0000000..f339697 --- /dev/null +++ b/configs/fwbook/hypr/conf/window-rules.lua @@ -0,0 +1,13 @@ +-- ========================= +-- Window Rules +-- ========================= +-- Rounding/clip is handled globally in general.lua (decoration.rounding = 12), +-- mirroring the niri window-rule. Below: float the small control/dialog +-- utilities so they don't tile. + +hl.window_rule({ name = "float-pavucontrol", match = { class = "^(pavucontrol)$" }, float = true }) +hl.window_rule({ name = "float-blueman", match = { class = "^(blueman-manager)$" }, float = true }) +hl.window_rule({ name = "float-calculator", match = { class = "^(org.gnome.Calculator)$" }, float = true }) +hl.window_rule({ name = "float-portal-gtk", match = { class = "^(xdg-desktop-portal-gtk)$" }, float = true }) +hl.window_rule({ name = "float-open-file", match = { title = "^(Open File)$" }, float = true }) +hl.window_rule({ name = "float-save-file", match = { title = "^(Save File)$" }, float = true }) diff --git a/configs/fwbook/hypr/dms/colors.lua b/configs/fwbook/hypr/dms/colors.lua new file mode 100644 index 0000000..c040437 --- /dev/null +++ b/configs/fwbook/hypr/dms/colors.lua @@ -0,0 +1,27 @@ +-- Auto-generated by DMS Matugen hook — do not edit manually. +-- Remove require("dms.colors") from hyprland.lua to override. + +hl.config({ + general = { + col = { + active_border = "rgb(ff6d00)", + inactive_border = "rgb(a08d85)", + }, + }, + group = { + col = { + border_active = "rgb(ff6d00)", + border_inactive = "rgb(a08d85)", + border_locked_active = "rgb(f2b8b5)", + border_locked_inactive = "rgb(a08d85)", + }, + groupbar = { + col = { + active = "rgb(ff6d00)", + inactive = "rgb(a08d85)", + locked_active = "rgb(f2b8b5)", + locked_inactive = "rgb(a08d85)", + }, + }, + }, +}) diff --git a/configs/fwbook/hypr/hyprland.conf b/configs/fwbook/hypr/hyprland.conf deleted file mode 100644 index a46c29b..0000000 --- a/configs/fwbook/hypr/hyprland.conf +++ /dev/null @@ -1,26 +0,0 @@ -# ========================= -# Hyprland (fwbook) -# ========================= -# Mirrors the niri setup in configs/niri, adapted to Hyprland's native -# scrolling layout + the noctalia shell. This directory is symlinked to -# ~/.config/hypr by the skyg hyprland module -# (skyg.nixos.desktop.tiler.hyprland), defaulting to configs/${hostName}/hypr. - -# ========================= -# Variables -# ========================= -$mainMod = SUPER -$terminal = ghostty -$browser = chromium -$fileManager = nautilus - -# ========================= -# Sourced configuration -# ========================= -source = ~/.config/hypr/hyprland.d/env.conf -source = ~/.config/hypr/hyprland.d/general.conf -source = ~/.config/hypr/hyprland.d/monitors.conf -source = ~/.config/hypr/hyprland.d/inputs.conf -source = ~/.config/hypr/hyprland.d/window-rules.conf -source = ~/.config/hypr/hyprland.d/keybindings.conf -source = ~/.config/hypr/hyprland.d/autostart.conf diff --git a/configs/fwbook/hypr/hyprland.d/autostart.conf b/configs/fwbook/hypr/hyprland.d/autostart.conf deleted file mode 100644 index 3291bc6..0000000 --- a/configs/fwbook/hypr/hyprland.d/autostart.conf +++ /dev/null @@ -1,11 +0,0 @@ -# ========================= -# Autostart -# ========================= -# Launched via UWSM (`uwsm app --`) so processes land in the correct -# systemd scope for the graphical session. - -# noctalia shell (bar / launcher / control center / notifications) -exec-once = uwsm app -- noctalia-shell - -# Idle management -exec-once = uwsm app -- hypridle diff --git a/configs/fwbook/hypr/hyprland.d/env.conf b/configs/fwbook/hypr/hyprland.d/env.conf deleted file mode 100644 index adbb4ca..0000000 --- a/configs/fwbook/hypr/hyprland.d/env.conf +++ /dev/null @@ -1,11 +0,0 @@ -# ========================= -# Environment -# ========================= -# Mirrors the environment block in configs/niri/shared/general.kdl. - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 -env = NIXOS_OZONE_WL,1 -env = QT_QPA_PLATFORM,wayland -env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 -env = ELECTRON_OZONE_PLATFORM_HINT,auto diff --git a/configs/fwbook/hypr/hyprland.d/general.conf b/configs/fwbook/hypr/hyprland.d/general.conf deleted file mode 100644 index 34dac4f..0000000 --- a/configs/fwbook/hypr/hyprland.d/general.conf +++ /dev/null @@ -1,36 +0,0 @@ -# ========================= -# General / Layout -# ========================= -# Native scrolling layout (Hyprland 0.54+) — no plugins needed. This mirrors -# niri's scrollable-tiling model. Gaps/border/corner-radius mirror -# configs/niri/shared/layout.kdl (gaps 5, border 2, corner radius 12). - -general { - gaps_in = 5 - gaps_out = 5 - border_size = 2 - layout = scrolling - resize_on_border = true -} - -decoration { - rounding = 12 -} - -# https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/ -scrolling { - # Default column width as a fraction of the screen [0.1 - 1.0]. - column_width = 0.5 - # A lone column fills the screen (matches niri's single-column feel). - fullscreen_on_one_column = true - # Center the focused column when it comes into view (niri-like). - focus_fit_method = 0 - follow_focus = true - explicit_column_widths = 0.333, 0.5, 0.667, 1.0 -} - -# Disable Hyprland's built-in hot-corner-esque behaviours (niri: hot-corners off). -misc { - disable_hyprland_logo = true - focus_on_activate = true -} diff --git a/configs/fwbook/hypr/hyprland.d/inputs.conf b/configs/fwbook/hypr/hyprland.d/inputs.conf deleted file mode 100644 index 11126c3..0000000 --- a/configs/fwbook/hypr/hyprland.d/inputs.conf +++ /dev/null @@ -1,26 +0,0 @@ -# ========================= -# Input -# ========================= -# Mirrors configs/niri/shared/general.kdl (touchpad tap + natural scroll) -# and the old inputs (kb_layout = us). - -input { - kb_layout = us - follow_mouse = 1 - - touchpad { - natural_scroll = true - tap-to-click = true - disable_while_typing = true - } - - touchscreen { - transform = 0 - } -} - -# Three-finger horizontal swipe to move across workspaces (niri-like). -gestures { - workspace_swipe = true - workspace_swipe_fingers = 3 -} diff --git a/configs/fwbook/hypr/hyprland.d/keybindings.conf b/configs/fwbook/hypr/hyprland.d/keybindings.conf deleted file mode 100644 index 6490899..0000000 --- a/configs/fwbook/hypr/hyprland.d/keybindings.conf +++ /dev/null @@ -1,123 +0,0 @@ -# ========================= -# Keybindings -# ========================= -# Mirrors configs/niri/shared/binds.kdl and configs/niri/noctalia/binds.kdl, -# adapted to Hyprland's scrolling-layout dispatchers (layoutmsg ...). - -$mainMod = SUPER - -# ========================= -# General / Apps -# ========================= -# niri: Mod+Shift+H show-hotkey-overlay — no native Hyprland equivalent. -# bind = $mainMod SHIFT, H, exec, -bind = $mainMod, T, exec, $terminal -bind = $mainMod, B, exec, $browser -bind = $mainMod, E, exec, wofi-emoji -bind = $mainMod, Q, killactive - -# ========================= -# Navigation -# ========================= -bind = $mainMod, Left, movefocus, l -bind = $mainMod, Right, movefocus, r -# niri workspaces are vertical stacks; map Up/Down to workspace switching. -bind = $mainMod, Up, workspace, e-1 -bind = $mainMod, Down, workspace, e+1 - -# niri: toggle-overview — no native Hyprland overview (and no maintained plugin -# that builds against current Hyprland), so fall back to cycling windows. -bind = $mainMod, Tab, cyclenext -# niri: focus-monitor-next -bind = $mainMod SHIFT, Tab, focusmonitor, +1 - -# ========================= -# Window Management -# ========================= -# niri swap-window-left/right -> scrolling swapcol -bind = $mainMod CTRL, Right, layoutmsg, swapcol r -bind = $mainMod CTRL, Left, layoutmsg, swapcol l -# niri move-window-to-workspace-up/down -bind = $mainMod CTRL, Up, movetoworkspace, e-1 -bind = $mainMod CTRL, Down, movetoworkspace, e+1 - -# niri: toggle-column-tabbed-display (closest: group/tab windows together) -bind = $mainMod, W, togglegroup -# niri: maximize-column (fill screen, keep bar) -bind = $mainMod, F, fullscreen, 1 -# niri: fullscreen-window (true fullscreen) -bind = $mainMod SHIFT, F, fullscreen, 0 -# niri: reset-window-height (scrolling has no per-window height; refit column) -bind = $mainMod CTRL, F, layoutmsg, fit_into_view -# niri: toggle-window-floating -bind = $mainMod, V, togglefloating -# niri: center-column (recenter focused column in view) -bind = $mainMod, C, layoutmsg, focus current - -# ========================= -# Resizing -# ========================= -# niri set-column-width -/+10% -> scrolling colresize -bind = $mainMod, Minus, layoutmsg, colresize -0.1 -bind = $mainMod, Equal, layoutmsg, colresize +0.1 -# niri set-window-height -/+10% -bind = $mainMod SHIFT, Minus, resizeactive, 0 -10% -bind = $mainMod SHIFT, Equal, resizeactive, 0 +10% - -# ========================= -# Screenshots & Recording -# ========================= -bind = , Print, exec, grim -g "$(slurp)" - | satty -f - -bind = $mainMod, P, exec, grim -g "$(slurp)" - | satty -f - -bind = $mainMod, R, exec, ~/.config/hypr/screen-record.sh - -# ========================= -# Session -# ========================= -# niri: Mod+Escape toggle-keyboard-shortcuts-inhibit — no native equivalent. -bind = CTRL ALT, Delete, exit - -# ========================= -# Monitor Movement -# ========================= -# niri move-column-to-monitor-{down,left,right,up} -bind = $mainMod ALT, Down, movewindow, mon:d -bind = $mainMod ALT, Left, movewindow, mon:l -bind = $mainMod ALT, Right, movewindow, mon:r -bind = $mainMod ALT, Up, movewindow, mon:u - -# niri moved workspaces between monitors via touchpad scroll; approximate with -# Mod + mouse wheel (move current workspace to next/prev monitor). -bind = $mainMod, mouse_down, movecurrentworkspacetomonitor, +1 -bind = $mainMod, mouse_up, movecurrentworkspacetomonitor, -1 - -# ========================= -# Mouse drag (move / resize windows) -# ========================= -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -# ========================= -# Noctalia shell (mirrors configs/niri/noctalia/binds.kdl) -# ========================= -bind = $mainMod, Space, exec, noctalia-shell ipc call launcher toggle -bind = $mainMod, S, exec, noctalia-shell ipc call controlCenter toggle -bind = $mainMod, Comma, exec, noctalia-shell ipc call settings toggle - -# Clipboard history -bind = $mainMod ALT, P, exec, rofi -modi "clipboard:greenclip print" -show clipboard -# Dismiss all notifications -bind = $mainMod ALT, L, exec, noctalia-shell ipc call notifications dismissAll - -# Media & brightness -bind = $mainMod SHIFT, Up, exec, noctalia-shell ipc call volume increase -bind = $mainMod SHIFT, Down, exec, noctalia-shell ipc call volume decrease -bind = $mainMod SHIFT, Right, exec, playerctl next -bind = $mainMod SHIFT, Left, exec, playerctl previous -bind = $mainMod SHIFT, Space, exec, playerctl play-pause - -bindl = , XF86AudioRaiseVolume, exec, noctalia-shell ipc call volume increase -bindl = , XF86AudioLowerVolume, exec, noctalia-shell ipc call volume decrease -bindl = , XF86AudioMute, exec, noctalia-shell ipc call volume muteOutput -bindl = , XF86MonBrightnessUp, exec, noctalia-shell ipc call brightness increase -bindl = , XF86MonBrightnessDown, exec, noctalia-shell ipc call brightness decrease diff --git a/configs/fwbook/hypr/hyprland.d/monitors.conf b/configs/fwbook/hypr/hyprland.d/monitors.conf deleted file mode 100644 index d7d997e..0000000 --- a/configs/fwbook/hypr/hyprland.d/monitors.conf +++ /dev/null @@ -1,24 +0,0 @@ -# ========================= -# Monitors -# ========================= -# Translated from configs/niri/shared/outputs.kdl. -# Format: monitor = name-or-desc, resolution@hz, positionXxY, scale - -# Laptop internal panel -monitor = eDP-1, 2256x1504@60, 859x1080, 1.5 - -# Work monitor (ASUS VE278) -monitor = desc:Ancor Communications Inc ASUS VE278 E5LMTF016849, 1920x1080@60, 1027x0, 1 - -# Assorted external displays -monitor = DP-9, 1920x1080@74.97, 0x0, 1 -monitor = desc:Samsung Electric Company S22R35x H4TR604392, 1920x1080@60, 106x0, 1 -monitor = DP-10, 1920x1080@74.97, 1920x0, 1 -monitor = desc:Samsung Electric Company S22R35x H4TR503886, 1920x1080@60, 2026x0, 1 -monitor = desc:PNP(GWD) ARZOPA, 1920x1080@60, 2860x1080, 1 -monitor = DP-2, 1920x1080@60, 3115x1504, 1 -monitor = desc:Dell Inc. DELL SE3223Q 1WDWKK3, preferred, 4780x0, 2 -monitor = desc:Dell Inc. DELL SE3223Q 1TRXKK3, preferred, 6700x0, 2 - -# Fallback for anything not explicitly configured above -monitor = , preferred, auto, auto diff --git a/configs/fwbook/hypr/hyprland.d/window-rules.conf b/configs/fwbook/hypr/hyprland.d/window-rules.conf deleted file mode 100644 index 5ba98d0..0000000 --- a/configs/fwbook/hypr/hyprland.d/window-rules.conf +++ /dev/null @@ -1,13 +0,0 @@ -# ========================= -# Window Rules -# ========================= -# Rounding/clip is handled globally in general.conf (decoration.rounding = 12), -# mirroring the niri window-rule (geometry-corner-radius 12, clip-to-geometry). -# Below: float the small control/dialog utilities so they don't tile. - -windowrulev2 = float, class:^(pavucontrol)$ -windowrulev2 = float, class:^(blueman-manager)$ -windowrulev2 = float, class:^(org.gnome.Calculator)$ -windowrulev2 = float, title:^(Open File)$ -windowrulev2 = float, title:^(Save File)$ -windowrulev2 = float, class:^(xdg-desktop-portal-gtk)$ diff --git a/configs/fwbook/hypr/hyprland.lua b/configs/fwbook/hypr/hyprland.lua new file mode 100644 index 0000000..676e941 --- /dev/null +++ b/configs/fwbook/hypr/hyprland.lua @@ -0,0 +1,19 @@ +-- ========================= +-- Hyprland (fwbook) +-- ========================= +-- Lua config (Hyprland 0.55+; hyprlang is deprecated). Mirrors the niri setup +-- in configs/niri, adapted to Hyprland's native scrolling layout + the noctalia +-- shell. This directory is symlinked to ~/.config/hypr by the skyg hyprland +-- module (skyg.nixos.desktop.tiler.hyprland), defaulting to +-- configs/${hostName}/hypr. +-- +-- Split across conf/*.lua and pulled in with require(). The folder is named +-- `conf` (not `hyprland.d`) because require() treats `.` as a path separator. + +require("conf/env") +require("conf/general") +require("conf/monitors") +require("conf/inputs") +require("conf/window-rules") +require("conf/keybindings") +require("conf/autostart")