daniellandau / switcher

Gnome Shell extension to switch windows quickly by typing
GNU General Public License v3.0
352 stars 43 forks source link

optionaly use super as shortcut #38

Open pyluyten opened 8 years ago

pyluyten commented 8 years ago

triggering "switcher" with "super" would be cool. This would imply to have vanilla "activities overview" with something else , eg "super+a".

seems there is a mutter setting : /apps/mutter/general/overlay_key

i guess switcher extension could help the user going this way Also one advantage is that the day you deactivate switcher (eg it is temporarily broken =) , super comes back to standard.

daniellandau commented 8 years ago

I'll look into this.

daniellandau commented 8 years ago

On my machine it's /org/gnome/mutter/overlay-key and that seems to take plain super away from going to overview, but I still can't see how we could grab plain super for launching an extension. I'd also like activation by double Ctrl (https://github.com/daniellandau/switcher/issues/17), but I don't see how that's possible to achieve.

pyluyten commented 8 years ago

Yes i'm not sure neither how to check super is pressed. I'd ilook at below commit (who knows this might help for #17, too )

https://git.gnome.org/browse/mutter/commit/?id=6c3985220ecc685595bc2c02af60ffe4a6d7d0c1

pyluyten commented 8 years ago

well of course there is the direct way, do not listen to a key but inject WorkspaceView init this is what WindowNavigator does

injectToFunction(WorkspacesView.WorkspacesView.prototype, '_init', function(width, height, x, y, workspaces) { this._keyPressEventId = global.stage.connect('key-press-event', Lang.bind(this, this._onKeyPress));

daniellandau commented 8 years ago

Hmm, interesting. I'm not sure if this is really worth the effort though.

Epskampie commented 6 years ago

I know this is al old thread, but i'd love to have just \<super> as a hotkey as well.

olejorgenb commented 5 years ago

It's possible to bind keys to modifiers directly: Simply set the keysym of the modifer directly in dconf:

dconf write /org/gnome/shell/extensions/switcher/show-switcher "['Super_L']"

For this to work the overlay key should probably be disabled or changed to something other than super.

Note that you won't be able to bind eg. <super>a while Super_L is bound as suggested by OP.

okand commented 2 years ago

Super late post but just wanted to mention I did the above but it had a side effect that made it a deal breaker for me.

Using dconfeditor (gui for this stuff) I first changed /org/gnome/mutter/overlay-key to being ['<Super>Tab>'] and then /org/gnome/shell/extensions/switcher to be 'Super_L. This makes just pressing left super toggle the switcher while pressing super+tab triggered the regular gnome activities overview because I sometimes still want that too. Unfortunately that broke holding super and clicking on windows to move or resize them as it's pressing down super that triggers switcher instead of releasing super so I settled for the opposite. Toggle switcher with super+tab and keep just Super for activities.