mirror of
https://github.com/Superredstone/nixos.git
synced 2026-06-17 15:24:39 +02:00
327 lines
12 KiB
KDL
327 lines
12 KiB
KDL
// This config is in the KDL format: https://kdl.dev
|
|
// "/-" comments out the following node.
|
|
// Check the wiki for a full description of the configuration:
|
|
// https://yalter.github.io/niri/Configuration:-Introduction
|
|
|
|
// Input device configuration.
|
|
// Find the full list of options on the wiki:
|
|
// https://yalter.github.io/niri/Configuration:-Input
|
|
input {
|
|
keyboard {
|
|
xkb {
|
|
layout "us,it"
|
|
}
|
|
|
|
numlock
|
|
}
|
|
touchpad {
|
|
tap
|
|
natural-scroll
|
|
accel-profile "flat"
|
|
}
|
|
|
|
mouse {
|
|
accel-speed 0.01
|
|
accel-profile "flat"
|
|
}
|
|
}
|
|
|
|
// https://yalter.github.io/niri/Configuration:-Outputs
|
|
output "eDP-1" {
|
|
mode "1920x1080@144.003"
|
|
transform "normal"
|
|
position x=0 y=0
|
|
}
|
|
|
|
output "Acer Technologies Acer KG241Q 0x93210922" {
|
|
mode "1920x1080@74.986"
|
|
transform "normal"
|
|
position x=1920 y=0
|
|
}
|
|
|
|
// https://yalter.github.io/niri/Configuration:-Layout
|
|
layout {
|
|
// Set gaps around windows in logical pixels.
|
|
gaps 16
|
|
|
|
// When to center a column when changing focus, options are:
|
|
// - "never", default behavior, focusing an off-screen column will keep at the left
|
|
// or right edge of the screen.
|
|
// - "always", the focused column will always be centered.
|
|
// - "on-overflow", focusing a column will center it if it doesn't fit
|
|
// together with the previously focused column.
|
|
center-focused-column "never"
|
|
|
|
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
|
|
preset-column-widths {
|
|
// Proportion sets the width as a fraction of the output width, taking gaps into account.
|
|
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
|
|
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
|
|
proportion 0.33333
|
|
proportion 0.5
|
|
proportion 0.66667
|
|
|
|
// Fixed sets the width in logical pixels exactly.
|
|
// fixed 1920
|
|
}
|
|
|
|
default-column-width { proportion 0.5; }
|
|
focus-ring {
|
|
// Uncomment this line to disable the focus ring.
|
|
// off
|
|
|
|
// How many logical pixels the ring extends out from the windows.
|
|
width 4
|
|
|
|
// Colors can be set in a variety of ways:
|
|
// - CSS named colors: "red"
|
|
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
|
|
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
|
|
|
|
// Color of the ring on the active monitor.
|
|
active-color "#7fc8ff"
|
|
|
|
// Color of the ring on inactive monitors.
|
|
//
|
|
// The focus ring only draws around the active window, so the only place
|
|
// where you can see its inactive-color is on other monitors.
|
|
inactive-color "#505050"
|
|
|
|
// You can also use gradients. They take precedence over solid colors.
|
|
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
|
|
// The angle is the same as in linear-gradient, and is optional,
|
|
// defaulting to 180 (top-to-bottom gradient).
|
|
// You can use any CSS linear-gradient tool on the web to set these up.
|
|
// Changing the color space is also supported, check the wiki for more info.
|
|
//
|
|
// active-gradient from="#80c8ff" to="#c7ff7f" angle=45
|
|
|
|
// You can also color the gradient relative to the entire view
|
|
// of the workspace, rather than relative to just the window itself.
|
|
// To do that, set relative-to="workspace-view".
|
|
//
|
|
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
|
}
|
|
|
|
border {
|
|
off
|
|
width 4
|
|
active-color "#ffc87f"
|
|
inactive-color "#505050"
|
|
urgent-color "#9b0000"
|
|
}
|
|
|
|
shadow {
|
|
on
|
|
softness 30
|
|
spread 5
|
|
offset x=0 y=5
|
|
color "#0007"
|
|
}
|
|
}
|
|
|
|
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
|
|
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
|
|
|
|
hotkey-overlay {
|
|
skip-at-startup
|
|
}
|
|
|
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
|
|
|
// https://yalter.github.io/niri/Configuration:-Animations
|
|
animations {
|
|
}
|
|
|
|
// https://yalter.github.io/niri/Configuration:-Window-Rules
|
|
|
|
// Open the Firefox picture-in-picture player as floating by default.
|
|
window-rule {
|
|
// This app-id regular expression will work for both:
|
|
// - host Firefox (app-id is "firefox")
|
|
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
|
|
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
|
open-floating true
|
|
}
|
|
|
|
window-rule {
|
|
geometry-corner-radius 12
|
|
clip-to-geometry true
|
|
}
|
|
|
|
layer-rule {
|
|
match namespace="^noctalia-overview*"
|
|
place-within-backdrop true
|
|
}
|
|
|
|
debug {
|
|
honor-xdg-activation-with-invalid-serial
|
|
}
|
|
|
|
spawn-at-startup "noctalia-shell"
|
|
|
|
binds {
|
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
|
|
|
Mod+T hotkey-overlay-title="Run Blackbox" { spawn "blackbox"; }
|
|
Mod+B hotkey-overlay-title="Run Firefox" { spawn "firefox"; }
|
|
Super+Alt+L hotkey-overlay-title="Lock the Screen" { spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; }
|
|
Mod+Space hotkey-overlay-title="Run application launcher" { spawn-sh "noctalia-shell ipc call launcher toggle"; }
|
|
|
|
XF86AudioRaiseVolume { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; }
|
|
XF86AudioLowerVolume { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; }
|
|
XF86AudioMute { spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; }
|
|
XF86AudioPause { spawn "noctalia-shell" "ipc" "call" "media" "pause"; }
|
|
XF86AudioPlay { spawn "noctalia-shell" "ipc" "call" "media" "playPause"; }
|
|
XF86AudioStop { spawn "noctalia-shell" "ipc" "call" "media" "stop"; }
|
|
XF86AudioPrev { spawn "noctalia-shell" "ipc" "call" "media" "previous"; }
|
|
XF86AudioNext { spawn "noctalia-shell" "ipc" "call" "media" "next"; }
|
|
XF86MonBrightnessUp { spawn "noctalia-shell" "ipc" "call" "brightness" "increase"; }
|
|
XF86MonBrightnessDown { spawn "noctalia-shell" "ipc" "call" "brightness" "decrease"; }
|
|
|
|
Mod+O repeat=false { toggle-overview; }
|
|
|
|
Mod+Shift+Q repeat=false { close-window; }
|
|
|
|
Mod+Left { focus-column-left; }
|
|
Mod+Down { focus-window-down; }
|
|
Mod+Up { focus-window-up; }
|
|
Mod+Right { focus-column-right; }
|
|
Mod+H { focus-column-left; }
|
|
Mod+J { focus-window-down; }
|
|
Mod+K { focus-window-up; }
|
|
Mod+L { focus-column-right; }
|
|
|
|
Mod+Ctrl+Left { move-column-left; }
|
|
Mod+Ctrl+Down { move-window-down; }
|
|
Mod+Ctrl+Up { move-window-up; }
|
|
Mod+Ctrl+Right { move-column-right; }
|
|
Mod+Ctrl+H { move-column-left; }
|
|
Mod+Ctrl+J { move-window-down; }
|
|
Mod+Ctrl+K { move-window-up; }
|
|
Mod+Ctrl+L { move-column-right; }
|
|
|
|
Mod+Home { focus-column-first; }
|
|
Mod+End { focus-column-last; }
|
|
Mod+Ctrl+Home { move-column-to-first; }
|
|
Mod+Ctrl+End { move-column-to-last; }
|
|
|
|
Mod+Shift+Left { focus-monitor-left; }
|
|
Mod+Shift+Down { focus-monitor-down; }
|
|
Mod+Shift+Up { focus-monitor-up; }
|
|
Mod+Shift+Right { focus-monitor-right; }
|
|
Mod+Shift+H { focus-monitor-left; }
|
|
Mod+Shift+J { focus-monitor-down; }
|
|
Mod+Shift+K { focus-monitor-up; }
|
|
Mod+Shift+L { focus-monitor-right; }
|
|
|
|
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
|
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
|
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
|
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
|
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
|
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
|
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
|
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
|
|
|
// Alternatively, there are commands to move just a single window:
|
|
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
|
// ...
|
|
|
|
// And you can also move a whole workspace to another monitor:
|
|
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
|
// ...
|
|
|
|
Mod+Page_Down { focus-workspace-down; }
|
|
Mod+Page_Up { focus-workspace-up; }
|
|
Mod+U { focus-workspace-down; }
|
|
Mod+I { focus-workspace-up; }
|
|
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
|
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
|
Mod+Ctrl+U { move-column-to-workspace-down; }
|
|
Mod+Ctrl+I { move-column-to-workspace-up; }
|
|
|
|
// Alternatively, there are commands to move just a single window:
|
|
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
|
// ...
|
|
|
|
Mod+Shift+Page_Down { move-workspace-down; }
|
|
Mod+Shift+Page_Up { move-workspace-up; }
|
|
Mod+Shift+U { move-workspace-down; }
|
|
Mod+Shift+I { move-workspace-up; }
|
|
|
|
// You can bind mouse wheel scroll ticks using the following syntax.
|
|
// These binds will change direction based on the natural-scroll setting.
|
|
//
|
|
// To avoid scrolling through workspaces really fast, you can use
|
|
// the cooldown-ms property. The bind will be rate-limited to this value.
|
|
// You can set a cooldown on any bind, but it's most useful for the wheel.
|
|
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
|
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
|
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
|
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
|
|
|
Mod+WheelScrollRight { focus-column-right; }
|
|
Mod+WheelScrollLeft { focus-column-left; }
|
|
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
|
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
|
|
|
// Usually scrolling up and down with Shift in applications results in
|
|
// horizontal scrolling; these binds replicate that.
|
|
Mod+Shift+WheelScrollDown { focus-column-right; }
|
|
Mod+Shift+WheelScrollUp { focus-column-left; }
|
|
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
|
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
|
|
|
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+Ctrl+1 { move-column-to-workspace 1; }
|
|
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
|
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
|
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
|
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
|
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
|
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
|
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
|
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
|
|
|
Mod+BracketLeft { consume-or-expel-window-left; }
|
|
Mod+BracketRight { consume-or-expel-window-right; }
|
|
|
|
Mod+Comma { consume-window-into-column; }
|
|
Mod+Period { expel-window-from-column; }
|
|
|
|
Mod+R { switch-preset-column-width; }
|
|
Mod+Shift+R { switch-preset-window-height; }
|
|
Mod+Ctrl+R { reset-window-height; }
|
|
Mod+F { maximize-column; }
|
|
Mod+Shift+F { fullscreen-window; }
|
|
Mod+Ctrl+F { expand-column-to-available-width; }
|
|
Mod+C { center-column; }
|
|
Mod+Ctrl+C { center-visible-columns; }
|
|
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+Shift+V { switch-focus-between-floating-and-tiling; }
|
|
Mod+W { toggle-column-tabbed-display; }
|
|
Print { screenshot; }
|
|
Ctrl+Print { screenshot-screen; }
|
|
Alt+Print { screenshot-window; }
|
|
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
|
Mod+Shift+E { quit; }
|
|
Ctrl+Alt+Delete { quit; }
|
|
Mod+Shift+P { power-off-monitors; }
|
|
}
|
|
|
|
include "./noctalia.kdl"
|
|
|