From 1ab3e1023e026cf9d6c51497739401fe580bf304 Mon Sep 17 00:00:00 2001 From: thuck Date: Thu, 2 Jun 2016 23:23:04 +0200 Subject: [PATCH 01/10] Including error message when variable do not start with $ --- sway/commands.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sway/commands.c b/sway/commands.c index 3befee13..3ccbcd2e 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -2152,6 +2152,10 @@ static struct cmd_results *cmd_set(int argc, char **argv) { return error; } + if (argv[0][0] != '$') { + return cmd_results_new(CMD_FAILURE, "set", "Malformed variable assignment, name has to start with $"); + } + struct sway_variable *var = NULL; // Find old variable if it exists int i; From e4f80877bea48eb29b4ddfbce923bf78a6694ffb Mon Sep 17 00:00:00 2001 From: thuck Date: Fri, 3 Jun 2016 00:05:10 +0200 Subject: [PATCH 02/10] Fix output command when varible not set This should fix the corner case where a variable is not assigned, but used anyway. This should solve partially the issue #681. --- sway/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/commands.c b/sway/commands.c index 3ccbcd2e..febff2dd 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -1632,7 +1632,7 @@ static struct cmd_results *cmd_output(int argc, char **argv) { } char *src = join_args(argv + i, argc - i - 1); char *mode = argv[argc - 1]; - if (wordexp(src, &p, 0) != 0) { + if (wordexp(src, &p, 0) != 0 || p.we_wordv[0] == NULL) { return cmd_results_new(CMD_INVALID, "output", "Invalid syntax (%s)", src); } free(src); From f55b5a4982d9db45840f001e11118107536ed011 Mon Sep 17 00:00:00 2001 From: thuck Date: Fri, 3 Jun 2016 00:36:41 +0200 Subject: [PATCH 03/10] Fix identation issue --- sway/commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sway/commands.c b/sway/commands.c index febff2dd..41233591 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -2152,9 +2152,9 @@ static struct cmd_results *cmd_set(int argc, char **argv) { return error; } - if (argv[0][0] != '$') { - return cmd_results_new(CMD_FAILURE, "set", "Malformed variable assignment, name has to start with $"); - } + if (argv[0][0] != '$') { + return cmd_results_new(CMD_FAILURE, "set", "Malformed variable assignment, name has to start with $"); + } struct sway_variable *var = NULL; // Find old variable if it exists From bf2298e0a5265ede7a056f1247a4aab7e76f4b3d Mon Sep 17 00:00:00 2001 From: Denis Doria Date: Fri, 3 Jun 2016 11:26:47 +0200 Subject: [PATCH 04/10] Includes $ for variables without it --- sway/commands.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sway/commands.c b/sway/commands.c index 41233591..e204fb40 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -2146,6 +2146,8 @@ static int compare_set_qsort(const void *_l, const void *_r) { } static struct cmd_results *cmd_set(int argc, char **argv) { + char *tmp; + int size; struct cmd_results *error = NULL; if (!config->reading) return cmd_results_new(CMD_FAILURE, "set", "Can only be used in config file."); if ((error = checkarg(argc, "set", EXPECTED_AT_LEAST, 2))) { @@ -2153,7 +2155,15 @@ static struct cmd_results *cmd_set(int argc, char **argv) { } if (argv[0][0] != '$') { - return cmd_results_new(CMD_FAILURE, "set", "Malformed variable assignment, name has to start with $"); + sway_log(L_INFO, "Warning: variable '%s' doesn't start with $", argv[0]); + + size = asprintf(&tmp, "%s%s", "$", argv[0]); + if (size == -1) { + return cmd_results_new(CMD_FAILURE, "set", "Not possible to create variable $'%s'", argv[0]); + } + + argv[0] = strdup(tmp); + free(tmp); } struct sway_variable *var = NULL; From 29eb3bf7467d721d89cf4a7925d2e41cda91c606 Mon Sep 17 00:00:00 2001 From: Denis Doria Date: Fri, 3 Jun 2016 11:28:10 +0200 Subject: [PATCH 05/10] Put w to uppercase just to keep consistency between warnings --- sway/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/commands.c b/sway/commands.c index e204fb40..90a7d421 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -3047,7 +3047,7 @@ static struct cmd_results *bar_cmd_swaybar_command(int argc, char **argv) { } static struct cmd_results *bar_cmd_tray_output(int argc, char **argv) { - sway_log(L_ERROR, "warning: tray_output is not supported on wayland"); + sway_log(L_ERROR, "Warning: tray_output is not supported on wayland"); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } From e8c0ef98b1c1068783350c76b44c4e40b7534137 Mon Sep 17 00:00:00 2001 From: Roosembert Palacios Date: Sun, 5 Jun 2016 23:36:27 +0200 Subject: [PATCH 06/10] Sway: Configuration: Support for escaping line breaks. Escape line return in configuration file with the '\' character. Similar to shell scripts. Signed-off-by: Roosembert Palacios --- sway/config.c | 42 +++++++++++++++++++++++++++++++++++++++++- sway/sway.5.txt | 6 ++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/sway/config.c b/sway/config.c index 15108123..c1eec22f 100644 --- a/sway/config.c +++ b/sway/config.c @@ -455,10 +455,11 @@ bool load_include_configs(const char *path, struct sway_config *config) { bool read_config(FILE *file, struct sway_config *config) { bool success = true; + bool multiline = false; enum cmd_status block = CMD_BLOCK_END; int line_number = 0; - char *line; + char *line, *mlinebuf = NULL; while (!feof(file)) { line = read_line(file); line_number++; @@ -467,6 +468,45 @@ bool read_config(FILE *file, struct sway_config *config) { free(line); continue; } + size_t length = strlen(line); + if (line[length-1] == '\\') { + // Start of multiline + if (feof(file)){ + sway_log(L_ERROR, "Error on line %i '%s': Unexpected EOF on "\ + "multiline command", line_number, line); + free(line); + continue; + } + line[length-1] = '\0'; + multiline = true; + } else + multiline = false; + + if (multiline || mlinebuf){ + size_t mlinebuf_length; + if (mlinebuf) + mlinebuf_length = strlen(mlinebuf); + else + mlinebuf_length = 0; + + char *tmp = malloc(mlinebuf_length+length+1); // + '\0' + tmp[0]='\0'; // if mlinebuf_length==0 strncpy won't do anything. Make a null string. + strncpy(tmp, mlinebuf, mlinebuf_length); + tmp[mlinebuf_length]='\0'; // strncpy won't add '\0' at the end... + strcat(tmp, line); + if (mlinebuf) + free(mlinebuf); + free(line); + mlinebuf = tmp; + if (multiline) // The following line is part of a multi line config. + continue; + else { // This is the last line of a multi line config. + line = mlinebuf; + sway_log(L_INFO, "Processing parsed multiline command '%s'", line); + mlinebuf = NULL; + } + } + struct cmd_results *res = config_command(line, block); switch(res->status) { case CMD_FAILURE: diff --git a/sway/sway.5.txt b/sway/sway.5.txt index bd2de12d..397b6d87 100644 --- a/sway/sway.5.txt +++ b/sway/sway.5.txt @@ -16,6 +16,12 @@ 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. +Lines in the configuration file might be extended through multiple lines by +adding a '\' character at the end of line. e.g.: + + bindsym Shift+XF86AudioRaiseVolume exec pactl set-sink-volume \ + $(pactl list sinks | grep -B 1 RUNNING | sed '1q;d' | sed 's/[^0-9]\+//g') +5% + These commands can be executed in your config file, via **sway-msg**(1), or via the bindsym command. From 230591fa4e4911ffbb38da2ee79650e62d98415f Mon Sep 17 00:00:00 2001 From: Roosembert Palacios Date: Mon, 6 Jun 2016 00:17:27 +0200 Subject: [PATCH 07/10] Common: Readline: Ignore newline on '\' escaped line ends. Escape line return when reading from a file with the '\' character. Similar to shell scripts. Signed-off-by: Roosembert Palacios --- common/readline.c | 7 +++++++ sway/config.c | 42 +----------------------------------------- 2 files changed, 8 insertions(+), 41 deletions(-) diff --git a/common/readline.c b/common/readline.c index 76ed6926..5106172c 100644 --- a/common/readline.c +++ b/common/readline.c @@ -5,17 +5,24 @@ char *read_line(FILE *file) { size_t length = 0, size = 128; char *string = malloc(size); + char lastChar = '\0'; if (!string) { return NULL; } while (1) { int c = getc(file); + if (c == '\n' && lastChar == '\\'){ + --length; // Ignore last character. + lastChar = '\0'; + continue; + } if (c == EOF || c == '\n' || c == '\0') { break; } if (c == '\r') { continue; } + lastChar = c; if (length == size) { char *new_string = realloc(string, size *= 2); if (!new_string) { diff --git a/sway/config.c b/sway/config.c index c1eec22f..15108123 100644 --- a/sway/config.c +++ b/sway/config.c @@ -455,11 +455,10 @@ bool load_include_configs(const char *path, struct sway_config *config) { bool read_config(FILE *file, struct sway_config *config) { bool success = true; - bool multiline = false; enum cmd_status block = CMD_BLOCK_END; int line_number = 0; - char *line, *mlinebuf = NULL; + char *line; while (!feof(file)) { line = read_line(file); line_number++; @@ -468,45 +467,6 @@ bool read_config(FILE *file, struct sway_config *config) { free(line); continue; } - size_t length = strlen(line); - if (line[length-1] == '\\') { - // Start of multiline - if (feof(file)){ - sway_log(L_ERROR, "Error on line %i '%s': Unexpected EOF on "\ - "multiline command", line_number, line); - free(line); - continue; - } - line[length-1] = '\0'; - multiline = true; - } else - multiline = false; - - if (multiline || mlinebuf){ - size_t mlinebuf_length; - if (mlinebuf) - mlinebuf_length = strlen(mlinebuf); - else - mlinebuf_length = 0; - - char *tmp = malloc(mlinebuf_length+length+1); // + '\0' - tmp[0]='\0'; // if mlinebuf_length==0 strncpy won't do anything. Make a null string. - strncpy(tmp, mlinebuf, mlinebuf_length); - tmp[mlinebuf_length]='\0'; // strncpy won't add '\0' at the end... - strcat(tmp, line); - if (mlinebuf) - free(mlinebuf); - free(line); - mlinebuf = tmp; - if (multiline) // The following line is part of a multi line config. - continue; - else { // This is the last line of a multi line config. - line = mlinebuf; - sway_log(L_INFO, "Processing parsed multiline command '%s'", line); - mlinebuf = NULL; - } - } - struct cmd_results *res = config_command(line, block); switch(res->status) { case CMD_FAILURE: From 3710cd696385db0b7eb2bbc72c5dfff5de5ce711 Mon Sep 17 00:00:00 2001 From: thuck Date: Mon, 6 Jun 2016 22:20:27 +0200 Subject: [PATCH 08/10] Fix segfault when using include with * This should fix the issue #681 --- sway/config.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sway/config.c b/sway/config.c index 15108123..7530e530 100644 --- a/sway/config.c +++ b/sway/config.c @@ -388,6 +388,11 @@ static bool load_include_config(const char *path, const char *parent_dir, struct char *real_path = realpath(full_path, NULL); free(full_path); + if (real_path == NULL) { + sway_log(L_DEBUG, "%s not found.", path); + return false; + } + // check if config has already been included int j; for (j = 0; j < config->config_chain->length; ++j) { From b00feb25ea324158ba98ba18a0d694e5318682ba Mon Sep 17 00:00:00 2001 From: Zandr Martin Date: Fri, 10 Jun 2016 07:12:25 -0500 Subject: [PATCH 09/10] trigger bg change on config reload --- sway/commands.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sway/commands.c b/sway/commands.c index eab4a1c1..07e7e53d 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -1692,9 +1692,13 @@ static struct cmd_results *cmd_output(int argc, char **argv) { swayc_t *cont = NULL; for (int i = 0; i < root_container.children->length; ++i) { cont = root_container.children->items[i]; - if (cont->name && strcmp(cont->name, output->name) == 0) { + if (cont->name && ((strcmp(cont->name, output->name) == 0) || (strcmp(output->name, "*") == 0))) { apply_output_config(output, cont); - break; + + if (strcmp(output->name, "*") != 0) { + // stop looking if the output config isn't applicable to all outputs + break; + } } } } From cb0cc32265136522f7bfbb768f55f35718248d71 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 10 Jun 2016 09:32:14 -0400 Subject: [PATCH 10/10] Many improvements to man pages --- sway/sway-bar.5.txt | 11 +++-- sway/sway-input.5.txt | 5 +- sway/sway.1.txt | 13 ++++-- sway/sway.5.txt | 104 ++++++++++++++++++++++-------------------- 4 files changed, 73 insertions(+), 60 deletions(-) diff --git a/sway/sway-bar.5.txt b/sway/sway-bar.5.txt index d0727440..dc4a673c 100644 --- a/sway/sway-bar.5.txt +++ b/sway/sway-bar.5.txt @@ -19,10 +19,15 @@ Commands -------- **status_command** :: - Executes the bar _status command_ with _sh -c_. + Executes the bar _status command_ with _sh -c_. Each line of text printed to + stdout from this command will be displayed in the status area of the bar. You + can also use the i3bar JSON protocol: + + + https://i3wm.org/docs/i3bar-protocol.html **pango_markup** :: - Enables or disables pango markup for plaintext statuslines. + Enables or disables pango markup for status lines. This has no effect on + status lines using the i3bar JSON protocol. **id** :: Sets the ID of the bar. @@ -112,4 +117,4 @@ channel. See Also -------- -**sway**(5) **sway-input**(5) +**sway**(5) diff --git a/sway/sway-input.5.txt b/sway/sway-input.5.txt index c2637830..2ac878cd 100644 --- a/sway/sway-input.5.txt +++ b/sway/sway-input.5.txt @@ -37,7 +37,8 @@ Commands Enables or disables middle click emulation. **input** natural_scroll :: - Enables or disables natural scrolling for the specified input device. + Enables or disables natural (inverted) scrolling for the specified input + device. **input** pointer_accel <[-1,1]>:: Changes the pointer acceleration for the specified input device. @@ -51,4 +52,4 @@ Commands See Also -------- -**sway**(5) **sway-bar**(5) +**sway**(5) diff --git a/sway/sway.1.txt b/sway/sway.1.txt index 1243c354..f62e27f4 100644 --- a/sway/sway.1.txt +++ b/sway/sway.1.txt @@ -52,7 +52,7 @@ You may run sway from an ongoing x11 session to run it within x. Otherwise, you can run sway on a tty and it will use your outputs directly. *Important note for nvidia users*: The proprietary nvidia driver does _not_ have -support for Wayland as of 2016-03-27. Use nouveau. +support for Wayland as of 2016-06-10. Use nouveau. Commands -------- @@ -60,7 +60,7 @@ Commands If sway is currently running, you may run _sway [command]_ to send _command_ to the running instance of sway. The same commands you would use in the config file are valid here (see **sway**(5)). For compatibility reasons, you may also issue -commands with **sway-msg**(1) or **i3-msg**(1) (or even with **i3**(1), probably). +commands with **swaymsg**(1) or **i3-msg**(1) (or even with **i3**(1), probably). Configuration ------------- @@ -69,11 +69,14 @@ If _-c_ is not specified, sway will look in several locations for your config file. The suggested location for your config file is ~/.config/sway/config. ~/.sway/config will also work, and the rest of the usual XDG config locations are supported. If no sway config is found, sway will attempt to load an i3 -config from all the config locations i3 supports. At last, sway looks for a -config file in a fallback directory, which is /etc/sway/ by default. A standard +config from all the config locations i3 supports. Sway looks for a config file in +a fallback directory as a last resort, which is /etc/sway/ by default. A standard configuration file is installed at this location. If still nothing is found, you will receive an error. +To write your own config, it's suggested that you copy the default config file to +the location of your choosing and start there. + For information on the config file format, see **sway**(5). Authors @@ -86,4 +89,4 @@ source contributors. For more information about sway development, see See Also -------- -**sway**(5) **swaymsg**(1) **swaygrab**(1) **sway-input** (5) **sway-bar** (5) +**sway**(5) **swaymsg**(1) **swaygrab**(1) **sway-input**(5) **sway-bar**(5) diff --git a/sway/sway.5.txt b/sway/sway.5.txt index 397b6d87..00806112 100644 --- a/sway/sway.5.txt +++ b/sway/sway.5.txt @@ -22,7 +22,7 @@ adding a '\' character at the end of line. e.g.: bindsym Shift+XF86AudioRaiseVolume exec pactl set-sink-volume \ $(pactl list sinks | grep -B 1 RUNNING | sed '1q;d' | sed 's/[^0-9]\+//g') +5% -These commands can be executed in your config file, via **sway-msg**(1), or via +These commands can be executed in your config file, via **swaymsg**(1), or via the bindsym command. Commands @@ -36,53 +36,28 @@ The following commands may only be used in the configuration file. + See **sway-bar**(5) for details. -**input** :: - Append _{_ to this command, the following lines will be commands to configure - the named input device, and _}_ on its own line will close the block. - + - See **sway-input**(5) for details. - **set** :: - Creates a substitution for _value_ that can be used with $_name_ in other - commands. + Sets variable $name to _value_. You can use the new variable in the arguments + of future commands. The following commands cannot be used directly in the configuration file. They are expected to be used with **bindsym** or at runtime through **swaymsg**(1). **border** []:: Set border style for focused window. _normal_ includes a border of thickness - _n_ and a title bar. _pixel_ is just the border without title bar. Default is - _normal_ with border thickness 2. + _n_ and a title bar. _pixel_ is a border without title bar _n_ pixels thick. + Default is _normal_ with border thickness 2. **border** :: Set border style for focused window to _none_ or _toggle_ between the available border styles: _normal_, _pixel_, _none_. -**new_window** []:: - Set default border style for new windows. - -**new_float** []:: - Set default border style for new floating windows. This does only apply to - windows that are spawned in floating mode. - **exit**:: Exit sway and end your Wayland session. **floating** :: Make focused view floating, non-floating, or the opposite of what it is now. -**floating_maximum_size** x :: - Specifies the maximum dimensions of floating windows. - Uses the container dimensions as default. - -1 x -1 will remove any restriction on dimentions. - 0 x 0 has the same behavior as not setting any value. - If in conflict this option has precedence over floating_minimum_size. - -**floating_minimum_size** x :: - Specifies the minimum dimensions of floating windows. - Default parameters are 75 x 50. - -1 and 0 are invalid parameters, default will be used instead. - **focus** :: Direction may be one of _up_, _down_, _left_, _right_, or _parent_. The directional focus commands will move the focus in that direction. The parent @@ -101,9 +76,6 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**( **fullscreen**:: Toggles fullscreen status for the focused view. -**hide_edge_borders** :: - Hide window borders adjacent to the screen edges. Default is _none_. - **layout** :: Sets the layout mode of the focused container. _mode_ can be one of _splith_, _splitv_, _toggle split_, _stacking_ or _tabbed_. @@ -140,8 +112,8 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**( Equivalent to **split toggle**. **sticky** :: - If enabled and the windows is floating it will always be present on the active - workspace on that output. + "Sticks" a floating window to the current output so that it shows up on all + workspaces. The following commands may be used either in the configuration file or triggered at runtime. @@ -155,7 +127,7 @@ or triggered at runtime. **bindsym** :: Binds _key combo_ to execute _command_ when pressed. You may use XKB key names here (**xev**(1) is a good tool for discovering them). An example - bindsym command would be _bindsym Mod1+Shift+f exec firefox_, which would + bindsym command would be **bindsym Mod1+Shift+f exec firefox**, 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. + @@ -201,18 +173,18 @@ The default colors are: [options="header"] |=========================================================================== |color_class |border |background |text |indicator |child_border -|background |n/a |#ffffffff |n/a |n/a |n/a -|focused |#4c7899ff |#285577ff |#ffffffff |#2e9ef4ff |#285577ff -|focused_inactive |#333333ff |#5f676aff |#ffffffff |#484e50ff |#5f676aff -|unfocused |#333333ff |#222222ff |#888888ff |#292d2eff |#222222ff -|urgent |#2f343aff |#900000ff |#ffffffff |#900000ff |#900000ff -|placeholder |#000000ff |#0c0c0cff |#ffffffff |#000000ff |#0c0c0cff +|background |n/a |#ffffff |n/a |n/a |n/a +|focused |#4c7899 |#285577 |#ffffff |#2e9ef4 |#285577 +|focused_inactive |#333333 |#5f676a |#ffffff |#484e50 |#5f676a +|unfocused |#333333 |#222222 |#888888 |#292d2e |#222222 +|urgent |#2f343a |#900000 |#ffffff |#900000 |#900000 +|placeholder |#000000 |#0c0c0c |#ffffff |#000000 |#0c0c0c |=========================================================================== -- **debuglog** :: - Enables, disables or toggles logging for debug. The toggle argument cannot - be used in the configuration file. + Enables, disables or toggles debug logging. The toggle argument cannot be used + in the configuration file. **exec** :: Executes _shell command_ with sh. @@ -221,21 +193,32 @@ The default colors are: Like exec, but the shell command will be executed _again_ after *reload* or *restart* is executed. +**floating_maximum_size** x :: + Specifies the maximum dimensions of floating windows. + Uses the container dimensions as default. + -1 x -1 will remove any restriction on dimentions. + 0 x 0 has the same behavior as not setting any value. + If in conflict this option has precedence over floating_minimum_size. + +**floating_minimum_size** x :: + Specifies the minimum dimensions of floating windows. + Default parameters are 75 x 50. + -1 and 0 are invalid parameters, default will be used instead. + **floating_modifier** [normal|inverse]:: - When the _modifier_ key is held down, you may use left click to drag floating + When the _modifier_ key is held down, you may hold left click to move floating windows, and right click to resize them. Unlike i3, this modifier may also be used to resize and move windows that are tiled. With the _inverse_ mode enabled, left click is used for resizing and right click for dragging. The mode paramenter is optional and defaults to _normal_ if it isn't defined. **floating_scroll** [command]:: - Sets the command to be executed on scrolling in the specified - direction while holding the floating modifier. Resets the - command, when given no arguments. + Sets a command to be executed when the mouse wheel is scrolled in the + specified direction while holding the floating modifier. Resets the command, + when given no arguments. **focus_follows_mouse** :: - If set to _yes_, the currently focused view will change as you move your - mouse around the screen to the view that ends up underneath your mouse. + If set to _yes_, moving your mouse over a window will focus that window. **for_window** :: Whenever a window that matches _criteria_ appears, run list of commands. See @@ -262,6 +245,15 @@ The default colors are: workspace (or current workspace), and _current_ changes gaps for the current view or workspace. +**hide_edge_borders** :: + Hide window borders adjacent to the screen edges. Default is _none_. + +**input** :: + Append _{_ to this command, the following lines will be commands to configure + the named input device, and _}_ on its own line will close the block. + + + See **sway-input**(5) for details. + **smart_gaps** :: If smart_gaps are _on_ then gaps will only be enabled if a workspace has more than one child container. @@ -275,8 +267,20 @@ The default colors are: When _output_: place mouse at center of newly focused window when changing output. When _none_: don't move mouse. +**new_window** []:: + Set default border style for new windows. + +**new_float** []:: + Set default border style for new floating windows. This only applies to + windows that are spawned in floating mode, not windows that become floating + after the fact. + **output** :: Configures the specified output to use the given resolution. + + + _Note_: sway does not currently support modesetting. Your output's native + resolution will be used and the screen will be scaled from the resolution + specified to your native resolution. **output** :: Configures the specified output to be arranged at the given position.