From f2d29ceb6b831a07ce2bce4534fe6fec1f16eee3 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Sun, 26 Mar 2023 17:44:21 +0200 Subject: Extend minimize logic to work with XWayland and XDG applications (#132) * Extend minimize logic * Removed redundant xwayland minimize logic * minor fixes * Fixed not properly checking if window is ran though XWayland * Added config option with default being off * Set scratchpad_minimize to true by default * Improve config dependant logic * Switch to using enable|disable instead of on|off --- sway/commands/scratchpad_minimize.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sway/commands/scratchpad_minimize.c (limited to 'sway/commands/scratchpad_minimize.c') diff --git a/sway/commands/scratchpad_minimize.c b/sway/commands/scratchpad_minimize.c new file mode 100644 index 00000000..1245e1d5 --- /dev/null +++ b/sway/commands/scratchpad_minimize.c @@ -0,0 +1,18 @@ +#include +#include "sway/commands.h" +#include "sway/config.h" +#include "log.h" +#include "stringop.h" +#include "util.h" + +struct cmd_results *cmd_scratchpad_minimize(int argc, char **argv) { + struct cmd_results *error = checkarg(argc, "scratchpad_minimize", EXPECTED_AT_LEAST, 1); + + if (error) { + return error; + } + + config->scratchpad_minimize = parse_boolean(argv[0], config->scratchpad_minimize); + + return cmd_results_new(CMD_SUCCESS, NULL); +} -- cgit v1.2.3