diff options
author | Ian Fan <[email protected]> | 2018-09-30 15:09:09 +0100 |
---|---|---|
committer | Ian Fan <[email protected]> | 2018-10-14 13:33:12 +0100 |
commit | d0b54e932b59baa71b54d842b249400db74ce79b (patch) | |
tree | dc8a6aa3920b8d54e24d2ab97dab2c7d1dbbe4b8 /swaybar/ipc.c | |
parent | 1f90f92f45580adfbe4ce363181331c182f3f341 (diff) |
swaybar: save id upon startup
This adds an id property to the bar, which will be used to filter
barconfig_update events
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r-- | swaybar/ipc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c index a67814c1..84046ab5 100644 --- a/swaybar/ipc.c +++ b/swaybar/ipc.c @@ -345,10 +345,10 @@ void ipc_execute_binding(struct swaybar *bar, struct swaybar_binding *bind) { IPC_COMMAND, bind->command, &len)); } -bool ipc_initialize(struct swaybar *bar, const char *bar_id) { - uint32_t len = strlen(bar_id); +bool ipc_initialize(struct swaybar *bar) { + uint32_t len = strlen(bar->id); char *res = ipc_single_command(bar->ipc_socketfd, - IPC_GET_BAR_CONFIG, bar_id, &len); + IPC_GET_BAR_CONFIG, bar->id, &len); if (!ipc_parse_config(bar->config, res)) { free(res); return false; |