aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/labwc/rc.xml
blob: d6a0fd5c4b6cc197e327390bcef1241745aa384a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
<?xml version="1.0"?>
<!--
This file contains all supported config elements & attributes with
default values.
-->
<labwc_config>
  <core>
    <decoration>server</decoration>
    <gap>5</gap>
    <adaptiveSync>no</adaptiveSync>
    <reuseOutputMode>no</reuseOutputMode>
  </core>
  <!-- <font><theme> can be defined without an attribute to set all places -->
  <theme>
    <name>Orzhov</name>
    <cornerRadius>0</cornerRadius>
    <keepBorder>yes</keepBorder>
    <font>
      <name>Segoe UI</name>
      <size>12</size>
      <slant>normal</slant>
      <weight>normal</weight>
    </font>
    <dropShadows>yes</dropShadows>
    <titlebar>
      <layout>icon:iconify,max,close</layout>
    </titlebar>
  </theme>
  <!--
Just as for window-rules, 'identifier' relates to app_id for native Wayland
windows and WM_CLASS for XWayland clients.
-->
  <windowSwitcher show="yes" preview="yes" outlines="yes">
    <fields>
      <field content="type" width="25%"/>
      <field content="identifier" width="25%"/>
      <field content="title" width="50%"/>
    </fields>
  </windowSwitcher>
  <!-- edge strength is in pixels -->
  <resistance>
    <screenEdgeStrength>20</screenEdgeStrength>
  </resistance>
  <!-- Show a simple resize and move indicator -->
  <resize popupShow="Never"/>
  <focus>
    <followMouse>yes</followMouse>
    <followMouseRequiresMovement>yes</followMouseRequiresMovement>
    <raiseOnFocus>no</raiseOnFocus>
  </focus>
  <!-- Set range to 0 to disable window snapping completely -->
  <snapping>
    <range>1</range>
    <topMaximize>yes</topMaximize>
  </snapping>
  <!-- Workspaces can be configured like this: -->
  <desktops>
    <popupTime>1000</popupTime>
    <names>
      <name>Terminal 1</name>
      <name>Terminal 2</name>
      <name>Web 1</name>
      <name>Web 2</name>
      <name>Notes</name>
      <name>Social</name>
      <name>Mail</name>
      <name>Music</name>
    </names>
  </desktops>
  <regions>
    <region name="top-left" x="0%" y="0%" height="50%" width="50%"/>
    <region name="top" x="0%" y="0%" height="50%" width="100%"/>
    <region name="top-right" x="50%" y="0%" height="50%" width="50%"/>
    <region name="left" x="0%" y="0%" height="100%" width="50%"/>
    <region name="center" x="10%" y="10%" height="80%" width="80%"/>
    <region name="right" x="50%" y="0%" height="100%" width="50%"/>
    <region name="bottom-left" x="0%" y="50%" height="50%" width="50%"/>
    <region name="bottom" x="0%" y="50%" height="50%" width="100%"/>
    <region name="bottom-right" x="50%" y="50%" height="50%" width="50%"/>
  </regions>
  <!--
Keybind actions are specified in labwc-actions(5)
The following keybind modifiers are supported:
W - window/super/logo
A - alt
C - ctrl
S - shift

