diff options
author | 2018-09-22 19:51:02 -0500 | |
---|---|---|
committer | 2018-09-22 19:51:02 -0500 | |
commit | 68395f34f686aa1901077505405775ba5bafe6ee (patch) | |
tree | 0c3a2cff652b212830efb9d674c1b8d6d305bcac /include | |
parent | Merge pull request #2690 from ianyfan/commands (diff) | |
parent | Allow running commands on containers without focusing them (diff) | |
download | sway-68395f34f686aa1901077505405775ba5bafe6ee.tar.gz sway-68395f34f686aa1901077505405775ba5bafe6ee.tar.zst sway-68395f34f686aa1901077505405775ba5bafe6ee.zip |
Merge pull request #2688 from RyanDwyer/exec-commands-without-focus
Allow running commands on containers without focusing them
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/commands.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index 226cf932..1654eb48 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #include <wlr/util/edges.h> | 4 | #include <wlr/util/edges.h> |
5 | #include "config.h" | 5 | #include "config.h" |
6 | 6 | ||
7 | struct sway_container; | ||
8 | |||
7 | typedef struct cmd_results *sway_cmd(int argc, char **argv); | 9 | typedef struct cmd_results *sway_cmd(int argc, char **argv); |
8 | 10 | ||
9 | struct cmd_handler { | 11 | struct cmd_handler { |
@@ -50,8 +52,13 @@ struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers, | |||
50 | int handlers_size); | 52 | int handlers_size); |
51 | /** | 53 | /** |
52 | * Parse and executes a command. | 54 | * Parse and executes a command. |
55 | * | ||
56 | * If the command string contains criteria then the command will be executed on | ||
57 | * all matching containers. Otherwise, it'll run on the `con` container. If | ||
58 | * `con` is NULL then it'll run on the currently focused container. | ||
53 | */ | 59 | */ |
54 | struct cmd_results *execute_command(char *command, struct sway_seat *seat); | 60 | struct cmd_results *execute_command(char *command, struct sway_seat *seat, |
61 | struct sway_container *con); | ||
55 | /** | 62 | /** |
56 | * Parse and handles a command during config file loading. | 63 | * Parse and handles a command during config file loading. |
57 | * | 64 | * |