diff options
author | Brian Ashworth <[email protected]> | 2018-05-30 13:20:02 -0400 |
---|---|---|
committer | Brian Ashworth <[email protected]> | 2018-06-02 08:07:44 -0400 |
commit | 7c810dc344c28d1876c5ee158cb0806289d0f813 (patch) | |
tree | dbe756bceca42ea6f9a6cf5e5771037417bb64c3 /sway/commands/bar/id.c | |
parent | 2d480e754e8287ba747faf1b21d8ecb927d565a1 (diff) |
Make command block implementation generic
Diffstat (limited to 'sway/commands/bar/id.c')
-rw-r--r-- | sway/commands/bar/id.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/bar/id.c b/sway/commands/bar/id.c index c1e56f03..6ce86fef 100644 --- a/sway/commands/bar/id.c +++ b/sway/commands/bar/id.c @@ -11,6 +11,9 @@ struct cmd_results *bar_cmd_id(int argc, char **argv) { const char *name = argv[0]; const char *oldname = config->current_bar->id; + if (strcmp(name, oldname) == 0) { + return cmd_results_new(CMD_SUCCESS, NULL, NULL); // NOP + } // check if id is used by a previously defined bar for (int i = 0; i < config->bars->length; ++i) { struct bar_config *find = config->bars->items[i]; |