summaryrefslogtreecommitdiffstats
path: root/sway-5.html
blob: 1f0590fbb564c58269efa294a75b7038c380cada (plain) (blame)
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
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Sun Aug 23 20:49:58 2015 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
       body    { width: 500px; margin: 0 auto; background: #111; color: #fff; }
       a       { color: #0275D8; }
</style>
<title>SWAY</title>

</head>
<body>

<h1 align="center">SWAY</h1>

<a href="#NAME">NAME</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#COMMANDS">COMMANDS</a><br>

<hr>


<h2>NAME
<a name="NAME"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">sway &minus;
configuration file and commands</p>

<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">A sway
configuration file is a list of sway commands that are
exected by sway on startup. These commands usually consist
of setting your preferences and setting key bindings. An
example config is likely present in /etc/sway/config for you
to check out.</p>

<p style="margin-left:11%; margin-top: 1em">All of these
commands may be issued at runtime through
<b>sway&minus;msg</b>(1).</p>

<h2>COMMANDS
<a name="COMMANDS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>bindsym</b>
&lt;key combo&gt; &lt;command&gt;</p>

<p style="margin-left:17%;">Binds <i>key combo</i> to
execute <i>command</i> when pressed. You may use XKB key
names here (<b>xev</b>(1) is a good tool for discovering
them). An example bindsym command would be <i>bindsym
Mod1+Shift+f exec firefox</i>, which would execute Firefox
if the alt, shift, and F keys are pressed together. Any
valid sway command is eligible to be bound to a key
combo.</p>

<p style="margin-left:11%; margin-top: 1em"><b>exec</b>
&lt;shell command&gt;</p>

<p style="margin-left:17%;">Executes <i>shell command</i>
with sh.</p>


<p style="margin-left:11%; margin-top: 1em"><b>exec_always</b>
&lt;shell command&gt;</p>

<p style="margin-left:17%;">Like exec, but the shell
command will be executed <i>again</i> after <b>reload</b> or
<b>restart</b> is executed.</p>


<p style="margin-left:11%; margin-top: 1em"><b>exit</b></p>

<p style="margin-left:17%;">Exit sway and end your Wayland
session.</p>


<p style="margin-left:11%; margin-top: 1em"><b>floating</b>
toggle</p>

<p style="margin-left:17%;">Toggles the
&quot;floating&quot; status of the focused view.</p>


<p style="margin-left:11%; margin-top: 1em"><b>floating_modifier</b>
&lt;modifier&gt;</p>

<p style="margin-left:17%;">When the <i>modifier</i> key is
held down, you may use left click to drag floating windows,
and right click to resize them. Unlike i3, this modifier may
also be used to resize and move windows that are tiled.</p>

<p style="margin-left:11%; margin-top: 1em"><b>focus</b>
&lt;direction&gt;</p>

<p style="margin-left:17%;">Direction may be one of
<i>up</i>, <i>down</i>, <i>left</i>, <i>right</i>, or
<i>parent</i>. The directional focus commands will move the
focus in that direction. The parent focus command will
change the focus to the parent of the currently focused
container, which is useful, for example, to open a sibling
of the parent container, or to move the entire container
around.</p>

<p style="margin-left:11%; margin-top: 1em"><b>focus</b>
mode_toggle</p>

<p style="margin-left:17%;">Toggles focus between floating
view and tiled view.</p>


<p style="margin-left:11%; margin-top: 1em"><b>focus_follows_mouse</b>
&lt;yes|no&gt;</p>

<p style="margin-left:17%;">If set to <i>yes</i>, the
currently focused view will change as you move your mouse
around the screen to the view that ends up underneath your
mouse.</p>


<p style="margin-left:11%; margin-top: 1em"><b>fullscreen</b></p>

<p style="margin-left:17%;">Toggles fullscreen status for
the focused view.</p>

<p style="margin-left:11%; margin-top: 1em"><b>gaps</b>
&lt;amount&gt;</p>

<p style="margin-left:17%;">Adds <i>amount</i> pixels
between each view, and around each output.</p>

<p style="margin-left:11%; margin-top: 1em"><b>gaps</b>
&lt;inner|outer&gt; &lt;amount&gt;</p>

<p style="margin-left:17%;">Adds <i>amount</i> pixels as an
<i>inner</i> or <i>outer</i> gap, where the former affects
spacing between views and the latter affects the space
around each output.</p>


<p style="margin-left:11%; margin-top: 1em"><b>kill</b></p>

<p style="margin-left:17%;">Closes the currently focused
view.</p>

<p style="margin-left:11%; margin-top: 1em"><b>layout</b>
&lt;mode&gt;</p>

<p style="margin-left:17%;">Sets the layout mode of the
focused container. <i>mode</i> can be one of <i>splith</i>,
<i>splitv</i>, or <i>toggle split</i>.</p>

<p style="margin-left:11%; margin-top: 1em"><b>move</b>
&lt;left|right|up|down&gt;</p>

<p style="margin-left:17%;">Moves the focused container
<i>left</i>, <i>right</i>, <i>up</i>, or <i>down</i>.</p>

<p style="margin-left:11%; margin-top: 1em"><b>output</b>
&lt;name&gt; &lt;resolution|res WIDTHxHEIGHT&gt;
&lt;position|pos X,Y&gt;</p>

<p style="margin-left:17%;">Configures the specified
output. It will use the given resolution and be arranged at
the given position in the layout tree. You may omit either
of these parameters if you only want to set one of them.</p>


<p style="margin-left:11%; margin-top: 1em"><b>reload</b></p>

<p style="margin-left:17%;">Reloads the sway config file
without restarting sway.</p>

<p style="margin-left:11%; margin-top: 1em"><b>resize</b>
&lt;shrink|grow&gt; &lt;width|height&gt; &lt;amount&gt;</p>

<p style="margin-left:17%;">Resizes the currently focused
container or view by <i>amount</i>. <i>amount</i> can be
specified as &quot;n px&quot; or &quot;n ppt&quot; or
&quot;n px or n ppt&quot;.</p>

<p style="margin-left:11%; margin-top: 1em"><b>set</b>
&lt;name&gt; &lt;value&gt;</p>

<p style="margin-left:17%;">Creates a substitution for
<i>value</i> that can be used with $<i>name</i> in other
commands.</p>

<p style="margin-left:11%; margin-top: 1em"><b>split</b>
&lt;vertical|v|horizontal|h&gt;</p>

<p style="margin-left:17%;">Splits the current container,
vertically or horiziontally.</p>


<p style="margin-left:11%; margin-top: 1em"><b>splith</b></p>

<p style="margin-left:17%;">Equivalent to <b>split
horizontal</b>.</p>


<p style="margin-left:11%; margin-top: 1em"><b>splitv</b></p>

<p style="margin-left:17%;">Equivalent to <b>split
vertical</b>.</p>


<p style="margin-left:11%; margin-top: 1em"><b>workspace</b>
&lt;name&gt;</p>

<p style="margin-left:17%;">Switches to the specified
workspace.</p>


<p style="margin-left:11%; margin-top: 1em"><b>workspace</b>
&lt;prev_on_output|next_on_output&gt;</p>

<p style="margin-left:17%;">Switches to the next workspace
on the current output.</p>


<p style="margin-left:11%; margin-top: 1em"><b>workspace</b>
&lt;name&gt; output &lt;output&gt;</p>

<p style="margin-left:17%;">Specifies that the workspace
named <i>name</i> should appear on the specified
<i>output</i>.</p>
<hr>
</body>
</html>