aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.config/niri/config.kdl
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.config/niri/config.kdl')
-rw-r--r--dotfiles/.config/niri/config.kdl126
1 files changed, 57 insertions, 69 deletions
diff --git a/dotfiles/.config/niri/config.kdl b/dotfiles/.config/niri/config.kdl
index f3eb4db..bfec98b 100644
--- a/dotfiles/.config/niri/config.kdl
+++ b/dotfiles/.config/niri/config.kdl
@@ -65,50 +65,9 @@ cursor {
hide-when-typing
}
-
-// You can configure outputs by their name, which you can find
-// by running `niri msg outputs` while inside a niri instance.
-// The built-in laptop monitor is usually called "eDP-1".
-// Find more information on the wiki:
-// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
-// Remember to uncomment the node by removing "/-"!
-output "eDP-1" {
- // Uncomment this line to disable this output.
- // off
-
- background-color "#000000"
-
- // Resolution and, optionally, refresh rate of the output.
- // The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
- // If the refresh rate is omitted, niri will pick the highest refresh rate
- // for the resolution.
- // If the mode is omitted altogether or is invalid, niri will pick one automatically.
- // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
- // mode "1920x1080@120.030"
-
- // You can use integer or fractional scale, for example use 1.5 for 150% scale.
- // scale 2
-
- // Transform allows to rotate the output counter-clockwise, valid values are:
- // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
- // transform "normal"
-
- // Position of the output in the global coordinate space.
- // This affects directional monitor actions like "focus-monitor-left", and cursor movement.
- // The cursor can only move between directly adjacent outputs.
- // Output scale and rotation has to be taken into account for positioning:
- // outputs are sized in logical, or scaled, pixels.
- // For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
- // so to put another output directly adjacent to it on the right, set its x to 1920.
- // If the position is unset or results in an overlap, the output is instead placed
- // automatically.
- position x=0 y=800
-}
-
-output "DP-1" {
- background-color "#000000"
- position x=1536 y=0
- //mode "2560x1440@165.000"
+overview {
+ zoom 0.33
+ backdrop-color "#00807F"
}
// Settings that influence how windows are positioned and sized.
@@ -116,7 +75,9 @@ output "DP-1" {
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
- gaps 5
+ gaps 10
+
+ background-color "#00000000"
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
@@ -259,10 +220,24 @@ layout {
active-color "#99d0b5"
// inactive-color "gray"
active-gradient from="#1f5c9a" to="#99d0b5" angle=180
- inactive-gradient from="#252832" to="#676775" angle=180
+ inactive-gradient from="#000000" to="#252832" angle=180
}
}
+gestures {
+ dnd-edge-view-scroll {
+ trigger-width 200
+ delay-ms 200
+ max-speed 4000
+ }
+
+ dnd-edge-workspace-switch {
+ trigger-height 100
+ delay-ms 200
+ max-speed 4000
+ }
+}
+
// Add lines like this to spawn processes at startup.
// Note that running niri as a session supports xdg-desktop-autostart,
// which may be more convenient to use.
@@ -324,6 +299,8 @@ window-rule {
window-rule {
match app-id="GLava"
+ match app-id="com.libretro.RetroArch"
+
border { off; }
shadow { off; }
}
@@ -331,14 +308,21 @@ window-rule {
window-rule {
match app-id="Alacritty"
match app-id="Mattermost"
+ match app-id="org.telegram.desktop"
+
+ default-column-width { fixed 770; }
+}
- default-column-width { proportion 0.31; }
+window-rule {
+ match app-id="org.pwmt.zathura"
+
+ default-column-width { fixed 900; }
}
window-rule {
match app-id="org.qutebrowser.qutebrowser"
- default-column-width { proportion 0.69; }
+ default-column-width { fixed 1150; }
}
// Example: block out two password managers from screen capture.
@@ -383,9 +367,6 @@ spawn-at-startup "gsettings" "set" "org.gnome.desktop.interface" "color-scheme"
spawn-at-startup "swaybg" "-i" "/home/yaroslav/.config/wall1.png" "-m" "fill"
-// Just a nice jingle on startup because why not
-spawn-at-startup "canberra-gtk-play" "-i" "Oxygen-Sys-App-Positive"
-
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
@@ -403,7 +384,10 @@ binds {
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+Return { spawn "alacritty"; }
- Mod+D { spawn "rofi" "-show" "drun" "-sidebar-mode" "-modi" "drun,run,filebrowser,ssh,combi"; }
+ Mod+D {
+ spawn "rofi" "-show" "drun" "-sidebar-mode" "-modi" "window,drun,run,ssh,filebrowser";
+ }
+ Mod+S { toggle-overview; }
Mod+X { spawn "lock-color"; }
Mod+Shift+X { spawn "lock-color" "screenon"; }
@@ -516,22 +500,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=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+WheelScrollDown { focus-workspace-down; }
+ Mod+WheelScrollUp { focus-workspace-up; }
+ Mod+Ctrl+WheelScrollDown { move-column-to-workspace-down; }
+ Mod+Ctrl+WheelScrollUp { move-column-to-workspace-up; }
- 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; }
+ Mod+WheelScrollRight { focus-column-right; }
+ Mod+WheelScrollLeft { focus-column-left; }
+ Mod+Ctrl+WheelScrollRight { move-column-right; }
+ Mod+Ctrl+WheelScrollLeft { 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=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; }
+ Mod+Shift+WheelScrollDown { focus-column-right; }
+ Mod+Shift+WheelScrollUp { focus-column-left; }
+ Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
+ Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
@@ -598,8 +582,9 @@ binds {
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
- Mod+F { maximize-column; }
+ Mod+F { maximize-window-to-edges; }
Mod+Shift+F { fullscreen-window; }
+ Mod+Ctrl+F { maximize-column; }
Mod+C { center-column; }
// Finer width adjustments.
@@ -610,12 +595,12 @@ binds {
// * adjust width as a percentage of screen width: "-10%" or "+10%"
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
// set-column-width "100" will make the column occupy 200 physical screen pixels.
- Mod+Minus { set-column-width "-10%"; }
- Mod+Equal { set-column-width "+10%"; }
+ Mod+Minus { set-column-width "-5%"; }
+ Mod+Equal { set-column-width "+5%"; }
// Finer height adjustments when in column with other windows.
- Mod+Shift+Minus { set-window-height "-10%"; }
- Mod+Shift+Equal { set-window-height "+10%"; }
+ Mod+Shift+Minus { set-window-height "-5%"; }
+ Mod+Shift+Equal { set-window-height "+5%"; }
// Switch between floating and tiling.
Mod+Shift+Space { toggle-window-floating; }
@@ -666,6 +651,7 @@ binds {
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+B { spawn "sh" "-c" "$TERM -T 'calcurse' -e calcurse"; }
Mod+T { spawn "toggletorrent"; }
Mod+Ctrl+T { spawn "launch-transmission"; }
@@ -679,3 +665,5 @@ binds {
switch-events {
lid-close { spawn "swaysession" "suspend"; }
}
+
+include "local.kdl"