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

gui: store hidden status of buffers in layout (implements #152) #1511

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxcrees
Copy link

This allows buffers to be persistently hidden between sessions of
weechat if the layout is saved to the configuration.

@maxcrees
Copy link
Author

As an additional note, this is especially useful in conjunction with a trigger like the following so one can keep buffers hidden indefinitely until they gain new activity:

unhide_buffer: line
               =? "${buffer.hidden} && ${displayed} && ${notify_level} >= 1"
               /1 "/buffer unhide ${buffer.number}"

This allows buffers to be persistently hidden between sessions of
weechat if the layout is saved to the configuration.
@flashcode flashcode added the feature New feature request label May 18, 2020
@sim642
Copy link
Member

sim642 commented May 19, 2020

Just to have this documented: PR #1412 and this PR would cause a conflict if both were merged. Both add a new field in the config file lines of layouts.

@maxcrees
Copy link
Author

Maybe we can combine them into one PR such that active/zoom/hidden state is stored in one variable as a set of flags.

@sim642
Copy link
Member

sim642 commented May 19, 2020

It's probably not worth the effort since in WeeChat's structs they're separate fields anyway, so correctly combining and splitting them is just extra effort. And also error-prone if one of those is changed in the future.

@maxcrees
Copy link
Author

It would be more extensible if more things need to be stored in the layout configuration in the future though. I'm not sure what you mean by it being error-prone, though I have seen some people muck up enums on accident before...

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

Successfully merging this pull request may close these issues.

None yet

3 participants