-
-
Notifications
You must be signed in to change notification settings - Fork 108
feat(glazewm): scroll through workspaces #328
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
feat(glazewm): scroll through workspaces #328
Conversation
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.
Works well on a single monitor setup. Just two observations:
- If there are multiple monitors with workspaces like
1, 2, 3, 4
and5, 6, 7, 8
it will scroll through all of them which is quite counterintuitive. You start scrolling on one screen expecting it to loop through that set of workspaces and it goes to the second screen. - Another thing I noticed is that it also scrolls through empty workspaces by default, which is ok, but it would be great to have this as an option in the config.
I get that this complicates the implementation quite a bit and it will not be as elegant as it is right now, but it will improve the usefulness of this feature quite a lot.
is there a way for me to test multiple monitor with one monitor? |
d0eada7
to
254e656
Compare
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.
Tested it. Works as expected with scroll_through_empty: false
.
However, it starts scrolling through all the workspaces on both monitors again when scroll_through_empty: true
when there is for workspace in current_mon.workspaces:
# Get or create workspace button if it's not present
if (btn := self.workspaces.get(workspace.name)) is None:
btn = self.workspaces[workspace.name] = GlazewmWorkspaceButton(
workspace.name,
self.glazewm_client,
display_name=workspace.display_name,
populated_label=self.populated_label,
empty_label=self.empty_label,
active_populated_label=self.active_populated_label,
active_empty_label=self.active_empty_label,
)
add_shadow(btn, self.btn_shadow)
# Update workspace state
btn.workspace_name = workspace.name
btn.display_name = workspace.display_name
btn.workspace_window_count = workspace.num_windows
btn.is_displayed = workspace.is_displayed this doesn't give us back the empty workspaces so i don't know how to work around that. |
Oh right, it's a problem with glaze, I forgot. It won't give you empty workspaces and you can't know what was in the user config from a simple IPC request... Same issue with |
Maybe than i will get rid of the option and do it so it won't scroll through empty ones. Is that good? |
Yeah, I guess that's the best approach. At least until GlazeWM updates its IPC capabilities or we find a workaround for empty workspaces in general. |
254e656
to
e10fef9
Compare
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.
Works well 👍
When hovering over the workspaces widget, scrolling with mouse wheel will scroll through the workspaces.