mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
swaybar: save id upon startup
This adds an id property to the bar, which will be used to filter barconfig_update events
This commit is contained in:
parent
1f90f92f45
commit
d0b54e932b
5 changed files with 13 additions and 13 deletions
|
|
@ -517,14 +517,13 @@ static void set_bar_dirty(struct swaybar *bar) {
|
|||
}
|
||||
}
|
||||
|
||||
bool bar_setup(struct swaybar *bar,
|
||||
const char *socket_path, const char *bar_id) {
|
||||
bool bar_setup(struct swaybar *bar, const char *socket_path) {
|
||||
bar_init(bar);
|
||||
init_event_loop();
|
||||
|
||||
bar->ipc_socketfd = ipc_open_socket(socket_path);
|
||||
bar->ipc_event_socketfd = ipc_open_socket(socket_path);
|
||||
if (!ipc_initialize(bar, bar_id)) {
|
||||
if (!ipc_initialize(bar)) {
|
||||
return false;
|
||||
}
|
||||
if (bar->config->status_command) {
|
||||
|
|
@ -625,4 +624,5 @@ void bar_teardown(struct swaybar *bar) {
|
|||
if (bar->status) {
|
||||
status_line_free(bar->status);
|
||||
}
|
||||
free(bar->id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue