diff options
author | 2016-02-26 00:36:05 +0100 | |
---|---|---|
committer | 2016-02-29 22:12:39 +0100 | |
commit | 9437eca3ebf1d512df2f276442aea59a68b2875e (patch) | |
tree | db30085c02161bc27c9e6782ba3d3d6233b8563c /sway | |
parent | Merge pull request #497 from progandy/swaylock-arrange (diff) | |
download | sway-9437eca3ebf1d512df2f276442aea59a68b2875e.tar.gz sway-9437eca3ebf1d512df2f276442aea59a68b2875e.tar.zst sway-9437eca3ebf1d512df2f276442aea59a68b2875e.zip |
Segregate between config and runtime cmds in doc
In anticipation for #375, reorganized and augmented slightly sway(5)
so it makes a difference between commands intended for configuration,
commands intended for control, and those that can serve as both.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/sway.5.txt | 150 |
1 files changed, 82 insertions, 68 deletions
diff --git a/sway/sway.5.txt b/sway/sway.5.txt index 004e0f54..5c1cf44d 100644 --- a/sway/sway.5.txt +++ b/sway/sway.5.txt | |||
@@ -11,16 +11,22 @@ sway - configuration file and commands | |||
11 | Description | 11 | Description |
12 | ----------- | 12 | ----------- |
13 | 13 | ||
14 | A sway configuration file is a list of sway commands that are executed by sway on | 14 | A sway configuration file is a list of sway commands that are executed by sway |
15 | startup. These commands usually consist of setting your preferences and setting | 15 | on startup. These commands usually consist of setting your preferences and |
16 | key bindings. An example config is likely present in /etc/sway/config for you to | 16 | setting key bindings. An example config is likely present in /etc/sway/config |
17 | check out. | 17 | for you to check out. |
18 | 18 | ||
19 | All of these commands may be issued at runtime through **swaymsg**(1). | 19 | Some of the commands can also or only be sent at runtime with **sway-msg**(1). |
20 | 20 | ||
21 | Commands | 21 | Commands |
22 | -------- | 22 | -------- |
23 | 23 | ||
24 | The following commands may only be used in the configuration file. | ||
25 | |||
26 | **bar** <block of commands>:: | ||
27 | Append _{_ to this command, the following lines will be commands that | ||
28 | configure **swaybar**, and _}_ on its own line to close the block. | ||
29 | |||
24 | **bindsym** <key combo> <command>:: | 30 | **bindsym** <key combo> <command>:: |
25 | Binds _key combo_ to execute _command_ when pressed. You may use XKB key | 31 | Binds _key combo_ to execute _command_ when pressed. You may use XKB key |
26 | names here (**xev**(1) is a good tool for discovering them). An example | 32 | names here (**xev**(1) is a good tool for discovering them). An example |
@@ -28,12 +34,12 @@ Commands | |||
28 | execute Firefox if the alt, shift, and F keys are pressed together. Any | 34 | execute Firefox if the alt, shift, and F keys are pressed together. Any |
29 | valid sway command is eligible to be bound to a key combo. | 35 | valid sway command is eligible to be bound to a key combo. |
30 | 36 | ||
31 | **exec** <shell command>:: | 37 | **set** <name> <value>:: |
32 | Executes _shell command_ with sh. | 38 | Creates a substitution for _value_ that can be used with $_name_ in other |
39 | commands. | ||
33 | 40 | ||
34 | **exec_always** <shell command>:: | 41 | The following commands cannot be used directly in the configuration file. |
35 | Like exec, but the shell command will be executed _again_ after *reload* or | 42 | They are expected to be used with **bindsym** or at runtime through **swaymsg**(1). |
36 | *restart* is executed. | ||
37 | 43 | ||
38 | **exit**:: | 44 | **exit**:: |
39 | Exit sway and end your Wayland session. | 45 | Exit sway and end your Wayland session. |
@@ -41,13 +47,6 @@ Commands | |||
41 | **floating** <enable|disable|toggle>:: | 47 | **floating** <enable|disable|toggle>:: |
42 | Make focused view floating, non-floating, or the opposite of what it is now. | 48 | Make focused view floating, non-floating, or the opposite of what it is now. |
43 | 49 | ||
44 | **floating_modifier** <modifier> [normal|inverse]:: | ||
45 | When the _modifier_ key is held down, you may use left click to drag floating | ||
46 | windows, and right click to resize them. Unlike i3, this modifier may also be | ||
47 | used to resize and move windows that are tiled. With the _inverse_ mode | ||
48 | enabled, left click is used for resizing and right click for dragging. The | ||
49 | mode paramenter is optional and defaults to _normal_ if it isn't defined. | ||
50 | |||
51 | **focus** <direction>:: | 50 | **focus** <direction>:: |
52 | Direction may be one of _up_, _down_, _left_, _right_, or _parent_. The | 51 | Direction may be one of _up_, _down_, _left_, _right_, or _parent_. The |
53 | directional focus commands will move the focus in that direction. The parent | 52 | directional focus commands will move the focus in that direction. The parent |
@@ -63,13 +62,73 @@ Commands | |||
63 | **focus** mode_toggle:: | 62 | **focus** mode_toggle:: |
64 | Toggles focus between floating view and tiled view. | 63 | Toggles focus between floating view and tiled view. |
65 | 64 | ||
65 | **fullscreen**:: | ||
66 | Toggles fullscreen status for the focused view. | ||
67 | |||
68 | **layout** <mode>:: | ||
69 | Sets the layout mode of the focused container. _mode_ can be one of _splith_, | ||
70 | _splitv_, or _toggle split_. | ||
71 | |||
72 | **move** <left|right|up|down>:: | ||
73 | Moves the focused container _left_, _right_, _up_, or _down_. | ||
74 | |||
75 | **move** <container|window> to workspace <name>:: | ||
76 | Moves the focused container to the workspace identified by _name_. | ||
77 | _name_ may be a special workspace name. See **workspace**. | ||
78 | |||
79 | **move** <container|window|workspace> to output <name|direction>:: | ||
80 | Moves the focused container or workspace to the output identified by _name_ or | ||
81 | _direction_. _direction_ may be one of _up_, _down_, _left_, _right_. | ||
82 | |||
83 | **reload**:: | ||
84 | Reloads the sway config file without restarting sway. | ||
85 | |||
86 | **resize** <shrink|grow> <width|height> <amount>:: | ||
87 | Resizes the currently focused container or view by _amount_. _amount_ can be | ||
88 | specified as "n px" or "n ppt" or "n px or n ppt". | ||
89 | |||
90 | **split** <vertical|v|horizontal|h|toggle|t>:: | ||
91 | Splits the current container, vertically or horizontally. If toggled then the | ||
92 | current container is split opposite to the parent container. | ||
93 | |||
94 | **splith**:: | ||
95 | Equivalent to **split horizontal**. | ||
96 | |||
97 | **splitv**:: | ||
98 | Equivalent to **split vertical**. | ||
99 | |||
100 | **splitt**:: | ||
101 | Equivalent to **split toggle**. | ||
102 | |||
103 | **sticky** <enable|disable|toggle>:: | ||
104 | If enabled and the windows is floating it will always be present on the active | ||
105 | workspace on that output. | ||
106 | |||
107 | The following commands may be used either in the configuration file | ||
108 | or triggered at runtime. | ||
109 | |||
110 | **debuglog** <on|off|toggle>:: | ||
111 | Enables, disables or toggles logging for debug. The toggle argument cannot | ||
112 | be used in the configuration file. | ||
113 | |||
114 | **exec** <shell command>:: | ||
115 | Executes _shell command_ with sh. | ||
116 | |||
117 | **exec_always** <shell command>:: | ||
118 | Like exec, but the shell command will be executed _again_ after *reload* or | ||
119 | *restart* is executed. | ||
120 | |||
121 | **floating_modifier** <modifier> [normal|inverse]:: | ||
122 | When the _modifier_ key is held down, you may use left click to drag floating | ||
123 | windows, and right click to resize them. Unlike i3, this modifier may also be | ||
124 | used to resize and move windows that are tiled. With the _inverse_ mode | ||
125 | enabled, left click is used for resizing and right click for dragging. The | ||
126 | mode paramenter is optional and defaults to _normal_ if it isn't defined. | ||
127 | |||
66 | **focus_follows_mouse** <yes|no>:: | 128 | **focus_follows_mouse** <yes|no>:: |
67 | If set to _yes_, the currently focused view will change as you move your | 129 | If set to _yes_, the currently focused view will change as you move your |
68 | mouse around the screen to the view that ends up underneath your mouse. | 130 | mouse around the screen to the view that ends up underneath your mouse. |
69 | 131 | ||
70 | **fullscreen**:: | ||
71 | Toggles fullscreen status for the focused view. | ||
72 | |||
73 | **for_window** <criteria> <command>:: | 132 | **for_window** <criteria> <command>:: |
74 | Whenever a window that matches _criteria_ appears, run list of commands. See | 133 | Whenever a window that matches _criteria_ appears, run list of commands. See |
75 | **Criteria** section below. | 134 | **Criteria** section below. |
@@ -77,7 +136,8 @@ Commands | |||
77 | **gaps** edge_gaps <on|off|toggle>:: | 136 | **gaps** edge_gaps <on|off|toggle>:: |
78 | Whether or not to add gaps between views and workspace edges if amount of | 137 | Whether or not to add gaps between views and workspace edges if amount of |
79 | inner gap is not zero. When _no_, no gap is added where the view is aligned to | 138 | inner gap is not zero. When _no_, no gap is added where the view is aligned to |
80 | the workspace edge, effectively creating gaps only between views. | 139 | the workspace edge, effectively creating gaps only between views. The toggle |
140 | argument cannot be used in the configuration file. | ||
81 | 141 | ||
82 | **gaps** <amount>:: | 142 | **gaps** <amount>:: |
83 | Sets default _amount_ pixels as the gap between each view, and around each | 143 | Sets default _amount_ pixels as the gap between each view, and around each |
@@ -94,29 +154,11 @@ Commands | |||
94 | workspace (or current workspace), and _current_ changes gaps for the current | 154 | workspace (or current workspace), and _current_ changes gaps for the current |
95 | view or workspace. | 155 | view or workspace. |
96 | 156 | ||
97 | **kill**:: | ||
98 | Closes the currently focused view. | ||
99 | |||
100 | **layout** <mode>:: | ||
101 | Sets the layout mode of the focused container. _mode_ can be one of _splith_, | ||
102 | _splitv_, or _toggle split_. | ||
103 | |||
104 | **mode** <mode_name>:: | 157 | **mode** <mode_name>:: |
105 | Switches to the given mode_name. the default mode is simply _default_. To | 158 | Switches to the given mode_name. the default mode is simply _default_. To |
106 | create a new mode in config append _{_ to this command, the following lines | 159 | create a new mode in config append _{_ to this command, the following lines |
107 | will be keybinds for that mode, and _}_ on its own line to close the block. | 160 | will be keybinds for that mode, and _}_ on its own line to close the block. |
108 | 161 | ||
109 | **move** <left|right|up|down>:: | ||
110 | Moves the focused container _left_, _right_, _up_, or _down_. | ||
111 | |||
112 | **move** <container|window> to workspace <name>:: | ||
113 | Moves the focused container to the workspace identified by _name_. | ||
114 | _name_ may be a special workspace name. See **workspace**. | ||
115 | |||
116 | **move** <container|window|workspace> to output <name|direction>:: | ||
117 | Moves the focused container or workspace to the output identified by _name_ or | ||
118 | _direction_. _direction_ may be one of _up_, _down_, _left_, _right_. | ||
119 | |||
120 | **mouse_warping** <output|none>:: | 162 | **mouse_warping** <output|none>:: |
121 | When _output_: place mouse at center of newly focused window when changing | 163 | When _output_: place mouse at center of newly focused window when changing |
122 | output. When _none_: don't move mouse. | 164 | output. When _none_: don't move mouse. |
@@ -147,39 +189,11 @@ Commands | |||
147 | this output config after the others, or it will be matched instead of the | 189 | this output config after the others, or it will be matched instead of the |
148 | others. | 190 | others. |
149 | 191 | ||
150 | **reload**:: | ||
151 | Reloads the sway config file without restarting sway. | ||
152 | |||
153 | **resize** <shrink|grow> <width|height> <amount>:: | ||
154 | Resizes the currently focused container or view by _amount_. _amount_ can be | ||
155 | specified as "n px" or "n ppt" or "n px or n ppt". | ||
156 | |||
157 | **seamless_mouse** <on|off>:: | 192 | **seamless_mouse** <on|off>:: |
158 | Change output seamlessly when pointer touches edge of output. Outputs need to | 193 | Change output seamlessly when pointer touches edge of output. Outputs need to |
159 | be configured with perfectly aligned adjacent positions for this option to | 194 | be configured with perfectly aligned adjacent positions for this option to |
160 | have any effect. | 195 | have any effect. |
161 | 196 | ||
162 | **set** <name> <value>:: | ||
163 | Creates a substitution for _value_ that can be used with $_name_ in other | ||
164 | commands. | ||
165 | |||
166 | **split** <vertical|v|horizontal|h|toggle|t>:: | ||
167 | Splits the current container, vertically or horizontally. If toggled then the | ||
168 | current container is split opposite to the parent container. | ||
169 | |||
170 | **splith**:: | ||
171 | Equivalent to **split horizontal**. | ||
172 | |||
173 | **splitv**:: | ||
174 | Equivalent to **split vertical**. | ||
175 | |||
176 | **splitt**:: | ||
177 | Equivalent to **split toggle**. | ||
178 | |||
179 | **sticky** <enable|disable|toggle>:: | ||
180 | If enabled and the windows is floating it will always be present on the active | ||
181 | workspace on that output. | ||
182 | |||
183 | **workspace** <name>:: | 197 | **workspace** <name>:: |
184 | Switches to the specified workspace. | 198 | Switches to the specified workspace. |
185 | 199 | ||