Commit Graph
445 Commits
Author SHA1 Message Date
Tor Hedin Brønner 2b6a406071 scratch: Simplify scratch menu 2018-02-26 13:32:13 +01:00
Tor Hedin Brønner 9191f0677f binding: <super><shift>tab should be reversed 2018-02-25 10:36:40 +01:00
Tor Hedin Brønner 47dc3298d7 Bind <super>above_tab to previous-workspace 2018-02-25 10:36:40 +01:00
Tor Hedin Brønner 1e3b841f94 Add compiled schema
Makes it less likely to trigger crashes due to missing schema keys. Also makes
it easier to install for other people.
2018-02-25 10:36:40 +01:00
Tor Hedin Brønner fa0a0db195 Add scratch window toggle
Binding `<Super><Ctrl>Escape>`.

Schema change
2018-02-25 10:36:40 +01:00
Tor Hedin Brønner 769b66307d Load rc file on enable 2018-02-25 10:36:40 +01:00
Tor Hedin Brønner 419a7d682c propagate_forward: x is monitor relative 2018-02-25 10:36:40 +01:00
Tor Hedin Brønner 2ba2f64566 Reset leftOverlay when all windows are visible 2018-02-25 10:36:40 +01:00
Ole Jørgen Brønner 17c4d5ae4b Notes keybinding system 2018-02-24 22:28:30 +01:00
Tor Hedin Brønner 0177bf6770 Use a windows destination when ensuring it's in view
This makes it possible to «peak» by quickly doing `super-<>` or `super-><`.
2018-02-19 07:54:41 +01:00
Tor Hedin Brønner fc453fb7a7 Automate module init/enable/disable 2018-02-17 21:52:46 +01:00
Tor Hedin Brønner c0a65058b8 Add a kludge module to monkey patch around gnome shell oddities 2018-02-17 21:52:31 +01:00
Tor Hedin Brønner 4d9c75ca71 Sort the stack by distance and then mru
O(`max`*`space.length`) ~ O(`space.length`) for finitely wide screens. Doesn't
seem like there's a large performance penalty to decide ties between
equidistant windows using the mru, instead of deciding ties by sorting on
left/right.
2018-02-17 21:16:27 +01:00
Tor Hedin Brønner 63a223ec32 When all windows are visible always show a minimum margin 2018-02-17 18:49:45 +01:00
Tor Hedin Brønner 20bd85fb9e utility: Add space as dev global 2018-02-17 18:05:11 +01:00
Tor Hedin Brønner 3c2471cb11 Focus the right neighbour when closing a window
Mutter hands focus to the "highest" window when a window is closed. This means
we need to raise windows from the edges in towards the selected window, making
the neighbours of the selected window the next highest windows.

In particular since we propagate backwards last, the right neighbour will get
priority.
2018-02-16 11:45:57 +01:00
Tor Hedin Brønner 918350bf52 setInitialPosition: Place non-focused windows using ensure
`move_to` will no longer place the input window on the stack, so instead run
ensure on the `selectedWindow`.
2018-02-07 18:39:03 +01:00
Tor Hedin Brønner 0c494e8cb4 propagate_forward/backward: Remove obsolete lower argument 2018-02-07 18:39:03 +01:00
Tor Hedin Brønner 5216fd9d14 Use 'show' signal instead of 'first-frame'
Sometimes initial position bugs out, which might be because 'first-frame'
happens too early. 'show' seems to be more robust.
2018-02-07 18:39:03 +01:00
Tor Hedin Brønner 9dce8f363c setInitialPosition: Always set the initial position for new windows
Since it's too early to set the position on `window-added` we do it in
`setInitialPosition` when the window actor is known to exist.
2018-02-07 18:25:48 +01:00
Tor Hedin Brønner f811dfdb33 More robust init guard
`initCount` would be reset when reloading `extension.js`, this change should
handle those cases.
2018-02-05 23:08:58 +01:00
Tor Hedin Brønner ec5c54bb49 Fix broken alt-tab binding after gdm lock
For some reason locking the screen with GDM kills the live-alt-tab binding.
2018-02-05 17:54:47 +01:00
Tor Hedin Brønner 32a53002f5 ad-hoc height fix: maximize height on ensure
This makes things usable on wayland.
2018-02-03 18:12:48 +01:00
Tor Hedin Brønner b1b5ce8f9a Avoid crashing on wayland
Resizing `MetaWindowWayland` typed windows this early causes gnome shell to
crash.
2018-02-03 17:52:14 +01:00
Tor Hedin Brønner d9af00df4a Fix typo 2018-02-03 10:46:41 +01:00
Tor Hedin Brønner 4e04bf0902 stackoverlay: 0 is falsy so can't use ||
If destinationX is `0` it will incorrectly be regarded as false.
2018-02-01 12:26:53 +01:00
Tor Hedin Brønner 78449a9f28 Fix complaints about negative width in the logs 2018-02-01 12:06:38 +01:00
Tor Hedin Brønner 44ce70b820 stackoverlay: Enable fast clicking on edges
With the two previous commits we can now safely remove the `restacked` signal
watching. For some reason watching the signal is this way blocks clicks while things are
moving.

