2016-09-02 04:39:08 +02:00
|
|
|
#include <string.h>
|
2016-09-02 21:11:48 +02:00
|
|
|
#include "sway/commands.h"
|
2016-09-02 04:39:08 +02:00
|
|
|
|
|
|
|
struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) {
|
|
|
|
struct cmd_results *error = NULL;
|
|
|
|
if ((error = checkarg(argc, "hide_edge_borders", EXPECTED_EQUAL_TO, 1))) {
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strcasecmp(argv[0], "none") == 0) {
|
|
|
|
config->hide_edge_borders = E_NONE;
|
|
|
|
} else if (strcasecmp(argv[0], "vertical") == 0) {
|
|
|
|
config->hide_edge_borders = E_VERTICAL;
|
|
|
|
} else if (strcasecmp(argv[0], "horizontal") == 0) {
|
|
|
|
config->hide_edge_borders = E_HORIZONTAL;
|
|
|
|
} else if (strcasecmp(argv[0], "both") == 0) {
|
|
|
|
config->hide_edge_borders = E_BOTH;
|
2017-01-12 12:11:04 +01:00
|
|
|
} else if (strcasecmp(argv[0], "smart") == 0) {
|
|
|
|
config->hide_edge_borders = E_SMART;
|
2016-09-02 04:39:08 +02:00
|
|
|
} else {
|
|
|
|
return cmd_results_new(CMD_INVALID, "hide_edge_borders",
|
|
|
|
"Expected 'hide_edge_borders <none|vertical|horizontal|both>'");
|
|
|
|
}
|
|
|
|
|
|
|
|
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
|
|
|
}
|