Commit Graph
405 Commits
Author SHA1 Message Date
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
Tor Hedin Brønner 6510a78745 Move add window logic to add_filter
add_all_from_workspace needs the same logic as add_handler, so move it to the
common add_filter.

This fixes a regression from the last commit which caused scratch windows to
inserted in a space when restarting Gnome Shell.
2017-12-26 18:14:45 +01:00
Tor Hedin Brønner d15dbb0e99 Set always on top for new scratch windows
Also move unmake_above to insertWindow.
2017-12-26 14:54:25 +01:00
Tor Hedin Brønner 70ff3a24c0 New paged windows should never be on top
Windows on the stack should never be on top, windows not on the stack will never
overlap. Which means that alaways on top is never wanted for ordered windows.

The issue is noticed when attaching a scratch window to the page strip, as it
will continue to be always on top, making the stack overlap visible windows.
2017-12-19 15:37:27 +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 33dd6932d3 Add kill and restore binding functions
This isn't fully robust as a crash will lose user set values. A solution would
be to store the user values in gsettings as not to lose them.
2017-12-08 09:43:44 +01:00
Tor Hedin Brønner 2898fb2062 bindings: Add arrow keybindings
Super-right/left to switch to the next/previous window. Same with moving the
window.

Of course these keys are already taken so might not work.
2017-12-08 07:31:55 +01:00
Tor Hedin Brønner 15e7f470cb Reset monitors-changed signal on reload 2017-12-06 12:30:10 +01:00
Tor Hedin Brønner 984791d6b7 Make paperActions non global 2017-12-05 01:59:22 +01:00
Tor Hedin Brønner 185b5a867d Move window.paperActions into init()
Since it's not possible to reload action registration it's better to have it in
init where it will never run more than once.
2017-12-05 01:20:02 +01:00
Tor Hedin Brønner 921675dc69 Remove obsolete panelBox hide signal
This didn't get included in 9638c04cae for some
reason.
2017-12-04 21:49:30 +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 9638c04cae panelBox: disconnect signals and reset scale on disable 2017-12-01 22:29:11 +01:00
Tor Hedin Brønner 135b83d6be disable/enable: Move Tiling specific enable/disable to its own module
Use module.enable/disable.
2017-12-01 22:21:44 +01:00
Tor Hedin Brønner 1ef583dfd1 disable/enable: Fully disable stackoverlays
Also just have an enable/disable function in the stackoverlay module.
2017-12-01 21:23:13 +01:00
Tor Hedin Brønner 01a1b8428f Use custom actions for workspace movement
Since we're using mru order on the workspaces it's cleaner to just use our own
actions. In addition this might make it easier to handle enable/disable by
blanking the bindings on disable (not sure if it's possible to set the bindings
without touching dconf/gsettings though).

Schema change, so require recompilation.
2017-12-01 07:52:35 +01:00
Tor Hedin Brønner 4a8b2bb045 Move binding registration to init as there's no way to disable
As far as I know there's no to disable a custom key handler, so it makes sense
to do this in init which is meant to be run only once.
2017-12-01 06:58:49 +01:00
Tor Hedin Brønner 2030138ee7 disable: Disconnect the stack overlays 2017-12-01 06:58:49 +01:00
Tor Hedin Brønner 1fbd12a71e Move screen/display connection back to enable
We need to reconnect on enable, so it's more convenient this way.
2017-12-01 06:58:49 +01:00
Tor Hedin Brønner b4e0858fde disable: Minimal implementation
Adds a enable switch to ensure we never run enable twice in a row. Bindings
aren't disabled yet so we still need the initCount check for those.
2017-12-01 06:58:49 +01:00
Tor Hedin Brønner 1855cef726 enable: Only guard against renabling keybindings 2017-12-01 06:58:49 +01:00
Tor Hedin Brønner cb20e06c8d Make copyq a part of the scratch layer
All in all more sane.
2017-12-01 06:58:34 +01:00
Ole Jørgen Brønner ad33d89147 Gjs in 3.24 doesn't support default values in destructured argument 2017-11-11 18:21:55 +01:00
Tor Hedin Brønner 38bdd9cdbd Set the correct position of maximized windows before ensure 2017-11-08 01:22:20 +01:00
Tor Hedin Brønner 1a6bc5b9f5 Refactor move into arguments as a descructured object
Like move_to, makes it much easier to add extra stuff.
2017-11-08 01:21:43 +01:00
Tor Hedin Brønner a8bfae0333 Use less abrupt staggered scaling on fold 2017-10-30 15:16:48 +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
Ole Jørgen Brønner 4f1daa42ab Notes: remove TODOs as we use github issues now 2017-10-29 15:55:09 +01:00
Ole Jørgen Brønner eb5f30e5a8 Notes
Documenting GJS and extension system findings
2017-10-29 15:36:02 +01:00
Ole Jørgen Brønner f1ed8d5d27 Fix stupid bug 2017-10-29 12:38:57 +01:00
Ole Jørgen Brønner 51fd7c1930 Set workspace name utility function
Arguments ordered for convenience for now since the repl is the UI atm.
2017-10-29 11:39:04 +01:00
Ole Jørgen Brønner f2ef36ed87 Sync workspace names on workspace-removed
Since workspace names are associated by index the list need adjustment when a
workspace in the middle of the list is removed. (dynamic workspaces)
2017-10-28 22:11:33 +02: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 a72767bfd2 Make primary local
We want to reference primary through `Tiling` as it can change on
`monitors-changed`.
2017-10-27 21:47:29 +02:00
Tor Hedin Brønner fb360b5695 Everything but primary and spaces should be local now 2017-10-27 21:32:18 +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 d9d3ab3241 Make stack_margin local 2017-10-27 21:16:32 +02:00
Tor Hedin Brønner 1a4e2271f3 Add owner object to as_key_handler
Some more globals that can go away :)
2017-10-27 21:12:36 +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 5eba2cbe87 Fix hanging re-enabling in 3.26
Seems like init is only called once in 3.26, so enable will be recalled, which
kills the actionIds. This 'fixes' the problem.
2017-10-27 19:24:41 +02:00