So now it's possible to eg. doubleclick on the left/right edge and jump
two places.
2018-02-01 07:52:47 +01:00
Tor Hedin Brønner f6d9429dbc stackoverlay: Use destination when deciding stack placement 2018-02-01 07:40:11 +01:00
Tor Hedin Brønner 96d422fe65 Update the stack overlay before animation
We set the target after setting starting all animations so the calculations are
correct, though this doesn't seem to work for some reason.
2018-01-31 17:31:54 +01:00
Tor Hedin Brønner 79245c09d8 Remove ad-hoc stack level fix
This is no longer necessary as we now raise windows when we know if they will be
visible after animation, which is much better than after animation is finished.
2018-01-31 17:31:54 +01:00
Tor Hedin Brønner 019f997c24 Move left/right stack logic to ensure and propagate functions
When we propagate the position forward/backward we check the desired position
against the left/right limits and stack the rest of the windows if it's the
case.

This also fixes the stack performance issue in a cleaner way. We simply raise
all non-stacked windows while propagating, instead of doing a fix-up afterwards.
2018-01-31 17:31:07 +01:00
Tor Hedin Brønner 6af4314e14 Add stackWindow function
Make it easy to move left/right stacking out of `move`.
2018-01-31 16:25:54 +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 b338f7372e fixStackLevels: Handle empty right stacks
When the right stack was empty the former function wouldn't loop to and raise the
last visible window.
2018-01-31 07:43:26 +01:00
Tor Hedin Brønner a3e597b36c Refactor fixStackLevels out of ensure_viewport 2018-01-31 07:37:57 +01:00
Tor Hedin Brønner 60fd6876de topOfRight/LeftStack: Don't depend on selectedWindow
`selectedWindow` isn't necessarily a visible window, eg. when we're doing
previews, so just do a search from the start/end up until we find the last
stackd window.
2018-01-30 19:12:28 +01:00
Tor Hedin Brønner 2072aac18a performance: Minimize lower/raise calls
The bottleneck when calling ensure seems to be calling lower on every window on
the left/right stack.

This is a quick fix, where we simply call raise on the top of the left/right
stack, and the visible windows.

A consequence of this change is the left/right stacks might be above a visible
window for a short time, but it's not very noticeable.
2018-01-30 19:11:59 +01:00
Tor Hedin Brønner 73d59c2d0f Use easeOutQuad curve when bringing windows into view
If an animation needs to wait for a window covering it to move it should start
out fast.
2018-01-18 02:54:00 +01:00
Tor Hedin Brønner c222ed7590 dual monitor: Enable moving windows to shared monitors
When there's only workspaces on the primary display, moving a window to another
monitor makes it `stick`. In the past this would make it part of the scratch
layer, but that's not the case anymore, so it would just be detached and
attached to the workspace again.

This makes it possible to simply drag a window from a space into another monitor
and it will detach and float on the monitor.
2018-01-11 14:11:55 +01:00
Tor Hedin Brønner af339aedca scratch: Test out using above/minimized as scratch indicators
In addition to making `always on visible workspace` work for multimonitor setups
this makes it possible to have workspace local scratch windows.
2018-01-11 14:11:55 +01:00
Tor Hedin Brønner ab9d4c6a99 scratch: Add scratch toggle to alt-space menu
This makes it possible, with some work, to use a combination of above and
minimized to detect scratch windows. Leaving always visible on all workspaces
functional for multimonitor use.

As mentioned we need to use a combination of above and minimized since minimized
windows can't be above.
2018-01-11 14:11:55 +01:00
Tor Hedin Brønner 7c6bf66ee7 Use isScratchWindow to detect scratch windows consistently 2018-01-11 14:11:44 +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 56708fee15 Super+n: Global new window binding
Add a new window action, bound to Super+n by default. This clashes with the
`focus-active-notification` so we kill it.

Schema change!
2018-01-10 10:00:03 +01:00
Tor Hedin Brønner 06ca7eecaa Pass settings object to killKeybinding
Restoration require the same settings object to be available due to the use of
Map. Indexing on the canonical name of the schema is probably a better solution.
2018-01-10 09:59:10 +01:00
Tor Hedin Brønner 43b26611bd Fix typo 2018-01-10 09:59:10 +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 52c93dac3e scratchpad: Preserve stack ordering
Reversing the window order when un-minimizing solves this.
2017-12-27 21:35:35 +01:00