all repos

dotfiles @ e9f99e0af5e21840bd96fa9dd1488c6fd0a8ad82

i use rach linux btw

dotfiles/config/niri/config.kdl (view raw)

1
// vim: foldenable foldmethod=marker ts=2 sw=2
2
// auto start {{{
3
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
4
spawn-at-startup "~/.config/niri/waybar"
5
spawn-at-startup "dunst"
6
spawn-at-startup "hypridle" "-c" "/home/olex/.config/niri/hypridle.conf"
7
// }}}
8
// env {{{
9
environment {
10
  QT_QPA_PLATFORM "wayland;xcb"
11
  QT_WAYLAND_DISABLE_WINDOWDECORATION "1"
12
  MOZ_ENABLE_WAYLAND "1"
13
}
14
// }}}
15
// inputs {{{
16
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
17
input {
18
  keyboard {
19
    xkb {
20
      layout "us,ua"
21
      options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
22
    }
23
  }
24
  touchpad {
25
    tap
26
    dwt
27
    // dwtp
28
    // drag-lock
29
    accel-speed 0.2
30
    scroll-factor 1.5
31
    accel-profile "adaptive"
32
    click-method "clickfinger"
33
    scroll-method "two-finger"
34
  }
35
  focus-follows-mouse max-scroll-amount="25%"
36
  mouse {
37
    accel-speed 0.0
38
    accel-profile "flat"
39
  }
40
}
41
/// }}}
42
// Monitors {{{
43
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
44
output "HDMI-A-1" {
45
  focus-at-startup
46
  mode "1920x1080@100.00"
47
  scale 1
48
  transform "normal"
49
  position x=0 y=0
50
}
51
52
output "eDP-1" {
53
  focus-at-startup
54
  mode "1920x1080@60.001"
55
  scale 1
56
  transform "normal"
57
  position x=1920 y=144
58
}
59
/// }}}
60
// Layout {{{
61
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
62
layout {
63
  gaps 0
64
  center-focused-column "never"
65
  default-column-width { proportion 0.7; }
66
  border { off; }
67
  preset-column-widths {
68
    proportion 0.33333
69
    proportion 0.5
70
    proportion 0.66667
71
  }
72
  focus-ring {
73
    width 2
74
    active-color "#7aa2f7"
75
    inactive-color "#292e42"
76
  }
77
}
78
// }}}
79
// general {{{
80
// disables client-side decorrations if possible
81
prefer-no-csd
82
hotkey-overlay { skip-at-startup; }
83
animations { off; }
84
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
85
// }}}
86
// window/workspace rules {{{
87
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
88
// https://github.com/YaLTeR/niri/wiki/Configuration:-move-column-to-workspace
89
90
workspace "one" { open-on-output "HDMI-A-1"; }
91
workspace "two" { open-on-output "HDMI-A-1"; }
92
workspace "tri" { open-on-output "HDMI-A-1"; }
93
workspace "laptop" { open-on-output "eDP-1"; }
94
95
window-rule {
96
  match app-id="obsidian"
97
  match app-id="org.mozilla.Thunderbird"
98
  match app-id="org.telegram.desktop"
99
  open-on-workspace "one"
100
}
101
102
window-rule {
103
  match app-id="firefox"
104
  match app-id="brave-browser"
105
  open-on-workspace "two"
106
  open-focused true
107
}
108
109
window-rule {
110
  match app-id="spotify"
111
  match app-id="org.gnome.Snapshot"
112
  match app-id="org.gnome.Calendar"
113
  match app-id="org.keepassxc.KeePassXC"
114
  open-on-workspace "laptop"
115
}
116
117
window-rule {
118
  match app-id="org.gnome.Solanum"
119
  default-floating-position relative-to="top-left" x=10 y=10
120
  open-focused true
121
  open-floating true
122
  open-on-workspace "laptop"
123
}
124
125
window-rule {
126
  match app-id="Spotify"
127
  match app-id="spotify"
128
  match app-id="zen"
129
  match app-id="firefox"
130
  match app-id="Brave-browser"
131
  match app-id="brave-browser"
132
  match app-id="kitty"
133
  match app-id="ghostty"
134
  match app-id="obsidian"
135
  match app-id="Code"
136
  match app-id="Zed"
137
  open-maximized true
138
}
139
140
window-rule {
141
  match app-id="pavucontrol"
142
  match app-id="blueman-manager"
143
  match app-id="xdg-desktop-portal-gtk"
144
  open-floating true
145
}
146
147
window-rule {
148
  match app-id="KeePassXC"
149
  match app-id="obsidian"
150
  match app-id="org.telegram.desktop"
151
  block-out-from "screen-capture"
152
}
153
// }}}
154
// keybinds {{{
155
binds {
156
  Mod+d { spawn "dunstctl" "close"; }
157
  Mod+q { close-window; }
158
  Mod+Alt+l { spawn "hyprlock"; }
159
  Mod+Return { spawn "ghostty"; }
160
  Mod+Shift+Escape { spawn "~/bin/wofi-power-menu" "niri";}
161
  Mod+Shift+Return { spawn "wofi"; }
162
163
  // programs {{{
164
  Mod+Shift+a { spawn "anki"; }
165
  Mod+Shift+d { spawn "obsidian"; }
166
  Mod+Shift+f { spawn "newsflash"; }
167
  Mod+Shift+r { spawn "solanum"; }
168
  Mod+Shift+s { spawn "spotify"; }
169
  Mod+Shift+t { spawn "Telegram"; }
170
  Mod+Shift+w { spawn "brave"; }
171
  // }}}
172
  // func keys {{{
173
  // audio
174
  XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }
175
  XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
176
  XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
177
  XF86AudioNext        allow-when-locked=true { spawn "playerctl" "next"; }
178
  XF86AudioPlay        allow-when-locked=true { spawn "playerctl" "play-pause"; }
179
  XF86AudioPrev        allow-when-locked=true { spawn "playerctl" "previous"; }
180
  XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; }
181
  // brighthness
182
  XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }
183
  XF86MonBrightnessUp   allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; }
184
  // screen shots
185
  Print { screenshot; }
186
  Alt+Print { screenshot-window; }
187
  Ctrl+Print { screenshot-screen; }
188
  // }}}
189
  // wm {{{
190
  Mod+O repeat=false { toggle-overview; }
191
  Alt+Tab { focus-window-previous; }
192
193
  // window management {{{
194
  Mod+Ctrl+f { toggle-window-floating; }
195
196
  Mod+r { switch-preset-column-width; }
197
  Mod+t { maximize-column; }
198
  Mod+f { fullscreen-window; }
199
200
  Mod+Minus { set-column-width "-10%"; }
201
  Mod+Equal { set-column-width "+10%"; }
202
203
  Mod+h { focus-column-left; }
204
  Mod+j { focus-window-down; }
205
  Mod+k { focus-window-up; }
206
  Mod+l { focus-column-right; }
207
  Mod+Shift+h { move-column-left; }
208
  Mod+Shift+j { move-window-down; }
209
  Mod+Shift+k { move-window-up; }
210
  Mod+Shift+l { move-column-right; }
211
212
  // monitor navigation
213
  Mod+Comma { focus-monitor-left; }
214
  Mod+Period { focus-monitor-right; }
215
  Mod+Shift+Comma { move-column-to-monitor-left; }
216
  Mod+Shift+Period { move-column-to-monitor-right; }
217
218
  // workspaces
219
  Mod+1 { focus-workspace 1; }
220
  Mod+2 { focus-workspace 2; }
221
  Mod+3 { focus-workspace 3; }
222
  Mod+4 { focus-workspace 4; }
223
  Mod+5 { focus-workspace 5; }
224
  Mod+Shift+1 { move-column-to-workspace 1; }
225
  Mod+Shift+2 { move-column-to-workspace 2; }
226
  Mod+Shift+3 { move-column-to-workspace 3; }
227
  Mod+Shift+4 { move-column-to-workspace 4; }
228
  Mod+Shift+5 { move-column-to-workspace 5; }
229
230
  Mod+WheelScrollDown cooldown-ms=50 { focus-workspace-down; }
231
  Mod+WheelScrollUp   cooldown-ms=50 { focus-workspace-up; }
232
  // }}}
233
}
234
// }}}