Introduce tiling_drag directive

master
Ryan Dwyer 6 years ago
parent d4e80cf301
commit ec9c4de564

@ -161,6 +161,7 @@ sway_cmd cmd_sticky;
sway_cmd cmd_swaybg_command;
sway_cmd cmd_swaynag_command;
sway_cmd cmd_swap;
sway_cmd cmd_tiling_drag;
sway_cmd cmd_title_format;
sway_cmd cmd_unmark;
sway_cmd cmd_urgent;

@ -365,6 +365,7 @@ struct sway_config {
bool validating;
bool auto_back_and_forth;
bool show_marks;
bool tiling_drag;
bool edge_gaps;
bool smart_gaps;

@ -127,6 +127,7 @@ static struct cmd_handler handlers[] = {
{ "set", cmd_set },
{ "show_marks", cmd_show_marks },
{ "smart_gaps", cmd_smart_gaps },
{ "tiling_drag", cmd_tiling_drag },
{ "workspace", cmd_workspace },
{ "workspace_auto_back_and_forth", cmd_ws_auto_back_and_forth },
};

@ -0,0 +1,13 @@
#include "sway/commands.h"
#include "util.h"
struct cmd_results *cmd_tiling_drag(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "tiling_drag", EXPECTED_EQUAL_TO, 1))) {
return error;
}
config->tiling_drag = parse_boolean(argv[0], config->tiling_drag);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}

@ -225,6 +225,7 @@ static void config_defaults(struct sway_config *config) {
config->auto_back_and_forth = false;
config->reading = false;
config->show_marks = true;
config->tiling_drag = true;
config->edge_gaps = true;
config->smart_gaps = false;

@ -83,6 +83,7 @@ sway_sources = files(
'commands/swaybg_command.c',
'commands/swaynag_command.c',
'commands/swap.c',
'commands/tiling_drag.c',
'commands/title_format.c',
'commands/unmark.c',
'commands/urgent.c',

Loading…
Cancel
Save