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

Allow hiding/unhiding the bar with SIGUSR1/2 #415

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vilhalmer
Copy link

I'm not sure if this is something you'd actually want to upstream, but I'm posting it for consideration. This allows you to hide all blocks on the bar with SIGUSR1 and restore them with SIGUSR2. It doesn't actually prevent the blocks from updating, so there's no stale information when they are unhidden.

My usecase is temporarily making swaybar invisible without changing its height, so I can draw a transparent bemenu into the space. When bemenu closes, I restore the contents of the bar.

The rationale for splitting hide/show into separate signals is to allow an external script to do state tracking if necessary. If the hidden state was instead toggled with a single signal, you risk it getting out of sync with the calling script.

@vilhalmer
Copy link
Author

(This seems to have some side-effects that I don't understand yet, will work on cleaning them up if this is of interest.)

@vilhalmer
Copy link
Author

Fixed the side-effects, I was hiding things one level too deep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant