Skip to content

Commit 58607a6

Browse files
committed
Add new page on popular configuration options
1 parent a68e4a9 commit 58607a6

File tree

2 files changed

+204
-0
lines changed

2 files changed

+204
-0
lines changed

src/configuration.md

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# Configuration
2+
3+
This document contains some popular settings that you may wish to adopt.
4+
5+
## General
6+
7+
### Enable Dropshadows
8+
9+
```
10+
<theme>
11+
<dropShadows>yes</dropShadows>
12+
</theme>
13+
```
14+
15+
### Enable automatic window placement policy
16+
17+
```
18+
<placement>
19+
<policy>automatic</policy>
20+
</placement>
21+
```
22+
23+
## Window Switcher
24+
25+
### Show windows regardless of what workspace they are on
26+
27+
```
28+
<windowSwitcher>
29+
<allWorkspaces>yes</allWorkspaces>
30+
</windowSwitcher>
31+
```
32+
33+
## Keybinds
34+
35+
### Unbind alt + arrow
36+
37+
...because they interfere with brower forward/backward binds
38+
39+
```
40+
<keybind key="A-Right"/>
41+
<keybind key="A-Left"/>
42+
<keybind key="A-Up"/>
43+
<keybind key="A-Down"/>
44+
```
45+
46+
### Lock Session
47+
48+
```
49+
<keybind key="W-l" name.action="Execute" command.action="swaylock -c 000000"/>
50+
```
51+
52+
### Bind Super to a Menu
53+
54+
Supported since `0.7.3`
55+
56+
```
57+
<keybind key="Super_L" onRelease="yes">
58+
<action name="Execute" command="rofi -show drun"/>
59+
</keybind>
60+
```
61+
62+
### Take Screenshot
63+
64+
```
65+
<keybind key="Print">
66+
<action name="Execute">
67+
<command>sh -c 'grim -g "$(slurp)"'</command>
68+
</action>
69+
</keybind>
70+
```
71+
72+
### Screen Record
73+
74+
```
75+
<keybind key="W-F7" name.action="Execute" command.action="wf-recorder --output eDP-1"/>
76+
<keybind key="W-F8" name.action="Execute" command.action="killall SIGINT wf-recorder"/>
77+
```
78+
79+
### Alt-Tab Backwards
80+
81+
```
82+
<keybind key="S-A-Tab" name.action="PreviousWindow"/>
83+
```
84+
85+
### MoveToEdge, ShrinkToEdge and GrowToEdge
86+
87+
```
88+
<keybind key="W-Left">
89+
<action name="MoveToEdge" direction="left" snapWindows="true"/>
90+
</keybind>
91+
<keybind key="W-Right">
92+
<action name="MoveToEdge" direction="right" snapWindows="true"/>
93+
</keybind>
94+
<keybind key="W-Up">
95+
<action name="MoveToEdge" direction="up" snapWindows="true"/>
96+
</keybind>
97+
<keybind key="W-Down">
98+
<action name="MoveToEdge" direction="down" snapWindows="true"/>
99+
</keybind>
100+
<keybind key="W-S-Left">
101+
<action name="ShrinkToEdge" direction="left"/>
102+
</keybind>
103+
<keybind key="W-S-Right">
104+
<action name="GrowToEdge" direction="right"/>
105+
</keybind>
106+
<keybind key="W-S-Up">
107+
<action name="ShrinkToEdge" direction="up"/>
108+
</keybind>
109+
<keybind key="W-S-Down">
110+
<action name="GrowToEdge" direction="down"/>
111+
</keybind>
112+
```
113+
114+
### SnapToEdge
115+
116+
```
117+
<keybind key="C-W-Left">
118+
<action name="SnapToEdge" direction="left"/>
119+
</keybind>
120+
<keybind key="C-W-Right">
121+
<action name="SnapToEdge" direction="right"/>
122+
</keybind>
123+
<keybind key="C-W-Up">
124+
<action name="SnapToEdge" direction="up"/>
125+
</keybind>
126+
<keybind key="C-W-Down">
127+
<action name="SnapToEdge" direction="down"/>
128+
</keybind>
129+
```
130+
131+
## Mousebinds
132+
133+
### Unfosus all windows when clicking on desktop
134+
135+
This relates to `Desktop` in the sense of a layer-shell client such as `swaybg`
136+
which does not receive mouse-events.
137+
138+
Note: Clients such as `xfdesktop` and `pcmanfm --desktop` behave like this
139+
anyway.
140+
141+
```
142+
<context name="Root">
143+
<mousebind button="Left" action="Press">
144+
<action name="Unfocus"/>
145+
</mousebind>
146+
</context>
147+
```
148+
149+
### Directional maximize
150+
151+
```
152+
<context name="Top">
153+
<mousebind button="Left" action="DoubleClick">
154+
<action name="ToggleMaximize" direction="vertical"/>
155+
</mousebind>
156+
</context>
157+
<context name="Bottom">
158+
<mousebind button="Left" action="DoubleClick">
159+
<action name="ToggleMaximize" direction="vertical"/>
160+
</mousebind>
161+
</context>
162+
<context name="Left">
163+
<mousebind button="Left" action="DoubleClick">
164+
<action name="ToggleMaximize" direction="horizontal"/>
165+
</mousebind>
166+
</context>
167+
<context name="Right">
168+
<mousebind button="Left" action="DoubleClick">
169+
<action name="ToggleMaximize" direction="horizontal"/>
170+
</mousebind>
171+
</context>
172+
```
173+
174+
### Magnification
175+
176+
Supported since `0.7.3`
177+
178+
```
179+
<context name="All">
180+
<mousebind direction="W-Up" action="Scroll">
181+
<action name="ZoomIn"/>
182+
</mousebind>
183+
<mousebind direction="W-Down" action="Scroll">
184+
<action name="ZoomOut"/>
185+
</mousebind>
186+
</context>
187+
```
188+
189+
### Switch workspace with super + scroll
190+
191+
Supported since `0.7.3`
192+
193+
```
194+
<context name="All">
195+
<mousebind direction="W-Up" action="Scroll">
196+
<action name="GoToDesktop" to="right"/>
197+
</mousebind>
198+
<mousebind direction="W-Down" action="Scroll">
199+
<action name="GoToDesktop" to="left"/>
200+
</mousebind>
201+
</context>
202+
```
203+

src/more.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- [configuration](configuration.html)
12
- [troubleshooting](troubleshooting.html)
23
- [tips and tricks](tips-and-tricks.html)
34
- [hidpi scaling](hidpi-scaling.html)

0 commit comments

Comments
 (0)