niri: personalize config and integrate swayosd

This commit is contained in:
Veneficium 2024-11-09 23:06:45 +01:00
parent b7dd890274
commit cd494f110d

View file

@ -15,11 +15,11 @@ input {
// For example: // For example:
// layout "us,ru" // layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps" // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
layout "it"
} }
track-layout "global"
} }
// Next sections include libinput settings.
// Omitting settings disables them, or leaves them at their default values.
touchpad { touchpad {
// off // off
tap tap
@ -28,34 +28,20 @@ input {
natural-scroll natural-scroll
// accel-speed 0.2 // accel-speed 0.2
// accel-profile "flat" // accel-profile "flat"
// scroll-method "two-finger" scroll-method "two-finger"
click-method "button-areas"
// disabled-on-external-mouse // disabled-on-external-mouse
} }
mouse { mouse {
// off // off
// natural-scroll // natural-scroll
// accel-speed 0.2 accel-speed -0.8
// accel-profile "flat" // accel-profile "flat"
// scroll-method "no-scroll" // scroll-method "no-scroll"
} }
trackpoint { focus-follows-mouse max-scroll-amount="5%"
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "on-button-down"
// scroll-button 273
// middle-emulation
}
// Uncomment this to make the mouse warp to the center of newly focused windows.
// warp-mouse-to-focus
// Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
// focus-follows-mouse max-scroll-amount="0%"
} }
// You can configure outputs by their name, which you can find // You can configure outputs by their name, which you can find
@ -95,19 +81,8 @@ input {
position x=1280 y=0 position x=1280 y=0
} }
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout { layout {
// Set gaps around windows in logical pixels.
gaps 16 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" center-focused-column "never"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between. // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
@ -144,8 +119,6 @@ layout {
// You can change how the focus ring looks. // You can change how the focus ring looks.
focus-ring { focus-ring {
// Uncomment this line to disable the focus ring.
// off
// How many logical pixels the ring extends out from the windows. // How many logical pixels the ring extends out from the windows.
width 4 width 4
@ -156,7 +129,7 @@ layout {
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others. // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
// Color of the ring on the active monitor. // Color of the ring on the active monitor.
active-color "#7fc8ff" active-color "#8d4eef"
// Color of the ring on inactive monitors. // Color of the ring on inactive monitors.
inactive-color "#505050" inactive-color "#505050"
@ -282,7 +255,7 @@ binds {
// Mod-Shift-/, which is usually the same as Mod-?, // Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys. // shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; } Mod+Shift+Backslash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker. // Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T { spawn "alacritty"; } Mod+T { spawn "alacritty"; }
@ -295,10 +268,14 @@ binds {
// Example volume keys mappings for PipeWire & WirePlumber. // Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked. // The allow-when-locked=true property makes them work even when the session is locked.
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; } XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume=raise"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; } XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume=lower"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume=mute-toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "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"; }
Mod+Q { close-window; } Mod+Q { close-window; }