-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix special workspaces bug on expose.py #120
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.
thanks for the contribution!
I made some comments which needs clarification before I merge it.
@@ -760,7 +760,7 @@ async def _handle_focus_tracking(self, scratch: Scratch, active_window: str, act | |||
if tracker and not tracker.prev_focused_window_wrkspc.startswith("special:"): | |||
same_workspace = tracker.prev_focused_window_wrkspc == active_workspace | |||
if scratch.have_address(active_window) and same_workspace and not scratch.have_address(tracker.prev_focused_window): | |||
await self.hyprctl(f"focuswindow address:{tracker.prev_focused_window}") |
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.
Is this change to scratchpads intended ?
(it'as about an expose bug... isn't it ?)
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.
Haha, it seems I pushed to main instead of a branch. You're right, this was totally an accident! I will fix it soon. 👍
@@ -23,7 +23,10 @@ async def run_expose(self) -> None: | |||
If expose is active restores everything and move to the focused window | |||
""" | |||
if self.exposed: | |||
commands = [f"movetoworkspacesilent {client['workspace']['id']},address:{client['address']}" for client in self.exposed_clients] | |||
commands = [ |
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 may want to run "ruff format" on the files, it's part of the pre-commit hooks in theory...
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.
Apologies, it should be all good now 👍 .
I think the other branch which has been merged just now had the two set of changes... can you please review it's "as expected" ? |
By the two set of changes, do you mean the fix for #118 and #119? |
That's what I meant. Thanks for the clarity. I'll only have a look tomorrow, so there's no rush. |
What about this PR ? |
This now works for special workspaces. There is a problem with pyprland scratchpads in this, since it tries to go to another workspace, but I can open another PR/issue for that. This PR should be good to merge/it fixes the issue. |
There are some issues applying the main branch, maybe related to the cherry picks, I get an infinite loop solving them. |
I just synced my fork, are you able to see the diff now? |
I can see the diff, np, what I'm saying is:
I see you use merge, while I try to have a clean history with rebase only... that could be one of the problems. But is this change still relevant if we have similar code already merged into main? PS: I saw you did one more merge, but it's still can't be merged... something is fishy in your main branch, having clean commits rebased on top of upstream would be ideal (if this PR is still relevant) |
Sorry, I almost always use branches and not forks. My fork is pretty messed up, I think I will just make a new one. |
I looked at your main branch: it became very messy... |
I double checked, expose is only using |
#119
The solution was to use the name of the workspace instead of the id.
The id of special workspaces are negative, and using a negative workspace for
moveworkspacesilent
does not work.Since the name the workspace returns the id (if it is normal) or the name (if it is a special workspace), using name is more desirable.