Use <keyboard><default /> to load all the default keybinds (those listed
below). If the default keybinds are largely what you want, a sensible
approach could be to start the <keyboard> section with a <default />
element, and then (re-)define any special binds you need such as launching
your favourite terminal or application launcher. See rc.xml for an example.
-->
  <keyboard>
    <numlock>on</numlock>
    <repeatRate>25</repeatRate>
    <repeatDelay>600</repeatDelay>
    <keybind key="W-r">
      <action name="Reconfigure"/>
    </keybind>
    <keybind key="Print">
      <action name="Execute">
        <command>sh -c 'grim -g "$(slurp)" - | swappy -f -'</command>
      </action>
    </keybind>
    <keybind key="A-Tab">
      <action name="NextWindow"/>
    </keybind>
    <keybind key="W-Return">
      <action name="Execute" command="ghostty"/>
    </keybind>
    <keybind key="W-w">
      <action name="Execute" command="librewolf"/>
    </keybind>
    <keybind key="W-space">
      <action name="Execute" command="j4-dmenu-desktop --dmenu=bemenu"/>
    </keybind>
    <keybind key="W-f">
      <action name="Execute" command="thunar"/>
    </keybind>
    <keybind key="W-m">
      <action name="Execute" command="flatpak run eu.betterbird.Betterbird"/>
    </keybind>
    <keybind key="W-c">
      <action name="Close"/>
    </keybind>
    <keybind key="W-1">
      <action name="GoToDesktop" to="1"/>
      <action name="Execute" command="bash -c 'echo 1 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-2">
      <action name="GoToDesktop" to="2"/>
      <action name="Execute" command="bash -c 'echo 2 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-3">
      <action name="GoToDesktop" to="3"/>
      <action name="Execute" command="bash -c 'echo 3 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-4">
      <action name="GoToDesktop" to="4"/>
      <action name="Execute" command="bash -c 'echo 4 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-5">
      <action name="GoToDesktop" to="5"/>
      <action name="Execute" command="bash -c 'echo 5 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-6">
      <action name="GoToDesktop" to="6"/>
      <action name="Execute" command="bash -c 'echo 6 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-7">
      <action name="GoToDesktop" to="7"/>
      <action name="Execute" command="bash -c 'echo 7 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-8">
      <action name="GoToDesktop" to="8"/>
      <action name="Execute" command="bash -c 'echo 8 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-1">
      <action name="SendToDesktop" to="1"/>
      <action name="Execute" command="bash -c 'echo 1 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-2">
      <action name="SendToDesktop" to="2"/>
      <action name="Execute" command="bash -c 'echo 2 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-3">
      <action name="SendToDesktop" to="3"/>
      <action name="Execute" command="bash -c 'echo 3 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-4">
      <action name="SendToDesktop" to="4"/>
      <action name="Execute" command="bash -c 'echo 4 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-5">
      <action name="SendToDesktop" to="5"/>
      <action name="Execute" command="bash -c 'echo 5 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-6">
      <action name="SendToDesktop" to="6"/>
      <action name="Execute" command="bash -c 'echo 6 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-7">
      <action name="SendToDesktop" to="7"/>
      <action name="Execute" command="bash -c 'echo 7 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-8">
      <action name="SendToDesktop" to="8"/>
      <action name="Execute" command="bash -c 'echo 8 &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-Left">
      <action name="GoToDesktop" to="left"/>
      <action name="Execute" command="bash -c 'echo left &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-S-Right">
      <action name="GoToDesktop" to="right"/>
      <action name="Execute" command="bash -c 'echo right &gt; /tmp/workspace'"/>
    </keybind>
    <desktops number="4"/>
    <keybind key="W-C-S-Right">
      <action name="SendToDesktop" to="right"/>
      <action name="Execute" command="bash -c 'echo right &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-C-S-Left">
      <action name="SendToDesktop" to="left"/>
      <action name="Execute" command="bash -c 'echo left &gt; /tmp/workspace'"/>
    </keybind>
    <keybind key="W-Left">
      <action name="SnapToEdge" direction="left"/>
      <action name="Focus"/>
      <action name="Raise"/>
    </keybind>
    <keybind key="W-Right">
      <action name="SnapToEdge" direction="right"/>
      <action name="Focus"/>
      <action name="Raise"/>
    </keybind>
    <keybind key="W-Up">
      <action name="ToggleMaximize"/>
      <action name="Focus"/>
      <action name="Raise"/>
    </keybind>
    <keybind key="W-Down">
      <action name="SnapToRegion" region="center"/>
      <action name="Focus"/>
      <action name="Raise"/>
    </keybind>
    <keybind key="W-A-C-Right">
      <action name="SnapToRegion" region="top-right"/>
    </keybind>
    <keybind key="W-A-Right">
      <action name="SnapToRegion" region="bottom-right"/>
    </keybind>
    <keybind key="W-A-C-Left">
      <action name="SnapToRegion" region="top-left"/>
    </keybind>
    <keybind key="W-A-Left">
      <action name="SnapToRegion" region="bottom-left"/>
    </keybind>
    <keybind key="A-Space">
      <action name="ShowMenu" menu="client-menu"/>
    </keybind>
    <keybind key="W-C-l">
      <action name="Execute" command="waylock -init-color 0x000000 -input-color 0xC1A550 -fail-color 0xff0000"/>
    </keybind>
    <keybind key="XF86_AudioLowerVolume">
      <action name="Execute" command="wpctl set-volume @DEFAULT_SINK@ 5%-"/>
    </keybind>
    <keybind key="XF86_AudioRaiseVolume">
      <action name="Execute" command="wpctl set-volume @DEFAULT_SINK@ 5%+ --limit 1.0"/>
    </keybind>
    <keybind key="XF86_AudioMute">
      <action name="Execute" command="wpctl set-mute @DEFAULT_SINK@ toggle"/>
    </keybind>
    <keybind key="XF86_MonBrightnessUp">
      <action name="Execute" command="brightnessctl set +10%"/>
    </keybind>
    <keybind key="XF86_MonBrightnessDown">
      <action name="Execute" command="brightnessctl set 10%-"/>
    </keybind>
    <!--
<keybind key="W-KP_7"><action name="SnapToRegion" region="top-left" /></keybind>
<keybind key="W-KP_8"><action name="SnapToRegion" region="top" /></keybind>
<keybind key="W-KP_9"><action name="SnapToRegion" region="top-right" /></keybind>
<keybind key="W-KP_4"><action name="SnapToRegion" region="left" /></keybind>
<keybind key="W-KP_5"><action name="SnapToRegion" region="center" /></keybind>
<keybind key="W-KP_6"><action name="SnapToRegion" region="right" /></keybind>
<keybind key="W-KP_1"><action name="SnapToRegion" region="bottom-left" /></keybind>
<keybind key="W-KP_2"><action name="SnapToRegion" region="bottom" /></keybind>
<keybind key="W-KP_3"><action name="SnapToRegion" region="bottom-right" /></keybind>
-->
  </keyboard>
  <!--
Multiple <mousebind> can exist within one <context>
Multiple <actions> can exist within one <mousebind>
Currently, the only openbox-action not supported is "Unshade"

Use <mouse><default /> to load all the default mousebinds (those listed
below). If the default mousebinds are largely what you want, a sensible
approach could be to start the <mouse> section with a <default />
element, and then (re-)define any special binds you need such as launching
a custom menu when right-clicking on your desktop. See rc.xml for an example.
-->
  <mouse>
    <!-- time is in ms -->
    <doubleClickTime>500</doubleClickTime>
    <context name="Frame">
      <mousebind button="W-Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="W-Left" action="Drag">
        <action name="Move"/>
      </mousebind>
      <mousebind button="W-Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="W-Right" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Top">
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Left">
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Right">
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Bottom">
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="TRCorner">
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="BRCorner">
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="TLCorner">
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="BLCorner">
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Maximize">
      <mousebind button="Left" action="Click">
        <action name="ToggleMaximize"/>
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ToggleMaximize" direction="horizontal"/>
      </mousebind>
      <mousebind button="Middle" action="Click">
        <action name="ToggleMaximize" direction="vertical"/>
      </mousebind>
    </context>
    <context name="WindowMenu">
      <mousebind button="Left" action="Click">
        <action name="ShowMenu" menu="client-menu"/>
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ShowMenu" menu="client-menu"/>
      </mousebind>
    </context>
    <context name="Iconify">
      <mousebind button="Left" action="Click">
        <action name="Iconify"/>
      </mousebind>
    </context>
    <context name="Close">
      <mousebind button="Left" action="Click">
        <action name="Close"/>
      </mousebind>
    </context>
    <context name="Title">
      <mousebind button="Left" action="Drag">
        <action name="Move"/>
      </mousebind>
      <mousebind button="Left" action="DoubleClick">
        <action name="ToggleMaximize"/>
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ShowMenu" menu="client-menu"/>
      </mousebind>
    </context>
    <context name="Client">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="TitleBar">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind direction="Up" action="Scroll">
        <action name="Unshade"/>
        <action name="Focus"/>
      </mousebind>
      <mousebind direction="Down" action="Scroll">
        <action name="Unfocus"/>
        <action name="Shade"/>
      </mousebind>
    </context>
    <context name="Root">//
      <mousebind button="Left" action="Press"><action name="ShowMenu" menu="root-menu"/></mousebind>
      <mousebind button="Right" action="Press"><action name="ShowMenu" menu="sys-menu"/></mousebind>
      <mousebind button="Middle" action="Press"><action name="ShowMenu" menu="root-menu"/></mousebind>
      <mousebind direction="Down" action="Scroll"><action name="GoToDesktop" to="left" wrap="yes"/><action name="Execute" command="bash -c 'echo left &gt; /tmp/workspace'"/></mousebind>
      <mousebind direction="Up" action="Scroll"><action name="GoToDesktop" to="right" wrap="yes"/><action name="Execute" command="bash -c 'echo right &gt; /tmp/workspace'"/></mousebind>
    </context>
  </mouse>
  <!--
