niri: tweak config

This commit is contained in:
Veneficium 2024-12-05 22:23:31 +01:00
parent b7ccaf8285
commit 465bb62305

View file

@ -3,42 +3,24 @@
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// Input device configuration.
// Find the full list of options on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
keyboard {
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// For example:
// layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
layout "it"
options "caps:capslock"
}
track-layout "global"
}
touchpad {
// off
tap
// dwt
// dwtp
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
scroll-method "two-finger"
click-method "button-areas"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
accel-speed -0.8
// accel-profile "flat"
// scroll-method "no-scroll"
}
focus-follows-mouse max-scroll-amount="5%"
@ -81,6 +63,10 @@ input {
position x=1280 y=0
}
output "HDMI-A-1" {
variable-refresh-rate
}
layout {
gaps 16
center-focused-column "never"
@ -188,7 +174,7 @@ layout {
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
// prefer-no-csd
prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
@ -237,45 +223,24 @@ window-rule {
// Example: enable rounded corners for all windows.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
geometry-corner-radius 12
window-rule {
geometry-corner-radius 8
clip-to-geometry true
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Backslash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T { spawn "alacritty"; }
Mod+T { spawn "wezterm" "start"; }
Mod+D { spawn "fuzzel"; }
Super+Alt+L { spawn "swaylock"; }
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
// Note: the entire command goes as a single argument in the end.
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume=raise"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume=lower"; }
XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume=mute-toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume=mute-toggle"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "swayosd-client" "--brightness=raise"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "swayosd-client" "--brightness=lower"; }
Caps_Lock allow-when-locked=true { spawn "sh" "-c" "sleep 0.06 && swayosd-client --caps-lock"; }
Num_Lock allow-when-locked=true { spawn "sh" "-c" "sleep 0.06 && swayosd-client --num-lock"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioStop allow-when-locked=true { spawn "playerctl" "stop"; }