diff options
author | Vincent Ambo <tazjin@tvl.su> | 2024-09-05T08·09+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-09-05T22·10+0000 |
commit | 730d1cc77be5286b4fb62bc11c5a9f5d5d43dd25 (patch) | |
tree | 7bf9d4dd4e2ff927e392ef77b69908ea3e40f5ba /users | |
parent | 317962fbedc636aa0ffe392d968a8036eb0524a1 (diff) |
feat(tazjin/dotfiles): check in Niri configuration r/8655
Adds the current (fairly simple) Niri configuration, which is annealed from a few days of being poked constantly. This isn't yet deployed through home-manager or anything as I'm still doing stuff with it manually. Change-Id: I3dfcafb55d98d9655585d3128e1088fc13e60cc7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12434 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'users')
-rw-r--r-- | users/tazjin/dotfiles/default.nix | 1 | ||||
-rw-r--r-- | users/tazjin/dotfiles/niri.config.kdl | 150 |
2 files changed, 151 insertions, 0 deletions
diff --git a/users/tazjin/dotfiles/default.nix b/users/tazjin/dotfiles/default.nix index 9b783a9c857c..6a5f02d0182d 100644 --- a/users/tazjin/dotfiles/default.nix +++ b/users/tazjin/dotfiles/default.nix @@ -1,3 +1,4 @@ _: { dunstrc = ./dunstrc; + niri = ./niri.config.kdl; } diff --git a/users/tazjin/dotfiles/niri.config.kdl b/users/tazjin/dotfiles/niri.config.kdl new file mode 100644 index 000000000000..813a049f1b6f --- /dev/null +++ b/users/tazjin/dotfiles/niri.config.kdl @@ -0,0 +1,150 @@ +// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview + +input { + keyboard { + xkb { + layout "us,ru" + variant "hyper" + options "grp:win_space_toggle,compose:ralt,caps:hyper" + } + } + + touchpad { + tap + } +} + +layout { + gaps 14 + center-focused-column "never" + + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + + default-column-width {} + + focus-ring { + off + } + + border { + off + } +} + +spawn-at-startup "xwayland-satellite" +spawn-at-startup "xrandr --output eDP-1 --primary" +spawn-at-startup "wpaperd" "-d" +spawn-at-startup "waybar" +spawn-at-startup "systemctl --user start xss-lock" + +environment { + QT_QPA_PLATFORM "wayland" + DISPLAY ":0" +} + +hotkey-overlay { + skip-at-startup +} + +screenshot-path "~/screenshots/screenshot-%Y-%m-%d_%H-%M-%S.png" + +animations { + slowdown 0.3 +} + +binds { + Mod+Shift+Slash { show-hotkey-overlay; } + + Mod+T { spawn "emacsclient" "--no-wait" "--create-frame" "--eval" "(vterm)"; } + Mod+Shift+T { spawn "alacritty"; } // fallback terminal + Mod+D { spawn "xfce4-appfinder" "--disable-server"; } + Super+Alt+L { spawn "swaylock" "-fFkl" "-c" "#008080"; } + + // Volume control + 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"; } + + // Brightness control + XF86MonBrightnessUp allow-when-locked=true { spawn "light" "-A" "5"; } + Shift+XF86MonBrightnessUp allow-when-locked=true { spawn "light" "-A" "1"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "light" "-U" "5"; } + Shift+XF86MonBrightnessDown allow-when-locked=true { spawn "light" "-U" "1"; } + + Mod+Q { close-window; } + + Mod+Left { focus-column-left; } + Mod+Right { focus-column-right; } + Mod+Down { focus-column-right; } + Mod+Up { focus-column-left; } + Mod+J { focus-column-left; } + Mod+K { focus-column-right; } + Mod+L { focus-window-up; } + Mod+Semicolon { focus-window-down; } + + Mod+Ctrl+Left { move-column-left; } + Mod+Ctrl+Right { move-column-right; } + Mod+Ctrl+J { move-column-left; } + Mod+Ctrl+K { 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; } + + // Scroll (or move windows) between columns when holding the modifier down. + Mod+WheelScrollDown cooldown-ms=150 { focus-column-right; } + Mod+WheelScrollUp cooldown-ms=150 { focus-column-left; } + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-right; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-left; } + + Mod+Comma { consume-window-into-column; } + Mod+Period { expel-window-from-column; } + + // There are also commands that consume or expel a single window to the side. + // Mod+BracketLeft { consume-or-expel-window-left; } + // Mod+BracketRight { consume-or-expel-window-right; } + + Mod+R { switch-preset-column-width; } + Mod+Shift+R { reset-window-height; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + Mod+C { center-column; } + + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + + // Finer height adjustments when in column with other windows. + Mod+Shift+Minus { set-window-height "-2%"; } + Mod+Shift+Equal { set-window-height "+2%"; } + + Print { screenshot; } + Ctrl+Print { screenshot-screen; } + Alt+Print { screenshot-window; } + + Mod+Shift+E { quit; } +} |