104 Commits
Author SHA1 Message Date
Ole Jørgen Brønner 62761ec4cc Respect XDG_CONFIG_HOME (user.js)
Fixes #78
2018-09-05 09:26:16 +02:00
Tor Hedin Brønner 124d752a1e Add 3 finger touchpad navigation on wayland
The code isn't all that pretty, but it's easy to modify and tune to test what
works well.

I've opted to keep the workspace menu's smooth scroll implementation. When
swiping it's necessary to wait for a button press on the desired space since the
pointer can be anywhere. As such making sure that the workspace stack always
ends up in a discrete state isn't that useful, so I opted for more control when
swiping.

We should add some preferences that users can use to tune the speed of swiping.
I assume that this can vary quite a lot between different touchpads.
2018-08-28 01:35:31 +02:00
Tor Hedin Brønner 145a8d3347 Polyfill global.workspace_manager 2018-08-27 20:33:34 +02:00
Tor Hedin Brønner 07ab295d28 Add move functionality to spaces.selectSpace 2018-07-18 23:08:23 +02:00
Tor Hedin Brønner 3b81029533 Simple fix for the minimap 2018-07-18 22:37:34 +02:00
Tor Hedin Brønner 0ed2cd32bf Refactor workspace selection from navigator to spaces
This is a bit cleaner, and makes it possible to deal with previous-workspace
etc. the same way as switch-next etc. ie. mostly handled through it's action
handler, instead of special casing in navigator.js.

Another benefit is that we now actually keep track of the workspace mru
directly, eg. empty workspaces doesn't just drop off for no reason.
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 39e0a68d3c Refactor switch-next/previous 2018-07-18 22:37:34 +02:00
Ole Jørgen Brønner 0b551114b3 Refactor move-left/right/up/down 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 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
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 d3f2d07cf9 Move keybinding bookkeeping out of extension.js 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
Tor Hedin Brønner 895b1915cd Add our own actions for all bindings
While we might need to steal some actions from gnome, we should support using
both actions if the user wants it.

Also add all the correct default bindings to the schema, and don't touch gesettings
at all. This should make it simpler to get #66 done.
2018-07-03 17:16:21 +02:00
Tor Hedin Brønner 4c9b7706bf Rename schema path to /org/gnome/shell/extensions/paperwm/
Also add /org/gnome/shell/extensions/paperwm/keybindings

NB! This is a breaking change to any existing config.
2018-07-03 17:01:57 +02:00
Tor Hedin Brønner 3548f219a2 Rename prefs.js to settings.js
prefs.js causes issues as its used to lauch the settings gui from eg. tweaks.
2018-07-02 22:31:55 +02:00
Tor Hedin Brønner f011c6e0e9 Cleanup and some comments 2018-06-27 11:28:23 +02:00
Tor Hedin Brønner db19ac1376 Simply keybindings somewhat
Only use one instance of the wrapped functions.
2018-06-25 16:50:44 +02:00
Tor Hedin Brønner d47e731aae Add slurp-[i]n/barf-[o]ut bindings
`<super>i` and `<super>o` as default bindings.
2018-06-25 16:50:44 +02:00
Tor Hedin Brønner 5306316929 Add column reordering 2018-06-25 16:50:44 +02:00
Tor Hedin Brønner 49e4596e24 Add spatial navigation with arrow keys 2018-06-25 16:50:44 +02:00
Ole Jørgen Brønner cca3038957 Center window function (with mouse warp)
I find myself centering the focus window quite often since it's more
comfortable looking straight ahead.
2018-06-21 22:21:26 +02:00
Tor Hedin Brønner 50158d6f91 <Super>Up/Down: bind to workspace mru stack
Also add <Super><Ctrl>Down/UP
2018-05-29 18:30:35 +02:00
Tor Hedin Brønner 2e23a8aa78 <Super>Home/End: activate first/last window 2018-05-29 14:22:35 +02:00
Tor Hedin Brønner 19695dfbfa disable: reset our own keybindings 2018-05-29 13:46:12 +02:00
Tor Hedin Brønner e48fef508f Restore restore-shortcuts binding 2018-05-27 21:30:25 +02:00
Ole Jørgen Brønner 39ddd6b4ca Restore built-in mutter keybindings on disable 2018-05-26 19:58:56 +02:00
Tor Hedin Brønner 6094bd46f8 Bind <Super>Up to toggleMaximizeHorizontally 2018-05-24 18:15:22 +02:00
Tor Hedin Brønner 7c70da6e66 Bind <Super>Right/Left to switch-next/previous
Don't think it's possible to rebind these keys on disable.
2018-05-24 17:52:59 +02:00
Ole Jørgen Brønner 1bc2075e84 Display notification on errors in user.js 2018-05-20 17:24:23 +02:00
Tor Hedin Brønner 6942df947f Monitor preference changes
Introduces `prefs.js` with simple `settings::change` signal handling.

