Skip to content
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

[feature request] Idempotent and user-configurable kill signals #3928

Open
Invertisment opened this issue Feb 8, 2025 · 0 comments
Open
Labels
bug Something isn't working clock custom enhancement New feature or request inhibitor memory

Comments

@Invertisment
Copy link

Invertisment commented Feb 8, 2025

There are countless issues about hiding and showing the bar, hiding it automatically and whatever:
https://github.com/Alexays/Waybar/issues?q=is%3Aissue%20hide%20show

#3853
#3456
#2330
#1058

There is no proper way of showing and hiding the bar that would be "the best way".
What I mean by this is that I find toggle on SIGUSR1 not reliable. If I spam my waybar visibliity toggle key then Waybar sometimes ends up in the reverse state and there isn't a good way to automatically mitigate this (no, toggling the bar again doesn't work if I toggle it on keydown+keyup).
For instance I can use SIGUSR2 to reset the bar to its default idle configuration but then it introduces UI lag and I don't want lag.

I think one way of approaching it would be to be able to set what SIGUSR1 and SIGUSR2 do via the config.
And this is easy to do.

What I propose is to have an alternative to toggle and reload where the user could decide what command to activate on SIGUSR1.
It could be a command-line parameter like this waybar --on-sigusr1 hide --on-sigusr2 show or a config var "on-sigusr1": "toggle" and so on.

This way I could send the hide on some key action from my window manager and decide externally whether I want to send it or not.
And it would never jam.

It would also work on multiple bars and so on because you can do kill on specific pids. So no design change here.
And if somebody else would want to hide/show multiple bars via timeouts or in any way then they could write a bash script to do what they want.

@github-actions github-actions bot added bug Something isn't working clock enhancement New feature or request inhibitor memory custom labels Feb 8, 2025
@Invertisment Invertisment changed the title [feature request] Idempotent kill signals and user-configurable kill signals [feature request] Idempotent and user-configurable kill signals Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clock custom enhancement New feature or request inhibitor memory
Projects
None yet
Development

No branches or pull requests

1 participant