The *category* element can be set to touch, non-touch, default or the name
of a device. You can obtain device names by running *libinput list-devices*
as root or member of the input group.

Tap is set to *yes* be default. All others are left blank in order to use
device defaults.

All values are [yes|no] except for:
- pointerSpeed [-1.0 to 1.0]
- accelProfile [flat|adaptive]
- tapButtonMap [lrm|lmr]
-->
  <libinput>
    <device category="touchpad">
      <scrollFactor>1.0</scrollFactor>
      <naturalScroll>yes</naturalScroll>
      <leftHanded/>
      <pointerSpeed/>
      <accelProfile/>
      <tap>yes</tap>
      <tapButtonMap/>
      <tapAndDrag/>
      <dragLock/>
      <middleEmulation/>
      <disableWhileTyping/>
    </device>
  </libinput>
  <!--
# Window Rules
#   - Criteria can consist of 'identifier' or 'title' or both (in which case
#     AND logic is used).
#   - 'identifier' relates to app_id for native Wayland windows and WM_CLASS
#     for XWayland clients.
#   - Criteria can also contain `matchOnce="true"` meaning that the rule
#     must only apply to the first instance of the window with that
#     particular 'identifier' or 'title'.
#   - Matching against patterns with '*' (wildcard) and '?' (joker) is
#     supported. Pattern matching is case-insensitive.

<windowRules>
<windowRule identifier="*"><action name="Maximize"/></windowRule>
<windowRule identifier="foo" serverDecoration="yes"/>
<windowRule title="bar" serverDecoration="yes"/>
<windowRule identifier="baz" title="quax" serverDecoration="yes"/>
</windowRules>

# Example below for `lxqt-panel` and `pcmanfm-qt \-\-desktop`
# where 'matchOnce' is used to avoid applying rule to the panel configuration
# window with the same 'app_id'

<windowRules>
<windowRule identifier="lxqt-panel" matchOnce="true">
<skipTaskbar>yes</skipTaskbar>
<action name="MoveTo" x="0" y="0" />
<action name="ToggleAlwaysOnTop"/>
</windowRule>
<windowRule title="pcmanfm-desktop*">
<skipTaskbar>yes</skipTaskbar>
<skipWindowSwitcher>yes</skipWindowSwitcher>
<action name="MoveTo" x="0" y="0" />
<action name="ToggleAlwaysOnBottom"/>
</windowRule>
</windowRules>
-->
  <windowRules>
    <windowRule identifier="*">
      <action name="ToggleDecorations"></action>
    </windowRule>
    <windowRule identifier="*" serverDecoration="no">
      <action name="ToggleDecorations"></action>
    </windowRule>
  </windowRules>
  <placement>
    <policy>Center</policy>
  </placement>
</labwc_config>
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.