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

feat: inspect window command #382

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

maxle5
Copy link
Contributor

@maxle5 maxle5 commented Sep 6, 2023

Description

Allows for viewing information about the window under the user's cursor (e.g. process name, class name, title, etc.)

Motivation/Context

I couldn't find an easy way to identify the "class name" of a window (without third-party tools), so I decided to implement a very basic command that shows a dialog with this information. This could be expanded upon in the future to show more info such as height, width, etc.

Demo

2023-09-24_14-09-07.mp4
@maxle5 maxle5 marked this pull request as ready for review September 6, 2023 15:15
@lars-berger
Copy link
Collaborator

Ay this is really cool, thank you 🙏. There was some discussion not too long ago about an alternative approach to solving more or less the same issue here #361 But the way you've solved this is more user friendly compared to a CLI.

I think it'd be worth making a slight tweak here to cover some more use cases where a user would need to know a window's class name etc. One case is for windows that aren't being managed by the WM (eg. if we add a "force manage" command in the future), and another is for popups that are shown briefly. We could cover these cases by instead inspecting the window currently under the cursor.

If you're cool with making this change, FocusContainerUnderCursorHandler has some snippets that would be useful

@maxle5
Copy link
Contributor Author

maxle5 commented Sep 10, 2023

@lars-berger, yeah that totally makes sense! Hadn't really thought of those other use cases, I'll give that a shot sometime this week and see what I can come up with

@lars-berger
Copy link
Collaborator

@maxle5 Sweet 👌 Feel free to message in #contributing for any questions etc

@maxle5 maxle5 marked this pull request as draft September 11, 2023 16:47
@lars-berger lars-berger changed the base branch from main to develop September 17, 2023 18:15
@maxle5 maxle5 marked this pull request as ready for review September 24, 2023 17:39
@maxle5
Copy link
Contributor Author

maxle5 commented Sep 24, 2023

@lars-berger, sorry it took me so long to get back to this, but this PR should now cover the scenarios you described above by displaying the window information of the window under the user's cursor.

Let me know what you think, or if there's anything you think I should change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants