summaryrefslogtreecommitdiff
path: root/sway/commands/shadows_on_csd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/shadows_on_csd.c')
-rw-r--r--sway/commands/shadows_on_csd.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/sway/commands/shadows_on_csd.c b/sway/commands/shadows_on_csd.c
new file mode 100644
index 00000000..c9f56dd1
--- /dev/null
+++ b/sway/commands/shadows_on_csd.c
@@ -0,0 +1,23 @@
+#include <string.h>
+#include "sway/commands.h"
+#include "sway/config.h"
+#include "sway/tree/arrange.h"
+#include "sway/tree/view.h"
+#include "sway/tree/container.h"
+#include "log.h"
+#include "stringop.h"
+#include "util.h"
+
+struct cmd_results *cmd_shadows_on_csd(int argc, char **argv) {
+ struct cmd_results *error = checkarg(argc, "shadows_on_csd", EXPECTED_AT_LEAST, 1);
+
+ if (error) {
+ return error;
+ }
+
+ config->shadows_on_csd_enabled = parse_boolean(argv[0], config->shadows_on_csd_enabled);
+
+ arrange_root();
+
+ return cmd_results_new(CMD_SUCCESS, NULL);
+}