Commit Graph
642 Commits
Author SHA1 Message Date
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 47110d8f82 resize: Simplify by using move_to 2018-05-01 16:11:42 +02:00
Tor Hedin Brønner 839527bcdb Always log init, enable and disable 2018-05-01 15:48:01 +02:00
Tor Hedin Brønner 68bf14d526 Fix resizing while navigating
We need to delete all tweens on the clone and sync its position when the actor
isn't visible.
2018-05-01 15:40:11 +02:00
Tor Hedin Brønner 4297c8a6e2 Replace metaWindow.destinationX with moving windows pre-animation
Had to reorder setting the click overlay targets after calling `move`.
2018-05-01 15:40:11 +02:00
Ole Jørgen Brønner bd76ebcf35 debug log viewer: skip-crap didn't skip everything 2018-05-01 14:15:29 +02:00
Ole Jørgen Brønner e394767e6c Cosmetic: snake to camelCase 2018-05-01 13:56:04 +02:00
Ole Jørgen Brønner 6aaa010845 cycle-width: Move window if necessary so it remains fully visible 2018-05-01 13:24:50 +02:00
Tor Hedin Brønner b058154cb8 Turn off debugging by default 2018-04-30 20:20:13 +02:00
Tor Hedin Brønner e0e036bf35 Deactivate the clickoverlays when navigating the workspace mru 2018-04-30 17:18:46 +02:00
Tor Hedin Brønner bbe540f3fc Ad-hoc fix for moving windows across monitors
For some reason we trigger warping to the original workspace when activating
a moved window. So we disable he behavior for now.
2018-04-30 17:18:46 +02:00
Tor Hedin Brønner 6fde98b3d0 Cleanup monitorsChanged 2018-04-30 17:18:46 +02:00
Tor Hedin Brønner d7abd24d3d Only reset monitors if they're no longer present 2018-04-30 17:18:46 +02:00
Tor Hedin Brønner bbfac4486b Sync clone position before animation if the WindowActor is visible 2018-04-30 17:18:46 +02:00
Ole Jørgen Brønner e955a9aca6 Hide the panel corners by opacity instead of actor.hide
dash-to-dock extension sometimes show the corner actors. Setting the opacity
makes sure they stay hidden :)
2018-04-30 17:18:46 +02:00
Tor Hedin Brønner f31195ed22 Don't move and resize the current window on size-changed 2018-04-30 17:18:46 +02:00
Tor Hedin Brønner 47ac7b648e Always keep the top bar on the focused monitor 2018-04-30 17:18:45 +02:00
Tor Hedin Brønner bb22c4ed52 Don't check for pointer warping if we haven't changed monitors
This seems to make `switchWorkspace` animation a bit smoother.
2018-04-30 17:18:45 +02:00
Tor Hedin Brønner 24e8f5534c switchWorkspace: correctly filter out only visible spaces 2018-04-30 17:18:45 +02:00
Tor Hedin Brønner aed3646be2 Extend windows to the bottom of the monitor 2018-04-30 17:18:45 +02:00
Tor Hedin Brønner 2dfbd6edea Add an explicit background actor
We add a `space.actor` to hold background, cloneContainer and label. The
cloneContainer can then clip itself, letting the background have some horizontal
padding.

The background is also positioned somewhat above the monitor to avoid showing
anything through the upper corners.
2018-04-30 17:15:48 +02:00
Tor Hedin Brønner 77dd7438b3 Substitute all windows which protrude from the monitor with a clone
This will prevent tiled windows protruding into other monitors.

It's not completely ideal, but it does the job.
2018-04-30 00:04:27 +02:00
Tor Hedin Brønner 20a9d40fc3 Add a maximum width constraint on windows 2018-04-30 00:03:08 +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 c833998aae disable: Don't bother destroying clones as we'll destroy their parent
This removes a bunch of warnings.
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 30427f0bc4 Remove unnecessary StackOverlay import
The better name clickOverlays should be accessed from eg. `space.monitor` now.
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner cfc3235d92 Fix select workspace animation 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner c83f9590b0 Activate click overlays on startup/monitors-changed
We separate resetting the tiling overlay and activating/deactivating the monitor
click overlay.
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner ffe533a172 Reset all ClickOverlays when we change monitors 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 4c794dfa9a Add pointer warping 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner f063bcfcd5 Activate the clickOverlay when switching workspace 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 5263bb834c Make a ClickOverlay per monitor 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner a48e013395 Add ClickOverlay class 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner ddc0a29861 stackoverlay: Take monitor as an argument
Also place the left overlay correctly at monitor.x
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 870720e44d Share the workspace stack between monitors
We move and scale the `space.clip`s to the active monitor. If we select a
workspace which came from another monitor we move it fully to the active monitor
with `space.setMonitor`.
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner b3a395c051 Move windows that enter a monitor to the corresponding space
We only move windows with a visible WindowActor to avoid moving windows into
spaces that's positioned to the left or right.

Also replace all window actors with clones when monitors change to prevent
windows changing workspace when monitors are added or removed.
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 73565eacd2 Add monitor -> space map 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 7af0142a7d Document monitor signal ordering 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 04ba90b9cd Contain all spaces in their own clipping container
We create an actor spanning the whole screen, `Spaces.spaceContainer` which
holds all spaces. A `Space` is now first contained in a `Space.clip` container
which clips away anything that protrudes from the monitor.

The main advantage over having a per monitor clipping actor is getting
flexibility in moving a space around the screen without changing it's monitor.

We also hook up the `monitors-changed` signal, putting the active workpace on
the primary display, and populating the other monitors with the rest of the
workspace mru.

This also prevents a bug where we could end up moving a BackgroundActor.
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner cce3341afd Use correct coordinates when animating windows
Adds a `Space.monitor` property, hard coded to the primary monitor for the
moment. `move` needs to know about which space it's moving windows on.

It seems that we really don't have to worry about scaling, as it mutter should
take care of it automatically.

fixes #47
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner aac8a07553 Don't set _isStacked on non inserted windows
This also means that ensureViewport(null, space) won't fail.
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 30fa4959c4 Bind <super>Escape to toggle scratch layer 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 58046addef Remove hardcoded margin and minimumMargin 2018-04-27 13:35:11 +02:00
Tor Hedin Brønner 06e3016da7 navigator: Only reset stackoverlay if we've switched workspace 2018-04-25 13:36:54 +02:00
Tor Hedin Brønner 4efc2fd8af Disable unredirect when switching workspaces 2018-04-25 13:36:44 +02:00
Tor Hedin Brønner f3ee5900ac super+ctrl+above_tab: Move the focused window through the scratch layer
If we're starting workspace navigation with `ctrl` lift the focused window into
the the scratch layer. When navigation is done, drop the lifted window into the
new workspace.
2018-04-25 10:36:57 +02:00