Commit Graph
921 Commits
Author SHA1 Message Date
Tor Hedin Brønner a2b5a26838 Expose the workspace preview in Tiling.inPreview
Might not be ideal, but having it on spaces can cause trouble if ensureVievport
is called before spaces is constructed fully.
2018-07-18 23:08:23 +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 222421d694 Insert new windows into the correct space when navigating 2018-07-18 23:08:23 +02:00
Tor Hedin Brønner 6008051a39 liveAltTab: basic integration with actions 2018-07-18 23:08:23 +02:00
Tor Hedin Brønner 1529fd86f4 switch-first/last: Integrate properly into the navigator 2018-07-18 22:37:34 +02:00
Tor Hedin Brønner 3b81029533 Simple fix for the minimap 2018-07-18 22:37:34 +02:00
Tor Hedin Brønner 73b028e423 Apply actions to the correct space 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
Tor Hedin Brønner b7eda1957d Move switch-workspace handling to Spaces 2018-07-18 22:37:34 +02:00
Tor Hedin Brønner 25d9f3092f Only register actions in registerAction
enableAction is run on enable.
2018-07-18 22:37:34 +02:00
Tor Hedin Brønner f8119ae0bf Record overrides in the actionIdMap
This means we can get rid of more cases in the ugly switch in navigator.

Guard against non mutter action names, but apply the override even when we can't
get the id.

For some reason restore-shortcuts (`<Super>Escape`) returns
KeybindingsAction.NONE.

Also remove setKeybinding
2018-07-18 22:37:34 +02:00
Tor Hedin Brønner 34f3166d7a keybindings: actually record and use the actionIdMap 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 bc6e4da22f clickoverlays: don't show while the overview is active
fixes #72
2018-07-18 13:49:02 +02:00
Tor Hedin Brønner ef40954e20 readme: We've support shared monitors a while now 2018-07-17 11:19:46 +02:00
Tor Hedin Brønner fcaedb0004 prefs: Fix tooltip 2018-07-16 14:03:02 +02:00
Tor Hedin Brønner 2a4199029d minimap: Respect window-gap properly
There were some hardcoded values left which really should've observed the
`window-gap` preference.
2018-07-15 20:39:44 +02:00
Tor Hedin Brønner 9132979916 Add tooltip describing conflicts
Also add a reset toggle.
2018-07-15 20:35:04 +02:00
Tor Hedin Brønner cdbf2a662c Add every custom Gnome Shell handler 2018-07-13 11:40:03 +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
Tor Hedin Brønner b12bc2bb52 Add key conflict machinery to settings.js
This is the common functions needed for both the extension side and prefence UI
side, so it goes in `settings.js`.

`Settings.findConflicts` searches for keycombo conflicts between our own
bindings and the built in Gnome Shell and mutter bindings, returning an array
like this:
```
[{ name: our own action name,
   conflicts: array of conflicting names
   settings: the settings schema the conflicting are part of
   combo: the key combo as generated by keystrToKeycombo},
 ...]
```

keystrToKeycombo now handles `Above_Tab` properly.
2018-07-13 11:40:03 +02:00
Tor Hedin Brønner fc260da22d Consistently declare and use screen and display
Makes things shorter and removes language warnings of using undeclared
variables.
2018-07-12 16:14:26 +02:00
Ole Jørgen Brønner 8c39bb2e21 Filtered keybinding search (quick and dirty)
NB: get this log message when removing a binding:

  Gtk-CRITICAL **: 00:19:47.333: gtk_tree_model_filter_get_path: assertion
  'GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed

But it doesn't really seem to be CRITICAL.
2018-07-12 12:17:35 +02:00
Ole Jørgen Brønner cdabb978aa About section in prefs GUI 2018-07-11 22:49:00 +02:00
Ole Jørgen Brønner 0b9138294d Bugfix: prefs.js crashed on unbound actions
Worked by accident before - when the above_tab fixed was added our luck ran out
:)
2018-07-11 19:36:54 +02:00
Tor Hedin Brønner d41d6b9033 Fix duplicate workspace settings
Simplyfy things by storing all workspace settings from the get go.
2018-07-11 18:47:56 +02:00
Tor Hedin Brønner 800f582a0a Simplify binding summaries 2018-07-11 18:47:56 +02:00
Tor Hedin Brønner e6c76e26b9 Translate Above_Tab 2018-07-11 18:47:56 +02:00
Tor Hedin Brønner 8434d5b8e4 Only add new empty row if it's not already there 2018-07-11 18:47:56 +02:00
Tor Hedin Brønner 38a62a990f Use ... as description for extra bindings 2018-07-11 18:47:56 +02:00
Ole Jørgen Brønner c76137fd77 Working tree-view based keybinding editor
Note: ideally we should subscribe to settings changes and update the TreeModel
in the listener instead of updating it directly in the signal handler for the
accel editor.
2018-07-11 18:47:56 +02:00
Tor Hedin Brønner 55c6b60803 Add settings UI with workspace controls and gap and margin spinners
`Settings.ui` is built with and can be inpsected with Glade.
2018-07-11 18:47:56 +02:00
Tor Hedin Brønner e21433333c navigator: Fix escape when the starting window is closed 2018-07-11 17:16:50 +02:00
Tor Hedin Brønner 0a8a0079c9 Fix resize grab, layout should actually respect animate 2018-07-10 15:21:23 +02:00
Tor Hedin Brønner 811473462a Use the stacking order when updating the stack around focus
This will focus the last _selected_ neighbour when closing focus, instead of the
last focused neighbour. This pick should be more obvious, eg. when selecting the
left window, closing focus, and then suddenly going to the right window (since
it happened to be the last focus).
2018-07-10 14:53:01 +02:00
Tor Hedin Brønner 700202d307 readme: Document that <super>Return opens new windows 2018-07-08 14:54:56 +02:00
Tor Hedin Brønner 9982b77c9e WorkspaceMenu: Only open the config menu on right click
See #67 for more discussion.
2018-07-08 12:09:47 +02:00
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