aboutsummaryrefslogtreecommitdiff
path: root/flavors/linux-labwc/.config/labwc/rc.xml
blob: 44a21645c399c773c443f94f454856daeb93b953 (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
<?xml version="1.0"?>
<labwc_config>
  <core>
    <decoration>server</decoration>
  </core>

  <!-- Keep a small border / resize area when decorations are off.
       W-F1 toggles between undecorated(border keeps), titlebar hidden
       and full decorations. -->
  <theme>
    <keepBorder>yes</keepBorder>
  </theme>

  <!-- Mango had 10 tags; configure the equivalent 10 Labwc workspaces. -->
  <desktops>
    <popupTime>1000</popupTime>
    <names>
      <name>1</name>
      <name>2</name>
      <name>3</name>
      <name>4</name>
      <name>5</name>
      <name>6</name>
      <name>7</name>
      <name>8</name>
      <name>9</name>
      <name>10</name>
    </names>
  </desktops>

  <keyboard>
    <!-- SUPER is the primary modifier. Keep common Alt window controls. -->
    <keybind key="A-Tab"><action name="NextWindow" /></keybind>
    <keybind key="A-S-Tab"><action name="PreviousWindow" /></keybind>
    <keybind key="A-F4"><action name="Close" /></keybind>
    <repeatRate>25</repeatRate>
    <repeatDelay>600</repeatDelay>

    <!-- Applications -->
    <keybind key="W-r">
      <action name="Execute" command="rofi -show drun -theme ~/.config/rofi/config.rasi" />
    </keybind>
    <keybind key="W-S-Return">
      <action name="Execute" command="foot" />
    </keybind>
    <keybind key="W-C-l">
      <action name="Execute" command="swaylock -f -c 000000" />
    </keybind>
    <keybind key="C-A-l">
      <action name="Execute" command="swaylock -f -c 000000" />
    </keybind>
    <keybind key="W-e">
      <action name="Execute" command="thunar" />
    </keybind>
    <keybind key="W-f">
      <action name="Execute" command="firefox" />
    </keybind>

    <!-- Window switching and actions -->
    <keybind key="W-j">
      <action name="NextWindowImmediate" workspace="current" output="focused" />
    </keybind>
    <keybind key="W-k">
      <action name="PreviousWindowImmediate" workspace="current" output="focused" />
    </keybind>
    <keybind key="W-S-c">
      <action name="Close" />
    </keybind>
    <keybind key="W-Tab">
      <action name="NextWindow" workspace="current" output="focused" />
    </keybind>
    <keybind key="W-p">
      <action name="ToggleMaximize" />
    </keybind>
    <keybind key="W-Return">
      <action name="ToggleMaximize" />
    </keybind>
    <keybind key="W-g">
      <action name="ToggleFullscreen" />
    </keybind>
    <keybind key="W-Left">
      <action name="SnapToEdge" direction="left" combine="yes" />
    </keybind>
    <keybind key="W-Right">
      <action name="SnapToEdge" direction="right" combine="yes" />
    </keybind>
    <keybind key="W-Up">
      <action name="SnapToEdge" direction="up" combine="yes" />
    </keybind>
    <keybind key="W-Down">
      <action name="SnapToEdge" direction="down" combine="yes" />
    </keybind>
    <keybind key="W-F1">
      <action name="ToggleDecorations" />
    </keybind>
    <keybind key="W-F2">
      <action name="Execute" command="killall -SIGUSR1 waybar" />
    </keybind>
    <keybind key="W-S-q">
      <action name="Exit" />
    </keybind>

    <!-- Monitor focus and moving windows between monitors -->
    <keybind key="W-comma">
      <action name="FocusOutput" direction="left" />
    </keybind>
    <keybind key="W-period">
      <action name="FocusOutput" direction="right" />
    </keybind>
    <keybind key="W-S-comma">
      <action name="MoveToOutput" direction="left" />
    </keybind>
    <keybind key="W-S-period">
      <action name="MoveToOutput" direction="right" />
    </keybind>

    <!-- Workspaces 1-10; Shift sends the focused window without switching. -->
    <keybind key="W-1"><action name="GoToDesktop" to="1" /></keybind>
    <keybind key="W-2"><action name="GoToDesktop" to="2" /></keybind>
    <keybind key="W-3"><action name="GoToDesktop" to="3" /></keybind>
    <keybind key="W-4"><action name="GoToDesktop" to="4" /></keybind>
    <keybind key="W-5"><action name="GoToDesktop" to="5" /></keybind>
    <keybind key="W-6"><action name="GoToDesktop" to="6" /></keybind>
    <keybind key="W-7"><action name="GoToDesktop" to="7" /></keybind>
    <keybind key="W-8"><action name="GoToDesktop" to="8" /></keybind>
    <keybind key="W-9"><action name="GoToDesktop" to="9" /></keybind>
    <keybind key="W-0"><action name="GoToDesktop" to="10" /></keybind>
    <keybind key="W-S-1"><action name="SendToDesktop" to="1" follow="no" /></keybind>
    <keybind key="W-S-2"><action name="SendToDesktop" to="2" follow="no" /></keybind>
    <keybind key="W-S-3"><action name="SendToDesktop" to="3" follow="no" /></keybind>
    <keybind key="W-S-4"><action name="SendToDesktop" to="4" follow="no" /></keybind>
    <keybind key="W-S-5"><action name="SendToDesktop" to="5" follow="no" /></keybind>
    <keybind key="W-S-6"><action name="SendToDesktop" to="6" follow="no" /></keybind>
    <keybind key="W-S-7"><action name="SendToDesktop" to="7" follow="no" /></keybind>
    <keybind key="W-S-8"><action name="SendToDesktop" to="8" follow="no" /></keybind>
    <keybind key="W-S-9"><action name="SendToDesktop" to="9" follow="no" /></keybind>
    <keybind key="W-S-0"><action name="SendToDesktop" to="10" follow="no" /></keybind>

    <!-- Media and audio -->
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute" command="wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" />
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute" command="wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" />
    </keybind>
    <keybind key="XF86AudioMute">
      <action name="Execute" command="wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" />
    </keybind>
    <keybind key="XF86AudioMicMute">
      <action name="Execute" command="wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" />
    </keybind>
    <keybind key="XF86AudioNext">
      <action name="Execute" command="playerctl next" />
    </keybind>
    <keybind key="XF86AudioPause">
      <action name="Execute" command="playerctl play-pause" />
    </keybind>
    <keybind key="XF86AudioPlay">
      <action name="Execute" command="playerctl play-pause" />
    </keybind>
    <keybind key="XF86AudioPrev">
      <action name="Execute" command="playerctl previous" />
    </keybind>
  </keyboard>

  <!-- Keep Labwc's default SUPER+left-move/right-resize mouse bindings. -->
  <mouse>
    <default />
  </mouse>

  <!-- Disable pointer acceleration for mouse devices. -->
  <libinput>
    <device category="non-touch">
      <accelProfile>flat</accelProfile>
    </device>
  </libinput>

  <windowRules>
    <windowRule identifier="*">
        <action name="SetDecorations" decorations="border"/>
    </windowRule>
    <!-- Preserve Mango's Gamescope fullscreen rule. -->
    <windowRule identifier="gamescope">
      <action name="ToggleFullscreen" />
    </windowRule>
  </windowRules>
</labwc_config>