diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2024-11-01 11:22:14 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2024-11-01 11:22:14 +0300 |
commit | e84f606efa9aba1e4b6c1425d229e6d89b33223a (patch) | |
tree | 4e3604be54969b0133a33dd3c3df174a134f1512 /dotfiles/.config | |
parent | b490fe4bea23a89d85509403c9e5a86f2c16173e (diff) | |
download | swayrice-e84f606efa9aba1e4b6c1425d229e6d89b33223a.tar.gz swayrice-e84f606efa9aba1e4b6c1425d229e6d89b33223a.zip |
niri: added some more hotkeys from sway
Also added/modified some niri-specific hotkeys, and changed a bit other
config options.
Diffstat (limited to 'dotfiles/.config')
-rw-r--r-- | dotfiles/.config/niri/config.kdl | 101 |
1 files changed, 68 insertions, 33 deletions
diff --git a/dotfiles/.config/niri/config.kdl b/dotfiles/.config/niri/config.kdl index de5c15d..31b8f03 100644 --- a/dotfiles/.config/niri/config.kdl +++ b/dotfiles/.config/niri/config.kdl @@ -23,8 +23,8 @@ input { tap // dwt // dwtp - natural-scroll - // accel-speed 0.2 + // natural-scroll + accel-speed 0.2 // accel-profile "flat" // scroll-method "two-finger" // disabled-on-external-mouse @@ -33,8 +33,8 @@ input { mouse { // off // natural-scroll - // accel-speed 0.2 - // accel-profile "flat" + accel-speed -0.2 + accel-profile "flat" // scroll-method "no-scroll" } @@ -194,7 +194,7 @@ layout { // If you enable the border, you probably want to disable the focus ring. // off - width 4 + width 3 // active-color "#5b8277" // inactive-color "#4d4d42" @@ -248,7 +248,7 @@ animations { // off // Slow down all animations by this factor. Values below 1 speed them up instead. - slowdown 0.3 + slowdown 0.35 } // Window rules let you adjust behavior for individual windows. @@ -265,6 +265,13 @@ window-rule { default-column-width {} } +window-rule { + match app-id="GLava" + border { + off + } +} + // Example: block out two password managers from screen capture. // (This example rule is commented out with a "/-" in front.) /-window-rule { @@ -293,9 +300,11 @@ spawn-at-startup "mako" spawn-at-startup "setsessionenv" spawn-at-startup "bash" "-c" "GTK_IM_MODULE= fcitx5 -d" spawn-at-startup "xwayland-satellite" +spawn-at-startup "setsessionenv" environment { DISPLAY ":0" + TERM "alacritty" } spawn-at-startup "gsettings" "set" "org.gnome.desktop.interface" "gtk-theme" "Breeze" @@ -326,10 +335,6 @@ binds { Mod+X { spawn "lock-color"; } Mod+Shift+X { spawn "lock-color" "screenon"; } - // 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 "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; } @@ -337,24 +342,38 @@ binds { 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"; } + + Mod+Shift+F5 allow-when-locked=true { spawn "lmc" "back" "5"; } + Mod+F5 allow-when-locked=true { spawn "lmc" "prev"; } + Mod+F6 allow-when-locked=true { spawn "lmc" "toggle"; } + Mod+F7 allow-when-locked=true { spawn "lmc" "next"; } + Mod+Shift+F7 allow-when-locked=true { spawn "lmc" "forward" "5"; } + Mod+F8 allow-when-locked=true { spawn "playerctl" "loop" "Track"; } + Mod+Shift+F8 allow-when-locked=true { spawn "playerctl" "loop" "None"; } + + XF86MonBrightnessUp allow-when-locked=true { spawn "xbacklight" "-inc" "5"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "xbacklight" "-dec" "5"; } + Mod+Alt+Up allow-when-locked=true { spawn "xbacklight" "-inc" "5"; } + Mod+Alt+Down allow-when-locked=true { spawn "xbacklight" "-dec" "5"; } + Mod+Q { 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+H { focus-column-left-or-last; } Mod+J { focus-window-or-workspace-down; } Mod+K { focus-window-or-workspace-up; } - Mod+L { focus-column-right; } + Mod+L { focus-column-right-or-first; } Mod+Shift+Left { move-column-left; } Mod+Shift+Down { move-window-down; } Mod+Shift+Up { move-window-up; } Mod+Shift+Right { move-column-right; } Mod+Shift+H { move-column-left; } - Mod+Shift+J { move-window-down; } - Mod+Shift+K { move-window-up; } + Mod+Shift+J { move-window-down-or-to-workspace-down; } + Mod+Shift+K { move-window-up-or-to-workspace-up; } Mod+Shift+L { move-column-right; } // Alternative commands that move across workspaces when reaching @@ -423,22 +442,22 @@ binds { // 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=250 { focus-workspace-down; } - Mod+WheelScrollUp cooldown-ms=250 { focus-workspace-up; } - Mod+Ctrl+WheelScrollDown cooldown-ms=250 { move-column-to-workspace-down; } - Mod+Ctrl+WheelScrollUp cooldown-ms=250 { move-column-to-workspace-up; } + Mod+WheelScrollDown cooldown-ms=200 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=200 { focus-workspace-up; } + Mod+Ctrl+WheelScrollDown cooldown-ms=200 { move-column-to-workspace-down; } + Mod+Ctrl+WheelScrollUp cooldown-ms=200 { move-column-to-workspace-up; } - Mod+WheelScrollRight cooldown-ms=250 { focus-column-right; } - Mod+WheelScrollLeft cooldown-ms=250 { focus-column-left; } - Mod+Ctrl+WheelScrollRight cooldown-ms=250 { move-column-right; } - Mod+Ctrl+WheelScrollLeft cooldown-ms=250 { move-column-left; } + Mod+WheelScrollRight cooldown-ms=200 { focus-column-right; } + Mod+WheelScrollLeft cooldown-ms=200 { focus-column-left; } + Mod+Ctrl+WheelScrollRight cooldown-ms=200 { move-column-right; } + Mod+Ctrl+WheelScrollLeft cooldown-ms=200 { move-column-left; } // Usually scrolling up and down with Shift in applications results in // horizontal scrolling; these binds replicate that. - Mod+Shift+WheelScrollDown cooldown-ms=250 { focus-column-right; } - Mod+Shift+WheelScrollUp cooldown-ms=250 { focus-column-left; } - Mod+Ctrl+Shift+WheelScrollDown cooldown-ms=250 { move-column-right; } - Mod+Ctrl+Shift+WheelScrollUp cooldown-ms=250 { move-column-left; } + Mod+Shift+WheelScrollDown cooldown-ms=200 { focus-column-right; } + Mod+Shift+WheelScrollUp cooldown-ms=200 { focus-column-left; } + Mod+Ctrl+Shift+WheelScrollDown cooldown-ms=200 { move-column-right; } + Mod+Ctrl+Shift+WheelScrollUp cooldown-ms=200 { move-column-left; } // Similarly, you can bind touchpad scroll "ticks". // Touchpad scrolling is continuous, so for these binds it is split into @@ -466,6 +485,15 @@ binds { Mod+7 { focus-workspace 7; } Mod+8 { focus-workspace 8; } Mod+9 { focus-workspace 9; } + Mod+Shift+1 { move-window-to-workspace 1; } + Mod+Shift+2 { move-window-to-workspace 2; } + Mod+Shift+3 { move-window-to-workspace 3; } + Mod+Shift+4 { move-window-to-workspace 4; } + Mod+Shift+5 { move-window-to-workspace 5; } + Mod+Shift+6 { move-window-to-workspace 6; } + Mod+Shift+7 { move-window-to-workspace 7; } + Mod+Shift+8 { move-window-to-workspace 8; } + Mod+Shift+9 { move-window-to-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; } @@ -538,15 +566,22 @@ binds { Mod+Ctrl+Shift+Space { spawn "makoctl" "restore"; } // Menus/Quick actions - Mod+F1 { spawn "menuman"; } - Mod+F2 { spawn "menumako"; } - Mod+F3 { spawn "rofi" "-show" "display" "-modi" "display:rofidisplay"; } - Mod+F4 { spawn "menublk"; } - Mod+F10 { spawn "chcolors"; } + Mod+F1 { spawn "menuman"; } + Mod+F2 { spawn "menumako"; } + Mod+F3 { spawn "rofi" "-show" "display" "-modi" "display:rofidisplay"; } + Mod+F4 { spawn "menublk"; } + Mod+F10 { spawn "chcolors"; } Mod+Shift+N { spawn "networkmanager_dmenu"; } Mod+Shift+C { spawn "rofi" "-show" "calc" "-modi" "calc" "-no-show-match" "-no-sort"; } - Mod+Grave { spawn "rofi" "-show" "moji" "-modi" "moji:rofimoji"; } - Mod+Ctrl+M { spawn "rofi" "-show" "audio" "-modi" "audio:rofiaudio"; } + Mod+Grave { spawn "rofi" "-show" "moji" "-modi" "moji:rofimoji"; } + Mod+Ctrl+M { spawn "rofi" "-show" "audio" "-modi" "audio:rofiaudio"; } + + // Application shortcuts + Mod+M { spawn "sh" "-c" "$TERM -e ncmpcpp"; } + Mod+A { spawn "sh" "-c" "$TERM -T 'neomutt' -e neomutt"; } + Mod+N { spawn "sh" "-c" "$TERM -T 'newsboat' -e newsboat && killall -42 waybar"; } + Mod+T { spawn "toggletorrent"; } + Mod+Ctrl+T { spawn "launch-transmission"; } // Password manager Mod+apostrophe { spawn "menupass"; } |