diff options
Diffstat (limited to 'sway/commands/bar/secondary_button.c')
-rw-r--r-- | sway/commands/bar/secondary_button.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/sway/commands/bar/secondary_button.c b/sway/commands/bar/secondary_button.c index 745045c5..449124cb 100644 --- a/sway/commands/bar/secondary_button.c +++ b/sway/commands/bar/secondary_button.c | |||
@@ -3,24 +3,6 @@ | |||
3 | #include "log.h" | 3 | #include "log.h" |
4 | 4 | ||
5 | struct cmd_results *bar_cmd_secondary_button(int argc, char **argv) { | 5 | struct cmd_results *bar_cmd_secondary_button(int argc, char **argv) { |
6 | const char *cmd_name = "secondary_button"; | 6 | // TODO TRAY |
7 | #ifndef ENABLE_TRAY | 7 | return cmd_results_new(CMD_INVALID, "secondary_button", "TODO TRAY"); |
8 | return cmd_results_new(CMD_INVALID, cmd_name, "Invalid %s command " | ||
9 | "%s called, but sway was compiled without tray support", | ||
10 | cmd_name, cmd_name); | ||
11 | #else | ||
12 | struct cmd_results *error = NULL; | ||
13 | if ((error = checkarg(argc, cmd_name, EXPECTED_EQUAL_TO, 1))) { | ||
14 | return error; | ||
15 | } | ||
16 | |||
17 | if (!config->current_bar) { | ||
18 | return cmd_results_new(CMD_FAILURE, cmd_name, "No bar defined."); | ||
19 | } | ||
20 | |||
21 | // User should be able to prefix with 0x or whatever they want | ||
22 | config->current_bar->secondary_button = strtoul(argv[0], NULL, 0); | ||
23 | |||
24 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | ||
25 | #endif | ||
26 | } | 8 | } |