Also put workspace colors in the schema and draw them from there.
2018-05-15 16:31:01 +02:00
Tor Hedin Brønner d23ae6f7ac Use custom handler for extra close methods
This avoids overriding the default close binding (alt-f4).
2018-05-14 15:22:57 +02:00
Tor Hedin Brønner 08ba7c89df bindings: Use a custom handler on restore-shortcuts
Haven't looked at restoration at disable, but this will at least restore things
on restart.

Also remove killKeybinding and restoreKeybindings as they worked out really
badly.
2018-05-11 15:45:19 +02:00
Tor Hedin Brønner 132f0a4b3f Always run native keybinding code on enable/disable
This should avoid reverting back to default keybinding in a buggy disable/enable
cycle.
2018-05-03 20:49:20 +02:00
Tor Hedin Brønner e909e17ab6 Make it possible for the user to override eg. the close keybinding
Run module.enable after keybind setup.
2018-05-02 10:47:42 +02:00
Ole Jørgen Brønner 3b18b3882f Load rc/user-config after full init and catch errors in enable/disable
Ref: #51
2018-05-01 17:20:56 +02:00
Ole Jørgen Brønner ba21e6859c Implement rcfile/user-config as module (#51)
Fixes #51
2018-05-01 17:07:05 +02:00
Tor Hedin Brønner 839527bcdb Always log init, enable and disable 2018-05-01 15:48:01 +02:00
Ole Jørgen Brønner e394767e6c Cosmetic: snake to camelCase 2018-05-01 13:56:04 +02:00
Tor Hedin Brønner 42aedba3b6 Use var for all top level declarations to avoid warnings
We're assessing all top level declarations from outside the original scope when
we're evaluating code. So everything should be `var`.

Classes are `let` bound so we should use var for `ClickOverlay` too, but there's
a bug in gnome-shell-mode making such statements not evaluate. We therefor wait
for that to be fixed.
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 0fc371d1a7 Remove hard coded <super>Space binding 2018-04-29 23:59:23 +02:00
Tor Hedin Brønner 92d5c112fb Use native mutter actions to override keybindings
This means that we won't kill keybindings on disable (which could be worked
around) or crashes (which would be much harder to work around).

NB: it's necessary to go into dconf and restore
`switch-applications[-backward]`, `switch-group[-backward]` to get the
keybindings working again.
2018-04-29 23:57:39 +02:00
Tor Hedin Brønner efa637fc63 Move PreviewedWindowNavigator into new navigator module 2018-04-09 15:19:07 +02:00
Tor Hedin Brønner 83c2428507 disable -> enable: Reuse the old ordering if available
This is useful in the case of nothing changing between a disable and enable. For
instance when locking the screen. Having windows move around in that case is
pretty bad.

We do create a new spaces however as we want to support editing the `Space`
definition and getting the changes when we do a reload (this should work as long
as `Space` is an Array).
2018-04-09 15:19:07 +02:00
Tor Hedin Brønner 666aac0411 Move tiling specific enable functionality to tiling 2018-04-09 15:19:07 +02:00
Tor Hedin Brønner 769142f727 Repurpose the activity label as a worspace indicator
Introduces a topbar module.
2018-04-04 13:39:41 +02:00
Tor Hedin Brønner 2223ca20af Disable default '<super>escape' binding 2018-03-22 05:28:38 +01:00
Tor Hedin Brønner 4e5007e544 bindings: Don't overwrite already registered actions 2018-02-26 20:26:33 +01:00