-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reload swaybar/swaybg on config reload. #358
Conversation
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: swaywm#347
f140789
to
90ff36c
Compare
This has one problem where the windows will cover the bar after a reload until you do something to rearrange them, i.e. spawn a new window. I suspect this also happens on startup but since you don't have any windows open at that point you won't see it. Any ideas how to update the layout correctly when spawning the bar after a reload? |
@mikkeloscar just run |
Hmm, that is called in I just tried on the master branch and if you spawn a window and then spawn a swaybar manually the same thing happens (it spawns behind the window). I did a bisect of master and I think this issue was introduced in ed730db |
Hmm... I'm looking in to it now. |
// processes. | ||
list_t *bar_pids; | ||
pid_t bg_pid; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This struct is getting kind of out of control. Half of the properties only apply to a certain kind of swayc (i.e. C_OUTPUT, in this case). Can we figure out a good way of splitting these up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is the best approach, but what about adding a void*
field to swayc_t
which can be used for whatever, in this case it would point to:
struct swayc_output {
list_t *bar_pids;
pid_t bg_pid;
// other fields unique to a swayc_t of type C_OUTPUT
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a union of pointers to type-specific data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's probably better so we don't need to cast all over the place.
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