aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/commands.c1
-rw-r--r--sway/commands/nop.c5
-rw-r--r--sway/meson.build1
-rw-r--r--sway/sway.5.scd4
4 files changed, 11 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 364c26da..d9c54adc 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -146,6 +146,7 @@ static struct cmd_handler command_handlers[] = {
{ "layout", cmd_layout },
{ "mark", cmd_mark },
{ "move", cmd_move },
+ { "nop", cmd_nop },
{ "opacity", cmd_opacity },
{ "reload", cmd_reload },
{ "rename", cmd_rename },
diff --git a/sway/commands/nop.c b/sway/commands/nop.c
new file mode 100644
index 00000000..c12fe15a
--- /dev/null
+++ b/sway/commands/nop.c
@@ -0,0 +1,5 @@
+#include "sway/commands.h"
+
+struct cmd_results *cmd_nop(int argc, char **argv) {
+ return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+}
diff --git a/sway/meson.build b/sway/meson.build
index 2a457270..676422d0 100644
--- a/sway/meson.build
+++ b/sway/meson.build
@@ -64,6 +64,7 @@ sway_sources = files(
'commands/mouse_warping.c',
'commands/move.c',
'commands/no_focus.c',
+ 'commands/nop.c',
'commands/output.c',
'commands/reload.c',
'commands/rename.c',
diff --git a/sway/sway.5.scd b/sway/sway.5.scd
index 70b74a45..0378a3d5 100644
--- a/sway/sway.5.scd
+++ b/sway/sway.5.scd
@@ -167,6 +167,10 @@ They are expected to be used with *bindsym* or at runtime through *swaymsg*(1).
*move* [to] scratchpad
Moves the focused window to the scratchpad.
+*nop* <comment>
+ A no operation command that can be used to override default behaviour. The
+ optional comment argument is ignored, but logged for debugging purposes.
+
*reload*
Reloads the sway config file and applies any changes.