aboutsummaryrefslogtreecommitdiff
path: root/include/sway/commands.h
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-22 19:51:02 -0500
committerGitHub <noreply@github.com>2018-09-22 19:51:02 -0500
commit68395f34f686aa1901077505405775ba5bafe6ee (patch)
tree0c3a2cff652b212830efb9d674c1b8d6d305bcac /include/sway/commands.h
parentae2055dcf1d389b0acefad4c55cb6030731e9c51 (diff)
parentcb66bbea42adeabd7bd87132a66589e14a46940f (diff)
Merge pull request #2688 from RyanDwyer/exec-commands-without-focus
Allow running commands on containers without focusing them
Diffstat (limited to 'include/sway/commands.h')
-rw-r--r--include/sway/commands.h9
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 @@
#include <wlr/util/edges.h>
#include "config.h"
+struct sway_container;
+
typedef struct cmd_results *sway_cmd(int argc, char **argv);
struct cmd_handler {
@@ -50,8 +52,13 @@ struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers,
int handlers_size);
/**
* Parse and executes a command.
+ *
+ * If the command string contains criteria then the command will be executed on
+ * all matching containers. Otherwise, it'll run on the `con` container. If
+ * `con` is NULL then it'll run on the currently focused container.
*/
-struct cmd_results *execute_command(char *command, struct sway_seat *seat);
+struct cmd_results *execute_command(char *command, struct sway_seat *seat,
+ struct sway_container *con);
/**
* Parse and handles a command during config file loading.
*