-
-
Notifications
You must be signed in to change notification settings - Fork 720
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
Add dwl/tags option to show only active tags #3504
base: master
Are you sure you want to change the base?
Conversation
const bool show_only_viable = config_["show-only-viable"].asBool(); | ||
if (show_only_viable) { | ||
if (clients > 0 || state & (TAG_ACTIVE | TAG_URGENT)) { | ||
button.show(); |
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.
Not sure if blindly calling show/hide
is OK, was thinking about button.is_visible()
checks.
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.
show
and hide
are deprecated since 4.10.
Use gtk_widget_set_visible() instead:
if (clients || state & (TAG_ACTIVE | TAG_URGENT)) {
button.set_visible(true);
} else {
button.set_visible(false);
}
d623a89
to
a4d31ab
Compare
Would it be possible to have similar feature in River tags? |
const bool show_only_viable = config_["show-only-viable"].asBool(); | ||
if (show_only_viable) { | ||
if (clients > 0 || state & (TAG_ACTIVE | TAG_URGENT)) { | ||
button.show(); |
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.
show
and hide
are deprecated since 4.10.
Use gtk_widget_set_visible() instead:
if (clients || state & (TAG_ACTIVE | TAG_URGENT)) {
button.set_visible(true);
} else {
button.set_visible(false);
}
|
||
const bool show_only_viable = config_["show-only-viable"].asBool(); | ||
if (show_only_viable) { | ||
if (clients > 0 || state & (TAG_ACTIVE | TAG_URGENT)) { |
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.
You can just use clients
in the condition without > 0
:
if (clients || state & (TAG_ACTIVE | TAG_URGENT)) {
Just implemented this over here: #3823 |
Not an experienced C++ developer at all, will be glad to hear any advice 🙏
Generally, it's like
sway/workspaces
behavior.