all repos

dotfiles @ f3bb29d7fb9efa6f77c2109099d178ad633baced

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
  background-color "#000000"
51
}
52
53
output "eDP-1" {
54
  focus-at-startup
55
  mode "1920x1080@60.001"
56
  scale 1
57
  transform "normal"
58
  position x=1920 y=144
59
  background-color "#000010"
60
}
61
/// }}}
62
// Layout {{{
63
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
64
layout {
65
  gaps 0
66
  center-focused-column "never"
67
  default-column-width { proportion 0.7; }
68
  border { off; }
69
  preset-column-widths {
70
    proportion 0.33333
71
    proportion 0.5
72
    proportion 0.66667
73
  }
74
  focus-ring {
75
    width 2
76
    active-color "#7aa2f7"
77
    inactive-color "#292e42"
78
  }
79
}
80
// }}}
81
// general {{{
82
// disables client-side decorrations if possible
83
prefer-no-csd
84
hotkey-overlay { skip-at-startup; }
85
animations { off; }
86
87
// set to null if u want disable saving to disk behavior
88
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
89
// }}}
90
// window/workspace rules {{{
91
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
92
// https://github.com/YaLTeR/niri/wiki/Configuration:-move-column-to-workspace
93
94
workspace "one" { open-on-output "HDMI-A-1"; }
95
workspace "two" { open-on-output "HDMI-A-1"; }
96
workspace "tri" { open-on-output "HDMI-A-1"; }
97
workspace "laptop" { open-on-output "eDP-1"; }
98
99
window-rule {
100
  match app-id="obsidian"
101
  match app-id="thunderbird"
102
  match app-id="org.telegram.desktop"
103
  match app-id="io.gitlab.news_flash.NewsFlash"
104
  open-on-workspace "tools"
105
}
106
107
window-rule {
108
  match app-id="zen"
109
  match app-id="firefox"
110
  match app-id="Brave-browser"
111
  match app-id="brave-browser"
112
  open-on-workspace "web"
113
  open-focused true
114
}
115
116
window-rule {
117
  match app-id="Spotify"
118
  match app-id="spotify"
119
  match app-id="org.gnome.Snapshot"
120
  match app-id="org.gnome.Calendar"
121
  match app-id="sleek"
122
  match app-id="org.keepassxc.KeePassXC"
123
  open-on-workspace "laptop"
124
}
125
126
window-rule {
127
  match app-id="org.gnome.Solanum"
128
  default-floating-position relative-to="top-left" x=10 y=10
129
  open-focused true
130
  open-floating true
131
  open-on-workspace "laptop"
132
}
133
134
window-rule {
135
  match app-id="Spotify"
136
  match app-id="spotify"
137
  match app-id="zen"
138
  match app-id="firefox"
139
  match app-id="Brave-browser"
140
  match app-id="brave-browser"
141
  match app-id="kitty"
142
  match app-id="ghostty"
143
  match app-id="obsidian"
144
  match app-id="Code"
145
  match app-id="Zed"
146
  open-maximized true
147
}
148
149
window-rule {
150
  match app-id="pavucontrol"
151
  match app-id="blueman-manager"
152
  match app-id="xdg-desktop-portal-gtk"
153
  open-floating true
154
}
155
156
window-rule {
157
  match app-id="KeePassXC"
158
  match app-id="obsidian"
159
  match app-id="org.telegram.desktop"
160
  block-out-from "screen-capture"
161
}
162
// }}}
163
// keybinds {{{
164
binds {
165
  Mod+d { spawn "dunstctl" "close"; }
166
  Mod+q { close-window; }
167
  Mod+Alt+l { spawn "hyprlock"; }
168
  Mod+Return { spawn "kitty"; }
169
  Mod+Shift+Escape { spawn "~/bin/wofi-power-menu" "niri";}
170
  Mod+Shift+Return { spawn "wofi"; }
171
172
  // programs {{{
173
  Mod+Shift+a { spawn "anki"; }
174
  Mod+Shift+d { spawn "obsidian"; }
175
  Mod+Shift+f { spawn "newsflash"; }
176
  Mod+Shift+r { spawn "solanum"; }
177
  Mod+Shift+s { spawn "spotify"; }
178
  Mod+Shift+t { spawn "Telegram"; }
179
  Mod+Shift+w { spawn "brave"; }
180
  // }}}
181
  // func keys {{{
182
  // audio
183
  XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }
184
  XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
185
  XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
186
  XF86AudioNext        allow-when-locked=true { spawn "playerctl" "next"; }
187
  XF86AudioPlay        allow-when-locked=true { spawn "playerctl" "play-pause"; }
188
  XF86AudioPrev        allow-when-locked=true { spawn "playerctl" "previous"; }
189
  XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; }
190
  // brighthness
191
  XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }
192
  XF86MonBrightnessUp   allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; }
193
  // screen shots
194
  Print { screenshot; }
195
  Alt+Print { screenshot-window; }
196
  Ctrl+Print { screenshot-screen; }
197
  // }}}
198
  // wm {{{
199
  Mod+O repeat=false { toggle-overview; }
200
  Alt+Tab { focus-window-previous; }
201
202
  // window management {{{
203
  Mod+Ctrl+f { toggle-window-floating; }
204
205
  Mod+r { switch-preset-column-width; }
206
  Mod+t { maximize-column; }
207
  Mod+f { fullscreen-window; }
208
209
  Mod+Minus { set-column-width "-10%"; }
210
  Mod+Equal { set-column-width "+10%"; }
211
212
  Mod+h { focus-column-left; }
213
  Mod+j { focus-window-down; }
214
  Mod+k { focus-window-up; }
215
  Mod+l { focus-column-right; }
216
  Mod+Shift+h { move-column-left; }
217
  Mod+Shift+j { move-window-down; }
218
  Mod+Shift+k { move-window-up; }
219
  Mod+Shift+l { move-column-right; }
220
221
  // monitor navigation
222
  Mod+Comma { focus-monitor-left; }
223
  Mod+Period { focus-monitor-right; }
224
  Mod+Shift+Comma { move-column-to-monitor-left; }
225
  Mod+Shift+Period { move-column-to-monitor-right; }
226
227
  // workspaces
228
  Mod+1 { focus-workspace "one"; }
229
  Mod+2 { focus-workspace "two"; }
230
  Mod+3 { focus-workspace "tri"; }
231
  Mod+4 { focus-workspace 4; }
232
  Mod+5 { focus-workspace 5; }
233
  Mod+Shift+1 { move-column-to-workspace "one"; }
234
  Mod+Shift+2 { move-column-to-workspace "two"; }
235
  Mod+Shift+3 { move-column-to-workspace "tri"; }
236
  Mod+Shift+4 { move-column-to-workspace 4; }
237
  Mod+Shift+5 { move-column-to-workspace 5; }
238
239
  Mod+WheelScrollDown cooldown-ms=50 { focus-workspace-down; }
240
  Mod+WheelScrollUp   cooldown-ms=50 { focus-workspace-up; }
241
  // }}}
242
}
243
// }}}