niri: window rules; use hyprlock; fix keymaps

This commit is contained in:
Oleksandr Smirnov 2025-06-15 20:15:31 +03:00
parent 9860b3c944
commit d9ffea63f1
No known key found for this signature in database

View file

@ -18,7 +18,6 @@ environment {
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input // https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input { input {
keyboard { keyboard {
numlock
xkb { xkb {
layout "us,ua" layout "us,ua"
options "grp:win_space_toggle,compose:ralt,ctrl:nocaps" options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
@ -30,7 +29,6 @@ input {
// dwtp // dwtp
// drag false // drag false
// drag-lock // drag-lock
// natural-scroll
accel-speed 0.1 accel-speed 0.1
accel-profile "adaptive" accel-profile "adaptive"
scroll-method "two-finger" scroll-method "two-finger"
@ -135,8 +133,9 @@ window-rule {
} }
window-rule { window-rule {
match app-id="org.gnome.Solanum" match app-id="org.gnome.Solanum";
exclude app-id="zen" default-floating-position relative-to="top-left" x=10 y=10
open-focused true
open-on-workspace "laptop" open-on-workspace "laptop"
} }
@ -173,7 +172,7 @@ window-rule {
} }
window-rule { window-rule {
match app-id="org.keepassxc.KeePassXC" match app-id="KeePassXC"
match app-id="obsidian" match app-id="obsidian"
match app-id="org.telegram.desktop" match app-id="org.telegram.desktop"
block-out-from "screen-capture" block-out-from "screen-capture"
@ -185,15 +184,16 @@ binds {
Mod+Return { spawn "kitty"; } Mod+Return { spawn "kitty"; }
Mod+Shift+Return { spawn "wofi" "--show" "drun"; } Mod+Shift+Return { spawn "wofi" "--show" "drun"; }
Mod+Shift+Escape { spawn "~/bin/wofi-power-menu" "niri";} Mod+Shift+Escape { spawn "~/bin/wofi-power-menu" "niri";}
Super+Alt+L { spawn "swaylock"; } // TODO: change to hyprlock Super+Alt+L { spawn "hyprlock"; }
// programs {{{ // programs {{{
Mod+Shift+a { spawn "anki"; } Mod+Shift+a { spawn "anki"; }
Mod+Shift+d { spawn "obsidian"; } Mod+Shift+d { spawn "obsidian"; }
// Mod+Shift+f { spawn "newsflash"; } // TODO: fix conflict Mod+Shift+f { spawn "newsflash"; }
Mod+Shift+s { spawn "spotify"; } Mod+Shift+s { spawn "spotify"; }
Mod+Shift+t { spawn "telegram-desktop"; } Mod+Shift+t { spawn "telegram-desktop"; }
Mod+Shift+w { spawn "zen-browser"; } Mod+Shift+w { spawn "zen-browser"; }
Mod+Shift+r { spawn "solanum"; }
// }}} // }}}
// func keys {{{ // func keys {{{
// audio // audio
@ -203,7 +203,7 @@ binds {
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; } XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; } XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "prev"; } XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
// brighthness // brighthness
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; } XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; } XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }
@ -253,8 +253,8 @@ binds {
Mod+Shift+4 { move-column-to-workspace 4; } Mod+Shift+4 { move-column-to-workspace 4; }
Mod+Shift+5 { move-column-to-workspace 5; } Mod+Shift+5 { move-column-to-workspace 5; }
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
// }}} // }}}
// }}} // }}}
} }