diff --git a/completions/fish/swaymsg.fish b/completions/fish/swaymsg.fish index 1e5bf3da..fd577413 100644 --- a/completions/fish/swaymsg.fish +++ b/completions/fish/swaymsg.fish @@ -16,4 +16,5 @@ complete -c swaymsg -s t -l type -fra 'get_bar_config' --description "Get a JSON complete -c swaymsg -s t -l type -fra 'get_version' --description "Get JSON-encoded version information for the running instance of sway." complete -c swaymsg -s t -l type -fra 'get_binding_modes' --description "Gets a JSON-encoded list of currently configured binding modes." complete -c swaymsg -s t -l type -fra 'get_config' --description "Gets a JSON-encoded copy of the current configuration." +complete -c swaymsg -s t -l type -fra 'get_seats' --description "Gets a JSON-encoded list of all seats, its properties and all assigned devices." complete -c swaymsg -s t -l type -fra 'send_tick' --description "Sends a tick event to all subscribed clients." diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c index 8bdeceeb..7a15709b 100644 --- a/sway/commands/exec_always.c +++ b/sway/commands/exec_always.c @@ -15,7 +15,7 @@ struct cmd_results *cmd_exec_always(int argc, char **argv) { struct cmd_results *error = NULL; - if (!config->active) return cmd_results_new(CMD_DEFER, NULL, NULL); + if (!config->active || config->validating) return cmd_results_new(CMD_DEFER, NULL, NULL); if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) { return error; } diff --git a/sway/commands/focus.c b/sway/commands/focus.c index cef92144..f6338c55 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c @@ -156,6 +156,14 @@ static struct sway_node *node_get_in_direction(struct sway_container *container, if (new_output) { return get_node_in_output_direction(new_output, dir); } + + // If there is a wrap candidate, return its focus inactive view + if (wrap_candidate) { + struct sway_container *wrap_inactive = seat_get_focus_inactive_view( + seat, &wrap_candidate->node); + return &wrap_inactive->node; + } + return NULL; } diff --git a/sway/commands/gaps.c b/sway/commands/gaps.c index ca8cb27a..3f0ef155 100644 --- a/sway/commands/gaps.c +++ b/sway/commands/gaps.c @@ -149,16 +149,17 @@ struct cmd_results *cmd_gaps(int argc, char **argv) { return error; } + bool config_loading = !config->active || config->reloading; + if (argc == 2) { return gaps_set_defaults(argc, argv); } - if (argc == 4) { - if (config->active) { - return gaps_set_runtime(argc, argv); - } else { - return cmd_results_new(CMD_INVALID, "gaps", - "This syntax can only be used when sway is running"); - } + if (argc == 4 && !config_loading) { + return gaps_set_runtime(argc, argv); + } + if (config_loading) { + return cmd_results_new(CMD_INVALID, "gaps", + "Expected 'gaps inner|outer '"); } return cmd_results_new(CMD_INVALID, "gaps", "Expected 'gaps inner|outer ' or " diff --git a/sway/config.c b/sway/config.c index 9ec40367..7ef3ef38 100644 --- a/sway/config.c +++ b/sway/config.c @@ -389,7 +389,8 @@ bool load_main_config(const char *file, bool is_active, bool validating) { config_defaults(config); config->validating = validating; if (is_active) { - wlr_log(WLR_DEBUG, "Performing configuration file reload"); + wlr_log(WLR_DEBUG, "Performing configuration file %s", + validating ? "validation" : "reload"); config->reloading = true; config->active = true; diff --git a/sway/input/seat.c b/sway/input/seat.c index 64419afa..54fdf40b 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -55,9 +55,6 @@ void seat_destroy(struct sway_seat *seat) { free(seat); } -static struct sway_seat_node *seat_node_from_node( - struct sway_seat *seat, struct sway_node *node); - static void seat_node_destroy(struct sway_seat_node *seat_node) { wl_list_remove(&seat_node->destroy.link); wl_list_remove(&seat_node->link); diff --git a/sway/sway.5.scd b/sway/sway.5.scd index b3d696f2..4a645837 100644 --- a/sway/sway.5.scd +++ b/sway/sway.5.scd @@ -133,6 +133,10 @@ They are expected to be used with *bindsym* or at runtime through *swaymsg*(1). *fullscreen* Toggles fullscreen for the focused view. +*gaps* inner|outer all|current set|plus|minus + Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the + _current_ workspace. + *layout* default|splith|splitv|stacking|tabbed Sets the layout mode of the focused container. @@ -364,6 +368,7 @@ The default colors are: : #000000 : #0c0c0c + *debuglog* on|off|toggle Enables, disables or toggles debug logging. _toggle_ cannot be used in the configuration file. @@ -433,10 +438,6 @@ The default colors are: This affects new workspaces only, and is used when the workspace doesn't have its own gaps settings (see: workspace gaps inner|outer ). -*gaps* inner|outer all|current set|plus|minus - 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 Hides window borders adjacent to the screen edges. Default is _none_. diff --git a/swaymsg/swaymsg.1.scd b/swaymsg/swaymsg.1.scd index 8cf1b222..eaac8105 100644 --- a/swaymsg/swaymsg.1.scd +++ b/swaymsg/swaymsg.1.scd @@ -50,6 +50,10 @@ _swaymsg_ [options...] [message] Gets a JSON-encoded layout tree of all open windows, containers, outputs, workspaces, and so on. +*get\_seats* + Gets a JSON-encoded list of all seats, + its properties and all assigned devices. + *get\_marks* Get a JSON-encoded list of marks.