Files
nixos-setup/configs/niri-config.kdl
T
2025-07-08 12:34:25 -04:00

193 lines
5.1 KiB
KDL

// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
touchpad {
tap
natural-scroll
}
}
spawn-at-startup "xwayland-satellite"
spawn-at-startup "ghostty"
spawn-at-startup "mako"
spawn-at-startup "nm-applet --indicator"
spawn-at-startup "waybar"
spawn-at-startup "waybar -c /home/ari/.config/waybar/bottom-config.jsonc"
environment {
QT_QPA_PLATFORM "wayland"
QT_WAYLAND_DISABLE_WINDOWDECORATION "1"
NIXOS_OZONE_WL "1"
DISPLAY ":0"
}
// =========================
// Outputs
// =========================
output "eDP-1" {
mode "1920x1080@120.030"
scale 1
transform "normal"
position x=0 y=0
}
// Portable Azopa
output "PNP(GWD) ARZOPA \\x15\\xd9F\\x1675US0000" {
mode "1920x1080@60"
scale 1
transform "normal"
position x=-1920 y=0
}
// Two Screens in Office
output "Samsung Electric Company S22R35x H4TR604392" {
mode "1920x1080@60.000"
scale 1
transform "normal"
position x=-960 y=-1080
}
output "Samsung Electric Company S22R35x H4TR503886" {
mode "1920x1080@60.000"
scale 1
transform "normal"
position x=980 y=-1080
}
// =========================
// General layout
// =========================
layout {
gaps 8
center-focused-column "never"
tab-indicator
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
default-column-width { proportion 0.5; }
focus-ring {
width 4
active-color "#7fc8ff"
inactive-color "#505050"
}
}
// =========================
// Screen Shots
// =========================
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
// =========================
// Window Rules
// =========================
// Open the Firefox picture-in-picture player as floating by default.
window-rule {
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
match app-id="org.pulseaudio.pavucontrol"
match app-id="Rofi"
match app-id="nm-connection-editor"
match app-id=".blueman-manager-wrapped"
open-floating true
default-floating-position x=0 y=25 relative-to="top"
default-window-height { proportion 0.5; }
default-column-width { proportion 0.25; }
}
window-rule {
match is-active=false
opacity 0.85
}
window-rule {
match app-id=r#"^Slack$"#
match app-id=r#"^code$"#
exclude app-id=r#"^code$"# title=r#"^Visual Studio Code$"#
open-fullscreen true
open-floating false
}
// =========================
// General Stuff
// =========================
switch-events {
lid-close { spawn "notify-send" "The laptop lid is closed!"; }
lid-open { spawn "notify-send" "The laptop lid is open!"; }
}
hotkey-overlay {
skip-at-startup
}
// =========================
// General binds
// =========================
binds {
Mod+Shift+H { show-hotkey-overlay; }
Mod+T { spawn "ghostty"; }
Mod+Space { spawn "fuzzel"; }
Mod+B { spawn "chromium"; }
Mod+E { spawn "wofi-emoji"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
XF86MonBrightnessUp { spawn "brightnessctl" "set" "10%+"; }
XF86MonBrightnessDown { spawn "brightnessctl" "set" "10%-"; }
Mod+Alt+L { spawn "/run/current-system/sw/bin/makoctl" "dismiss" "-a"; }
Mod+Left { focus-column-left; }
Mod+Down { focus-workspace-down; }
Mod+Up { focus-workspace-up; }
Mod+Right { focus-column-right; }
Mod+Shift+Tab { focus-monitor-next; }
Mod+Ctrl+Right { swap-window-right; }
Mod+Ctrl+Left { swap-window-left; }
Mod+Ctrl+Up { move-window-to-workspace-up; }
Mod+Ctrl+Down { move-window-to-workspace-down; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+Ctrl+F { reset-window-height; }
Mod+C { center-column; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
Mod+V { toggle-window-floating; }
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
Print { screenshot; }
Mod+P { screenshot; }
Ctrl+Alt+Delete { quit; }
Mod+Q { close-window; }
Mod+Ctrl+W { spawn "waybar"; }
Mod+Ctrl+B { spawn "waybar" "-c" "/home/ari/.config/waybar/bottom-config.jsonc"; }
}
/// Com Apps
workspace "chat" {
open-on-output "eDP-1"
}
spawn-at-startup "slack"
spawn-at-startup "signal-desktop"
spawn-at-startup "gnome-calendar"
window-rule {
match app-id=r#"^Slack$"#
match app-id=r#"^signal$"#
match app-id=r#"^org.gnome.Calendar$"#
open-on-workspace "chat"
open-fullscreen true
}
/// Coding
workspace "code"
window-rule {
match app-id=r#"^code$"#
match app-id=r#"^DBeaver$"#
open-on-workspace "code"
}