all repos

dotfiles @ 53bc89e04a6108bba0ac688a7c8dbc47b9865b85

i use rach linux btw

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
updaties, 6 days ago
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
  match app-id="helium"
106
  open-on-workspace "two"
107
  open-focused true
108
}
109
110
window-rule {
111
  match app-id="spotify"
112
  match app-id="org.gnome.Snapshot"
113
  match app-id="org.gnome.Calendar"
114
  match app-id="org.keepassxc.KeePassXC"
115
  open-on-workspace "laptop"
116
}
117
118
window-rule {
119
  match app-id="Spotify"
120
  match app-id="spotify"
121
  match app-id="zen"
122
  match app-id="firefox"
123
  match app-id="helium"
124
  match app-id="Brave-browser"
125
  match app-id="brave-browser"
126
  match app-id="kitty"
127
  match app-id="ghostty"
128
  match app-id="obsidian"
129
  match app-id="Code"
130
  match app-id="Zed"
131
  open-maximized true
132
}
133
134
window-rule {
135
  match app-id="pavucontrol"
136
  match app-id="blueman-manager"
137
  match app-id="xdg-desktop-portal-gtk"
138
  open-floating true
139
}
140
141
window-rule {
142
  match app-id="KeePassXC"
143
  match app-id="obsidian"
144
  match app-id="org.telegram.desktop"
145
  block-out-from "screen-capture"
146
}
147
// }}}
148
// keybinds {{{
149
binds {
150
  Mod+d { spawn "dunstctl" "close"; }
151
  Mod+q { close-window; }
152
  Mod+Alt+l { spawn "hyprlock"; }
153
  Mod+Return { spawn "ghostty"; }
154
  Mod+Shift+Escape { spawn "~/bin/wofi-power-menu" "niri";}
155
  Mod+Shift+Return { spawn "wofi"; }
156
157
  Mod+Shift+a { spawn "anki"; }
158
  Mod+Shift+s { spawn "gelly"; }
159
  Mod+Shift+t { spawn "Telegram"; }
160
  Mod+Shift+w { spawn "helium-browser"; }
161
  // func keys {{{
162
  // audio
163
  XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }
164
  XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
165
  XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
166
  XF86AudioNext        allow-when-locked=true { spawn "playerctl" "next"; }
167
  XF86AudioPlay        allow-when-locked=true { spawn "playerctl" "play-pause"; }
168
  XF86AudioPrev        allow-when-locked=true { spawn "playerctl" "previous"; }
169
  XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; }
170
  // brighthness
171
  XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }
172
  XF86MonBrightnessUp   allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; }
173
  // screen shots
174
  Print { screenshot; }
175
  Alt+Print { screenshot-window; }
176
  Ctrl+Print { screenshot-screen; }
177
  // }}}
178
  // wm {{{
179
  Mod+O repeat=false { toggle-overview; }
180
  Alt+Tab { focus-window-previous; }
181
182
  // window management {{{
183
  Mod+Ctrl+f { toggle-window-floating; }
184
185
  Mod+r { switch-preset-column-width; }
186
  Mod+t { maximize-column; }
187
  Mod+f { fullscreen-window; }
188
189
  Mod+Minus { set-column-width "-10%"; }
190
  Mod+Equal { set-column-width "+10%"; }
191
192
  Mod+h { focus-column-left; }
193
  Mod+j { focus-window-down; }
194
  Mod+k { focus-window-up; }
195
  Mod+l { focus-column-right; }
196
  Mod+Shift+h { move-column-left; }
197
  Mod+Shift+j { move-window-down; }
198
  Mod+Shift+k { move-window-up; }
199
  Mod+Shift+l { move-column-right; }
200
201
  // monitor navigation
202
  Mod+Comma { focus-monitor-left; }
203
  Mod+Period { focus-monitor-right; }
204
  Mod+Shift+Comma { move-column-to-monitor-left; }
205
  Mod+Shift+Period { move-column-to-monitor-right; }
206
207
  // workspaces
208
  Mod+1 { focus-workspace 1; }
209
  Mod+2 { focus-workspace 2; }
210
  Mod+3 { focus-workspace 3; }
211
  Mod+4 { focus-workspace 4; }
212
  Mod+5 { focus-workspace 5; }
213
  Mod+Shift+1 { move-column-to-workspace 1; }
214
  Mod+Shift+2 { move-column-to-workspace 2; }
215
  Mod+Shift+3 { move-column-to-workspace 3; }
216
  Mod+Shift+4 { move-column-to-workspace 4; }
217
  Mod+Shift+5 { move-column-to-workspace 5; }
218
219
  Mod+WheelScrollDown cooldown-ms=50 { focus-workspace-down; }
220
  Mod+WheelScrollUp   cooldown-ms=50 { focus-workspace-up; }
221
  // }}}
222
}
223
// }}}