mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
Reload swaybar/swaybg on config reload.
This works by tracking the pids of the child processes in the related output container and terminating the processes and spawning new ones on a config reload. Should solve: #347
This commit is contained in:
parent
de219f6bec
commit
ede27eabc5
5 changed files with 125 additions and 44 deletions
|
|
@ -184,6 +184,8 @@ int sway_mouse_binding_cmp(const void *a, const void *b);
|
|||
int sway_mouse_binding_cmp_buttons(const void *a, const void *b);
|
||||
void free_sway_mouse_binding(struct sway_mouse_binding *smb);
|
||||
|
||||
void load_swaybars(swayc_t *output, int output_idx);
|
||||
|
||||
/**
|
||||
* Allocate and initialize default bar configuration.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#ifndef _SWAY_CONTAINER_H
|
||||
#define _SWAY_CONTAINER_H
|
||||
#include <sys/types.h>
|
||||
#include <wlc/wlc.h>
|
||||
typedef struct sway_container swayc_t;
|
||||
|
||||
|
|
@ -81,6 +82,11 @@ struct sway_container {
|
|||
char *class;
|
||||
char *app_id;
|
||||
|
||||
// Used by output containers to keep track of swaybar/swaybg child
|
||||
// processes.
|
||||
list_t *bar_pids;
|
||||
pid_t bg_pid;
|
||||
|
||||
int gaps;
|
||||
|
||||
list_t *children;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue