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

Feature request: add some window manager event hooks #70

Closed
QiangF opened this issue Jul 15, 2022 · 2 comments
Closed

Feature request: add some window manager event hooks #70

QiangF opened this issue Jul 15, 2022 · 2 comments
Labels
enhancement New feature or request request Feature request

Comments

@QiangF
Copy link

QiangF commented Jul 15, 2022

There is a package named orcsome that add some window manager hooks with python-xlib. keyszer has python-xlib dependency, it make sense to combine the functionality. Just too more hooks:

  • focus change hook and add two more function to that hook:
  1. function to solve focus problem with window manager, ie. sometimes when focused window closes, the focus is not on the next top window, eg. focus go to the taskbar. In that case, we can make a function to move the focus back to application window.
  2. function to auto switch input method, eg. swith to terminal, disable non-english input method.
  • new window or window size change hook and add the following function:
  1. function to save new window layout on window change, just like emacs winner-mode or eye-browse. I am using openbox, and I go to previous window with Alt-Tab. I need many key stroke or mouse click to get back to a certain window layout. For stacking winndow manager, there is a good start point here: https://github.com/nlfiasel/orcsome-desktop-snapshot

I am not familiar with python-xlib, it might be trivial to add these hooks in the event loop.

@QiangF QiangF added enhancement New feature or request request Feature request labels Jul 15, 2022
@joshgoebel
Copy link
Owner

joshgoebel commented Jul 15, 2022

Ref: #25. This would be nice purely for time savings of course (if no other reasons).

keyszer has python-xlib dependency, it make sense to combine the functionality.

Does it? Just because we have a dep on python-xlib it does not necessarily follow that it would make sense to add functionality from other software also using the same library... perhaps it's a good idea, perhaps not. Definitely seems a violation of the "separate tools for sep purposes" Unix philosophy.

sometimes when focused window closes, the focus is not on the next top window, eg. focus go to the taskbar. In that case, we can make a function to move the focus back to application window.

I'm not sure how this is a keymappers problem to solve?

function to save new window layout on window change,

This also sounds far out of scope... Keyszer is a keymapper... we only communicate with X to learn the current application to inform our primary purpose - the mapping of keys.

function to auto switch input method, eg. swith to terminal, disable non-english input method.

What does "disable non-english input method" refer to exactly... of course Keyszer can already change modmaps/keymaps depending on the currently active application... This is the only thing you've mentioned that sounds like perhaps it could be in scope (as it's keyboard/input related)...

@QiangF
Copy link
Author

QiangF commented Jul 15, 2022

This is mainly to avoid opening too many X connections. I agree that it's better to put these functions into another script. I have found one example here:
https://gist.github.com/ssokolow/e7c9aae63fb7973e4d64cff969a78ae8

@QiangF QiangF closed this as completed Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request request Feature request
Projects
None yet
Development

No branches or pull requests

2 participants