Commit Graph
881 Commits
Author SHA1 Message Date
Tor Hedin Brønner 49082dbd56 Add basic wallpaper support
Also add noise by default

To set a background:
```
space.settings.set_string('background', '/path/to/image.png')
```

To reset:
```
space.settings.set_string('background', '')
```
2018-07-08 12:09:47 +02:00
Tor Hedin Brønner c723fa2a4d Use new workspace settings schema
Per workspace settings can be accessed through `space.settings`.

A setting's path is stored under its uuid in
`/org/gnome/shell/extensions/paperwm/workspaces/${uuid}/`. When modifying a
workspace setting the uuid will be recorded in
`org.gnome.Shell.Extensions.PaperWM.WorkspaceList`.

Spaces get their settings by looking for an uuid with an `index` key
corrosponding to its `workspace.index()`. If such a setting can't be found the
space will be given a fresh uuid and the name and color will be assigned as
before.
2018-07-08 12:09:47 +02:00
Tor Hedin Brønner 819b0d7066 Add relocatable workspace schema 2018-07-07 21:20:58 +02:00
Tor Hedin Brønner 9ed46519c3 Animate selection scale when inserting a new window 2018-07-07 21:20:58 +02:00
Tor Hedin Brønner be47d68248 Get rid of space.delayed
Guard against syncing and showing window actors if we're not at `space.targetX`,
ie. if we're still animating.

Also correctly set `space.moving` only when we're actually animating.
2018-07-07 19:16:48 +02:00
Tor Hedin Brønner aeebf8daa5 Connect size-changed signal when adding new windows to the scratch
Missed a return on `addToScratch`.
2018-07-07 10:29:32 +02:00
Tor Hedin Brønner 9c9a79743a grab: actually fix all of the coordinates... 2018-07-06 21:41:56 +02:00
Tor Hedin Brønner c127a76454 grab: Fix coordinates 2018-07-06 21:39:06 +02:00
Ole Jørgen Brønner ac655c925a log-viewer: silly bugfix group stacktraces 2018-07-06 13:22:19 +02:00
Ole Jørgen Brønner f7f4c1959d Notes 2018-07-06 12:46:07 +02:00
Ole Jørgen Brønner 25b6a9d39f readme: document user-defined keybindings 2018-07-06 12:16:37 +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 e8e01dfbf7 more examples 2018-07-06 12:16:37 +02:00
Ole Jørgen Brønner 8bbb0cc23d examples: make marks work when navigator is open 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
Tor Hedin Brønner 5a8a071b99 Only reset selection when the tiling is empty
Due to `focus` running before `window-removed` we would end up resetting the
selection width after it had been correctly set up.
2018-07-05 22:15:03 +02:00
Tor Hedin Brønner 4e8dcc5ad3 Refactor space.fixVisible out of move_to
We need to update the visible windows after layout too.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner 266eb52c3b Rerun layout on a column if a frame's width changes unexpectetly
A typical case is mpv which preseerves its aspect ratio, resulting in a
completely different width than requested. This would cause `resize` to call
layout recursively running the first layout call last.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner d264382dac Connect to size-changed after initial placement and resize
This prevents the move_to call in `resizeHandler` leading to the wrong initial
position in wayland.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner 8ae1814acb Only call moveDone once from layout 2018-07-04 20:47:04 +02:00
Tor Hedin Brønner a605dc4668 Clip tiled window actors to the monitor
fixes #61
2018-07-04 20:47:04 +02:00
Ole Jørgen Brønner c62c915c6a Always exit navigator on escape
Actions bound to escape would prevent the exit before.
2018-07-04 20:47:04 +02:00
Tor Hedin Brønner 18b116c2c1 Don't let the selection highlight protrude into the top bar 2018-07-03 18:05:45 +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
Ole Jørgen Brønner 4b7139fe2f log-viewer: speed up filtering 2018-07-03 15:08:00 +02:00
Ole Jørgen Brønner ab4caf200d log-viewer: Group stacktraces for better readability 2018-07-03 14:57:20 +02:00
Ole Jørgen Brønner 01e9161922 debug-util: function to visually distinguish window actors and clones 2018-07-03 13:48:09 +02:00
Tor Hedin Brønner 6b44a9139f cleanup: Remove a bunch of unconditional logging 2018-07-03 00:08:40 +02:00
Tor Hedin Brønner 2f27acc789 Hide clickoverlays when showing the overview 2018-07-03 00:08:40 +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
Ole Jørgen Brønner eb975ec811 centerWindow: only warp pointer if it's inside the selected window 2018-07-02 20:14:42 +02:00
Ole Jørgen Brønner 4f75b45ea8 Bugfix monitor relative coordinates 2018-07-02 19:44:58 +02:00
Tor Hedin Brønner d80abfbe11 Fix broken pointer warping on centerWindowHorizontally 2018-07-02 19:09:43 +02:00
Tor Hedin Brønner 6ff1af0c58 Document the new space structure 2018-07-02 18:56:23 +02:00
Tor Hedin Brønner 4ce41ab54b Fix highlight width while grab resizing 2018-07-02 18:29:24 +02:00
Tor Hedin Brønner 1f62242b56 Add and use Space.startAnimate 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner d03dc78cd6 Always select a neighbour when closing selectedWindow
Only look at the neighbours of the closed window when selecting a new window.

Also raise the window on ensure, this way the stacking order works like an mru
for selectedWindow.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 36b28ace99 Restore window position correctly when exiting fullscreen 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 714938fcde Don't add the clone twice 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner ea77c4609f Disconnect destroyed windows and actors 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 8c758c2ca2 Center small spaces in space.layout 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner c7efed3d62 Fix resize and new window animation on wayland
When a window actor is hidden its clone won't properly update its size, so we
manually fix it up in resizeHandler.

To complicate matters this bugs out the new window animation so we need to delay
connecting the `size-changed` signal.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner d78212cdd7 Don't do any resizing when adding existing windows on reload
Running `space.layout` when adding existing windows through `space.addAll`
causes the first window in every column to take up the whole height.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 7b55d03faf Make selection track the selected window
Reset selected highlight only when switching windows.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner ac0814cef9 Add grab handler when moving windows with the mouse 2018-07-02 18:28:25 +02:00