Merge pull request #3066 from mwenzkowski/fix-gaps

Improvements to the runtime only part of the gaps command
master
emersion 6 years ago committed by GitHub
commit d0bb450681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -149,16 +149,17 @@ struct cmd_results *cmd_gaps(int argc, char **argv) {
return error; return error;
} }
bool config_loading = !config->active || config->reloading;
if (argc == 2) { if (argc == 2) {
return gaps_set_defaults(argc, argv); return gaps_set_defaults(argc, argv);
} }
if (argc == 4) { if (argc == 4 && !config_loading) {
if (config->active) { return gaps_set_runtime(argc, argv);
return gaps_set_runtime(argc, argv); }
} else { if (config_loading) {
return cmd_results_new(CMD_INVALID, "gaps", return cmd_results_new(CMD_INVALID, "gaps",
"This syntax can only be used when sway is running"); "Expected 'gaps inner|outer <px>'");
}
} }
return cmd_results_new(CMD_INVALID, "gaps", return cmd_results_new(CMD_INVALID, "gaps",
"Expected 'gaps inner|outer <px>' or " "Expected 'gaps inner|outer <px>' or "

@ -133,6 +133,10 @@ They are expected to be used with *bindsym* or at runtime through *swaymsg*(1).
*fullscreen* *fullscreen*
Toggles fullscreen for the focused view. Toggles fullscreen for the focused view.
*gaps* inner|outer all|current set|plus|minus <amount>
Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the
_current_ workspace.
*layout* default|splith|splitv|stacking|tabbed *layout* default|splith|splitv|stacking|tabbed
Sets the layout mode of the focused container. Sets the layout mode of the focused container.
@ -434,10 +438,6 @@ The default colors are:
This affects new workspaces only, and is used when the workspace doesn't This affects new workspaces only, and is used when the workspace doesn't
have its own gaps settings (see: workspace <ws> gaps inner|outer <amount>). have its own gaps settings (see: workspace <ws> gaps inner|outer <amount>).
*gaps* inner|outer all|current set|plus|minus <amount>
Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the
_current_ workspace.
*hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps *hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps
Hides window borders adjacent to the screen edges. Default is _none_. Hides window borders adjacent to the screen edges. Default is _none_.

Loading…
Cancel
Save