Files
karim 05f0faa500 tanin-eww skel: disable niri hot corner, bind Overview to Mod+Q
Ports tonight's live config.kdl fixes into the ISO/fresh-install niri
template so new TANINUX installs get them too, not just this machine:
- gestures { hot-corners { off } }: the native top-left hot corner has no
  way to know about a centered multi-monitor layout, so approaching it lets
  the cursor slide onto a neighboring output before the corner reacts — and
  it fired even under fullscreen games. TANINUX already ships its own
  configurable Overview trigger (Settings > Display), so the native corner
  is pure liability with no unique value.
- Mod+Q { toggle-overview; }: this config's binds{} replaces niri's
  defaults wholesale rather than merging, so niri's built-in Mod+O binding
  never actually existed here. Q was free (W is close-window).
2026-07-13 14:22:06 +02:00

244 lines
9.4 KiB
KDL

// niri config — ported from the Hyprland/eww setup.
// Docs: https://niri-wm.github.io/niri/ · validate with `niri validate`.
// Native niri hot corner (top-left) deaktiviert: bei einem zentrierten
// Multi-Monitor-Layout gibt es keinen physischen "Rand", der ein Abrutschen
// auf den Nachbarschirm verhindert — der Cursor rutscht beim Ansteuern der
// Ecke auf das links liegende Display, bevor die Ecke selbst reagiert.
// Zusätzlich reagierte die Ecke ungewollt auch über Fullscreen-Spielen.
// TANINUX stellt einen eigenen, konfigurierbaren Overview-Trigger bereit
// (Settings > Display > Overview trigger); Overview per Tastatur ist Mod+Q.
gestures {
hot-corners {
off
}
}
input {
keyboard {
xkb {
layout "ch"
}
numlock
}
touchpad {
tap
}
mouse {}
}
// Outputs — scale 1.25 like the Hyprland setup. Mode is pinned explicitly:
// niri's "preferred" mode on DP-3 is only 60 Hz, so omitting it left the
// monitor at 59.951 Hz. We force the full 143.973 Hz panel rate (gaming).
// Positions are left to niri's auto-placement.
output "DP-3" {
scale 1.25
mode "2560x1440@143.973"
}
output "HDMI-A-1" {
scale 1.25
}
layout {
gaps 10
center-focused-column "never"
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
default-column-width { proportion 0.5; }
// Fuji accent on the focus ring. The active-color tracks TANINUX's accent
// (gui.json accent_hex, lightened to match eww's $accent) — patched in place
// by scripts/accent.sh; the trailing marker is how that script finds it.
focus-ring {
width 3
active-color "#a6a2bd" // accent (managed by scripts/accent.sh)
inactive-color "#505050"
}
border {
off
}
// Subtle window shadow for depth.
shadow {
on
softness 20
spread 3
offset x=0 y=4
color "#00000070"
}
}
// ---- autostart ------------------------------------------------------------
// Bring up the systemd user session so portals (dark mode via
// org.freedesktop.portal.Settings) and TANINUX user services start.
spawn-at-startup "dbus-update-activation-environment" "--systemd" "--all"
spawn-at-startup "systemctl" "--user" "start" "tanin-session.target"
spawn-at-startup "/bin/sh" "-c" "$HOME/.config/eww/launch.sh"
spawn-at-startup "waypaper" "--restore"
spawn-at-startup "/bin/sh" "-c" "$HOME/.config/eww/scripts/overview-backdrop.sh start"
spawn-at-startup "wlsunset" "-l" "47" "-L" "8.3" "-d" "600" "-t" "4000" "-T" "6500"
spawn-at-startup "nm-applet"
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
spawn-at-startup "nextcloud" "--background"
hotkey-overlay {
skip-at-startup
}
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
animations {
// On by default. Uncomment to disable everything:
// off
}
// Ask apps to drop their client-side decorations (title/header bars); niri then
// draws only its own border/focus-ring. Apps that honour the protocol lose the
// top bar. (Some GTK apps ignore it and keep their headerbar — that's the app.)
prefer-no-csd
// Rounded corners for all windows.
window-rule {
geometry-corner-radius 14
clip-to-geometry true
}
// ---- Gaming: Spiele direkt im echten Vollbild öffnen ----------------------
// Steam/Proton-Titel (app-id "steam_app_<id>") und gamescope gehen sofort
// fullscreen auf — ohne Gaps, Rundungen oder geometry-clip (würde sonst die
// Render-Surface beschneiden). Manuell jederzeit mit Mod+Shift+F umschaltbar.
window-rule {
match app-id="^steam_app_"
match app-id="^gamescope$"
open-fullscreen true
geometry-corner-radius 0
clip-to-geometry false
}
// ---- geblurrtes Wallpaper im Overview-Backdrop ----------------------------
// Zwei Wallpaper-Surfaces:
// * swaybg (namespace "wallpaper") -> scharf auf dem Desktop (waypaper)
// * awww (namespace "awww-daemon") -> geblurrte Kopie, hier per
// place-within-backdrop in den Overview-Backdrop hinter die Workspaces
// verschoben (auf dem Desktop dadurch unsichtbar).
// Die Blur-Kopie erzeugt ~/.config/eww/scripts/overview-backdrop.sh; gestartet
// per spawn-at-startup oben, neu erzeugt per waypaper post_command.
layer-rule {
match namespace="^awww-daemon$"
place-within-backdrop true
}
// ---- eww frosted-glass / effects (enable after first boot) ----------------
// niri's layer-shell effects are version-sensitive; once niri runs we verify the
// real namespace with `niri msg --json layers` and enable blur/rounding/shadow.
// /-layer-rule {
// match namespace="^gtk-layer-shell$"
// geometry-corner-radius 14
// shadow { on; softness 8; spread 0; offset x=0 y=2; color "#00000088"; }
// }
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
// --- launchers / apps (Hyprland muscle memory) ---
Mod+Backspace hotkey-overlay-title="Terminal: kitty" { spawn "kitty"; }
Mod+T hotkey-overlay-title="Terminal: kitty" { spawn "kitty"; }
Mod+E hotkey-overlay-title="Files: nautilus" { spawn "nautilus"; }
Mod+Space hotkey-overlay-title="Apps: Spotlight" { spawn-sh "$HOME/.config/eww/scripts/spotlight.sh open"; }
Mod+C hotkey-overlay-title="Calc: rofi" { spawn-sh "rofi -show calc"; }
// Overview: niri ships this on Mod+O by default, but our binds{} here
// REPLACES niri's defaults entirely (not merged) — so Mod+O never
// actually exists in this config. Mod+Q was free (Mod+W is
// close-window, Hyprland muscle memory), so Overview lives there.
Mod+Q repeat=false hotkey-overlay-title="Overview" { toggle-overview; }
// --- eww panels ---
Mod+A hotkey-overlay-title="Control Center" { spawn-sh "$HOME/.config/eww/scripts/panel.sh toggle control-center"; }
Mod+N hotkey-overlay-title="Calendar" { spawn-sh "$HOME/.config/eww/scripts/panel.sh toggle calendar"; }
Mod+Shift+R hotkey-overlay-title="Restart bar" { spawn-sh "$HOME/.config/eww/launch.sh"; }
// Panic-close: dismiss any open/stuck eww overlay (niri has no global Escape
// bind; a stuck :focusable spotlight would otherwise hold the keyboard).
Mod+Escape hotkey-overlay-title="Close overlays" { spawn-sh "$HOME/.config/eww/scripts/dismiss.sh"; }
// --- window management ---
Mod+W { close-window; }
Mod+F { toggle-window-floating; }
Mod+Shift+F { fullscreen-window; }
Mod+M { maximize-column; }
Mod+V { switch-focus-between-floating-and-tiling; }
Mod+R { switch-preset-column-width; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
// --- focus (arrows + hjkl) ---
Mod+Left { focus-column-left; }
Mod+Right { focus-column-right; }
Mod+Up { focus-window-up; }
Mod+Down { focus-window-down; }
Mod+H { focus-column-left; }
Mod+L { focus-column-right; }
Mod+K { focus-window-up; }
Mod+J { focus-window-down; }
// --- move columns/windows ---
Mod+Ctrl+Left { move-column-left; }
Mod+Ctrl+Right { move-column-right; }
Mod+Ctrl+Up { move-window-up; }
Mod+Ctrl+Down { move-window-down; }
// --- workspaces (focus + move, Hyprland-style Shift to move) ---
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
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 1; }
Mod+Shift+2 { move-column-to-workspace 2; }
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+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
// --- multi-monitor ---
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Right { focus-monitor-right; }
// --- screenshots (Mod+Y = region, like hyprshot) ---
Mod+Y { screenshot; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
// --- media / volume / brightness (work when locked) ---
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; }
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "set" "5%+"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }
// --- session ---
Super+Alt+L { spawn "swaylock" "-f"; }
Mod+Shift+E { quit; }
Ctrl+Alt+Delete { quit; }
Mod+Shift+P { power-off-monitors; }
}