Commit Graph

32 Commits

Author SHA1 Message Date
Tor Hedin Brønner
3c22876180 alt-tab: let shift-super-alt select most recent scratch window
closes #64
2018-11-26 17:50:56 +01:00
Tor Hedin Brønner
145a8d3347 Polyfill global.workspace_manager 2018-08-27 20:33:34 +02:00
Tor Hedin Brønner
6008051a39 liveAltTab: basic integration with actions 2018-07-18 23:08:23 +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
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
Tor Hedin Brønner
8296ffa786 Avoid killing eg. minimize animations on alt-tab
`_initialSelection` happens after pushModal possibly fails preventing proper
clean up.
2018-06-01 17:02:36 +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
d27024c12d refactor: ensure_viewport(s, w, f) -> ensureviewport(w, s, f)
Make passing space optional
2018-04-22 15:01:57 +02:00
Tor Hedin Brønner
f840387d70 liveAltTab: Block un/minimize animations
When alt-tabbing to a scratch window we do an instant preview. Focusing the
window would then trigger an un-minimize animation which would look weird.
2018-04-22 14:57:10 +02:00
Tor Hedin Brønner
6368857b6b liveAltTab: clean up 2018-04-22 14:57:10 +02:00
Tor Hedin Brønner
1d8af9cc97 Move previewWorkspace to navigator 2018-04-12 17:00:26 +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
Ole Jørgen Brønner
f3eb2b7b88 Fix change-workspace abort
Pressing <meta>-ESC will now abort workspace changes the same way window changes
are aborted

Probably fixes #37 too (untested since <super>-TAB is restricted to active workspace
atm.)
2018-03-29 14:53:59 +02:00
Tor Hedin Brønner
b26d5fda1a alt-tab: Restrict to the current workspace 2018-03-10 22:37:32 +01:00
Tor Hedin Brønner
a894552439 workspace preview: Don't imply a specific spatial layout
When navigating workspaces in mru order animating the workspaces based on the
mru order gives a false sense of spatiallity. Instead simply animate the
previewed workspace from the bottom and animate the last workspace down.
2018-01-31 14:25:53 +01:00
Tor Hedin Brønner
ba0642acd0 liveAltTab: Only show scratch windows when scratch layer is focused 2018-01-10 21:51:03 +01:00
Tor Hedin Brønner
8bc50b4eb1 liveAltTab: Always clean up any clone 2018-01-07 10:12:37 +01:00
Tor Hedin Brønner
059cd66067 liveAltTab: Add live previews of scratch windows
Make a clone of pseudo focused scratch windows which gets pushed to the
top (Can't use raise as it would mutate the stack level).
2018-01-07 08:34:50 +01:00
Tor Hedin Brønner
3d2e86fe11 Use custom action for live alt tab
We kill the regular actions which uses super-tab (and super above_tab, which is
strictly not necessary).

NB: Require schema compilation.
2017-12-08 09:44:03 +01:00
Tor Hedin Brønner
56dac2a8b6 Get the Extension object via hardcoded uuid lookup
This enables reloading of a whole module.
2017-12-03 19:18:14 +01:00
Tor Hedin Brønner
d7adf22ff2 Use proper function syntax
There's no longer any reason to use `var name = function()` or
`var name = ()=>{}`.
2017-10-29 16:12:53 +01:00
Tor Hedin Brønner
c18190c3a4 Make spaces local
`var spaces = Tiling.spaces` in minimap.js doesn't work for some reason.
2017-10-28 01:37:22 +02:00
Tor Hedin Brønner
d8e6cb32ad Make debug local
Add `Extension` and `debug` to all the module scopes for convenience.

(also add var to non-used function)
2017-10-27 21:23:46 +02:00
Tor Hedin Brønner
e260fc25b7 Always pass an owner object to dynamic_function_ref
This way we can remove a bunch more globally declared variables.
2017-10-27 21:03:53 +02:00
Tor Hedin Brønner
bfb4414cb9 Make most globals module local
Functions which are called from signals is left alone for now since
`dynamic_function_ref` depends on looking up things in `window`. `debug` is
also still a global.
2017-10-27 19:55:15 +02:00
Tor Hedin Brønner
ee4b30f90c Don't look up workspace_index on _previewWorkspace
fixes #38 Removing workspaces while the multimap is active can cause crashing
2017-10-25 18:50:30 +02:00
Tor Hedin Brønner
dd5545d3c7 Move spaceOf to spaces.spaceOfWindow 2017-10-25 17:01:32 +02:00
Tor Hedin Brønner
4f6330c025 Always force previewWorkspaceDone on finished alt tab
If we've previewed a workspace and then move onto another window in the same
workspace `_finish` will trigger a new workspace animation that we aren't
cancelling.
2017-10-23 11:53:41 +02:00
Ole Jørgen Brønner
2021b584e4 Put scratch windows first in LiveAltTab (when scratch is active)
(in scratch windwo MRU order of course)

Ideally the scratch layer would somehow mutate the MRU itself on
activation, but it seems the only way to do this is to actually focus
the windows in turn. That might be slowish(?) and also messes with the
stacking order (I think). Ie. would need to restore the stacking order
after doing the focus dance.
2017-10-19 18:16:57 +02:00
Tor Hedin Brønner
3f8d78d605 Animate fullscreen windows fully out when previwing workspaces
For some reason the gnome-shell code subtracts the panel height from the yDest,
this will leave any fullscreen windows visible when moving up.
2017-10-03 01:33:46 +02:00
Tor Hedin Brønner
29fd979467 Add LiveAltTab popup based on WindowSwitcherPopup
Issues:
- When releasing mid animation focus will restart the workspace switch animation
- There's no workspace animation back when escaping the popup
2017-09-30 01:11:17 +02:00
Tor Hedin Brønner
ce54af8b92 Add _previewWorkspace and _previewWorkspaceDone to WindowManager
Gives more fine grained control as we can call complete when appropriate and
omits signaling mutter that workspace switching is finished, as we're not
responding to the `switch-workspace` signal.
2017-09-30 00:59:01 +02:00