-
-
Notifications
You must be signed in to change notification settings - Fork 724
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
Implement 'active_only' option and 'visible' class in hyprland/workspaces #2408
Implement 'active_only' option and 'visible' class in hyprland/workspaces #2408
Conversation
src/modules/hyprland/workspaces.cpp
Outdated
@@ -319,6 +330,12 @@ void add_or_remove_class(const Glib::RefPtr<Gtk::StyleContext> &context, bool co | |||
} | |||
|
|||
void Workspace::update(const std::string &format, const std::string &icon) { | |||
if (this->workspace_manager_.active_only() && !this->active()) { |
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.
Once urgent
workspaces are implemented in this module, we can simply add a check for this->urgent() here. Then it would work the same as in the wlr/workspaces
module.
i think it should show the current visible workspace in the bar's monitor or the active globally in case of persistent workspaces probably shouldn't be affected by this option since they can be set by the user in the config (if possible test |
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.
the rest LGTM
What would be the preferred behaviour? If a persistent workspace is active, should it show the active icon (current behaviour) or the persistent icon? The current behaviour seems to work fine for me. |
was not working as intended, not sure if it has been fixed |
Ah, I thought you meant something like this, which does work: "format-icons": {
"default": "O",
"active": "a",
"persistent": "p",
"special": "s"
}, Your example indeed doesn't work, I'll fix that. EDIT: Nevermind, it does work on the current master (I was looking at the wrong monitor). I think it may have been fixed here: #2393 |
4773d1e
to
f99002f
Compare
f99002f
to
9fb7696
Compare
Sorry this took so long, I haven't had much time lately and I kept getting issues compiling due to the Let me know if this is the correct behaviour or not:
|
The EDIT: nevermind, I mistyped the css classname in my style.css file ( |
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.
lgtm
@zjeffer looks like this needs a rebase btw |
30ff369
to
96343c1
Compare
96343c1
to
04b39ea
Compare
@Alexays Ready to merge. |
Closes #2465 |
Thanks! |
Is it intended behaviour that active-only displays both workspaces if two monitors are at the same time? |
@NotAShelf only if all-outputs is true. If it's false, it should only show the current monitor's active workspace. |
Understood. Any chance we could get a rule to see one active workspace at a time, regardless of monitor? Similar to active-only + all-outputs behaviour on wlr/workspaces |
Do you mean you want to see the same active workspace on every monitor? Like if workspace 1 is active on monitor 1, you also want to see "1" in monitor 2? |
More or less, yes. I have a single bar on monitor 1, and I'd love to see only the active workspace. For example if workspace 1 is on monitor 1 and workspace 5 is on monitor 2, it would display only the focused workspace, which is either 1 or 5 depending on which monitor I'm on. |
I'm looking for a way to have active workspace (e.g. 9) on a not focused monitor (e.g. B) to have a different style applied to it on the bar on monitor B compared to other workspaces there. Reading this, I'm not sure it is possible nor which combination to try 😕 Edit: Running git version seems to have improved things! |
With this PR,
active_only
can be set to true, which will only show the active workspace.If I understand the feature request correctly, each monitor should show the currently visible workspace, right? This PR currently only shows the active one as reported by Hyprland, so if a monitor is not focused, it will not show any workspaces. Is this supposed to happen? I would expect it to be better if each monitor shows one "active" workspace, i.e. the one currently visible.
Let me know if this can be improved.
CC @Anakael @MightyPlaza