Commit Graph

46 Commits

Author SHA1 Message Date
Tor Hedin Brønner
54b7448e4d Simple fixes for 3.38
log no longer takes several arguments...

actor.add seems brokenish?
2020-08-23 16:56:32 +02:00
Ole Jørgen Brønner
3461649306 Bugfix: older gjs does not support object unpacking {...obj}
fixes #271 (NB: not verified yet)
2020-03-16 18:55:57 +01:00
Ole Jørgen Brønner
1d0b233e67 Utility function to translate action name to action id (HACK) 2020-03-14 23:09:31 +01:00
Ole Jørgen Brønner
df13408531 Keybinding system: always provide the selected space to action handlers
Before: only actions triggered from the action dispatcher was provided the space
2020-03-14 23:09:15 +01:00
Ole Jørgen Brønner
484b26d25a Make all minimap actions PER_WINDOW
Atm. some of the actions spammed errors in the log when invoked on an empty
workspace. A empty minimap also pops up which looks a bit strange(?)
2020-03-14 13:39:42 +01:00
Ole Jørgen Brønner
eedfe0c0f5 ActionDispatcher: respect mutterFlags (PER_WINDOW) 2020-03-14 13:32:24 +01:00
Ole Jørgen Brønner
386e1fbf42 Fix keybindings.disable in 3.36 when <Super>A is overriden 2020-03-08 22:33:49 +01:00
konni
616d7712fa
add resize functions to inc/dec height/width (#255) 2020-02-25 16:55:52 +01:00
Ole Jørgen Brønner
73ef38e6a9 keybindings: bugfix 2020-02-23 15:17:51 +01:00
Tor Hedin Brønner
0f0f9c4e7c keybindings: reset move-to-monitor-* properly
closes #223
2020-01-11 17:26:05 +01:00
goodwillcoding
5d148a3f6a Spaces: add sequential navigation of spaces 2019-11-12 14:19:30 +01:00
Tor Hedin Brønner
8f22ab6b1e keybindings: do not override actionless keys
It's possible to pick up schema changes without a full reload. If the new
bindings conflicts with gnome-shell we will try to override. But since we have
registered no action, this will fail.

Simply guard against actionless bindings.

fixes #190
2019-11-02 23:42:45 +01:00
Ole Jørgen Brønner
739c4350d7 app: Launch new windows from the workspace directory if set
We override these methods so this will work from the typical launchers:
   Shell.App.open_new_window
   Shell.App.launch_action('new-window', ...)
   Gio.DesktopAppInfo.launch
   Gio.DesktopAppInfo.launch_action('new-window', ...)

NOTE: overridden `launch` can act somewhat strange with single process many
window apps if the process. If the process is launched with a specific directory
new windows might inherit this on non-overridden `new-window`. (seen in Tilix)
2019-10-18 19:21:45 +02:00
Tor Hedin Brønner
1ff9a6497b monitor keybindings: activate the defaults when paperwm is disabled 2019-10-10 17:05:46 +02:00
Tor Hedin Brønner
3af9d23d76 monitors: Add switch/move to monitor bindings 2019-10-10 15:15:39 +02:00
Ole Jørgen Brønner
83d6b2706e keybinding system: don't require a focused window to trigger custom keybindings
fixes #169
2019-09-10 19:06:57 +02:00
Tor Hedin Brønner
7fb9f4a0c1 Fix full hot code reload
`getCurrentExtension()` does not work with gnome-shell-mode's eval. Use a
somewhat verbose feature detection to work around the changes made in 3.34.
2019-09-03 17:36:37 +02:00
Rasmus Eneman
f949799c37 Fix crash under Gnome 3.34 2019-08-30 08:16:23 +02:00
Ole Jørgen Brønner
ae8e91093b Show a warning notification when failing to bind a key (user.js) 2019-07-02 21:49:20 +02:00
Ole Jørgen Brønner
15c4b58ca4 Bugfix: display.grab_accelerator in gnome-shell 3.3x expects two arguments
fixes #138
2019-07-01 09:59:53 +02:00
Tor Hedin Brønner
ce9416a55d liveAltTab: Don't allow actions while alt-tabbing 2019-02-24 12:06:05 +01:00
Tor Hedin Brønner
187f6ee9cb Only toggle the most recent window on super-escape
super-shift-escape toggles the whole layer.
2019-01-14 18:22:57 +01:00
Tor Hedin Brønner
75e66de782 keybind: super-t take window and place at final destination
This also fixes the rather strange behavior of super-ctrl-above_tab which
actually didn't move to the previous workspace.
2019-01-09 11:51:04 +01:00
Ole Jørgen Brønner
d5a7c81895 keybindings: cycle window height <super><shift>r 2019-01-05 12:52:52 +01:00
Tor Hedin Brønner
4eea221a39 keybindings: fix bindkey bindings for 3.30+
Keyhandlers doesn't take screen as the argument.
2019-01-05 12:08:43 +01:00
Ole Jørgen Brønner
43974ba50c Minor fixes keybinding system
- rebinding a schemaless binding lost it's implied options
- fix showNavigator example
- wrong documentaion in README
2018-12-09 14:53:53 +01:00
Ole Jørgen Brønner
3927af08c3 Cleanup: remove bitrotted tile-visible action 2018-12-08 16:09:40 +01:00
Tor Hedin Brønner
877726a2a2 Move keybind init to keybindings.js 2018-11-27 14:23:02 +01:00
Tor Hedin Brønner
145a8d3347 Polyfill global.workspace_manager 2018-08-27 20:33:34 +02:00
Ole Jørgen Brønner
5697f3a84c Bugfix: schemaless keybindings 2018-07-26 12:26:45 +02:00
Ole Jørgen Brønner
34fd715b77 Proper disable of schema-less actions/keybindings 2018-07-23 21:59:58 +02:00
Tor Hedin Brønner
25d9f3092f Only register actions in registerAction
enableAction is run on enable.
2018-07-18 22:37:34 +02:00
Tor Hedin Brønner
f8119ae0bf Record overrides in the actionIdMap
This means we can get rid of more cases in the ugly switch in navigator.

Guard against non mutter action names, but apply the override even when we can't
get the id.

For some reason restore-shortcuts (`<Super>Escape`) returns
KeybindingsAction.NONE.

Also remove setKeybinding
2018-07-18 22:37:34 +02:00
Tor Hedin Brønner
34f3166d7a keybindings: actually record and use the actionIdMap 2018-07-18 22:37:34 +02:00
Ole Jørgen Brønner
a64860bb47 Remove utils.as_key_handler 2018-07-18 22:37:34 +02:00
Ole Jørgen Brønner
61290f142d Prepare for navigator refactor + refactor switch-left/right/up/down 2018-07-18 22:37:34 +02:00
Tor Hedin Brønner
cdbf2a662c Add every custom Gnome Shell handler 2018-07-13 11:40:03 +02:00
Tor Hedin Brønner
ca4c78779d Only hijack needed actions when needed
We listen on the relevant schemas and redo all hijacked keybindings.
2018-07-13 11:40:03 +02:00
Tor Hedin Brønner
b12bc2bb52 Add key conflict machinery to settings.js
This is the common functions needed for both the extension side and prefence UI
side, so it goes in `settings.js`.

`Settings.findConflicts` searches for keycombo conflicts between our own
bindings and the built in Gnome Shell and mutter bindings, returning an array
like this:
```
[{ name: our own action name,
   conflicts: array of conflicting names
   settings: the settings schema the conflicting are part of
   combo: the key combo as generated by keystrToKeycombo},
 ...]
```

keystrToKeycombo now handles `Above_Tab` properly.
2018-07-13 11:40:03 +02:00
Tor Hedin Brønner
fc260da22d Consistently declare and use screen and display
Makes things shorter and removes language warnings of using undeclared
variables.
2018-07-12 16:14:26 +02:00
Ole Jørgen Brønner
e1bc0853a2 Disable and enable our keybindings more robustly 2018-07-06 12:16:37 +02:00
Ole Jørgen Brønner
71b6ee8f56 Unify regular keybinding api an schemaless keybinding api
Try to make it a bit more "action oriented":

  An action exists independently of its binding. It could conceivable be invoked
  by other means too.

Some weirdness from the marriage remain to weed out, but this is a working
stepping stone.
2018-07-06 12:16:37 +02:00
Ole Jørgen Brønner
351dc9a475 Delete code targeting old gnome-shell versions
We don't support those version
2018-07-06 12:16:37 +02:00
Ole Jørgen Brønner
d3f2d07cf9 Move keybinding bookkeeping out of extension.js 2018-07-06 12:16:37 +02:00
Ole Jørgen Brønner
f9fd005fa5 Utility function for checking if a key-combo is bound 2018-07-06 12:16:37 +02:00
Ole Jørgen Brønner
5bce8922c1 API for ad-hoc/schemaless/user keybindings 2018-07-06 12:16:37 +02:00