Added keyboard shortcuts to focus a specific window in a current workspace (#195)#662
Added keyboard shortcuts to focus a specific window in a current workspace (#195)#662mkasprz wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
I havent't figured out any other way to determine that the extension is loaded and Me.msWorkspaceManager.getActiveMsWorkspace() doesn't return undefined. I tried using this.workspaceManager.get_active_workspace().connect('tileable-focus-changed'(...)), but it only made the extension crash I believe.
| this.lastStash = null; | ||
| this.nextStash = null; | ||
| connectTileableFocusChange() { | ||
| this.tilableFocusChangeConnectionId = Me.msWorkspaceManager |
There was a problem hiding this comment.
I probably could connect to 'focus-changed' event from Me.msWindowManager.msFocusManager instead, which could made the code simpler I believe, but this event is not emitted for the "MsApplicationLauncher" (last tileable - "+") and tileable-focus-changed is. Is it a bug?
There was a problem hiding this comment.
I renamed the variables to distinct them from the once I added.

The hotkeys just make possible to focus a specific window in a current workspace and I've aimed to make them basically work in the same manner as the ones for changing a workspace.
I've set them hotkeys to Ctrl + Super + <N> by default to avoid some collision, even though I personally use Super + <N> and changed the ones to switch workspace to Super + F<N>.
Moving the window to a specific index is not implemented yet. I believe it could be done within another Issue or at least in a different Merge Request.