Commit Graph
728 Commits
Author SHA1 Message Date
Tor Hedin Brønner f6c12ae55d clickoverlays: show a preview on hover 2018-06-05 21:23:42 +02:00
Tor Hedin Brønner e707ba404e disable: Only show windows on active workspace
This avoids showing all the window actors in the background when we disable.
2018-06-05 18:57:08 +02:00
Tor Hedin Brønner 1c998302f3 moveHandler: use correct y coordinates 2018-06-05 18:25:51 +02:00
Tor Hedin Brønner 085c6d7ddc Position windows at half the screen, when moving them to another space 2018-06-05 00:27:42 +02:00
Tor Hedin Brønner da7547699d Fix window actor visibility after position-changed
`move-done` wasn't being run properly leaving the clones showing.
2018-06-03 23:15:39 +02:00
Tor Hedin Brønner 5827606a63 Constrain clickoverlays to 75 pixel width
We only replace windows with clones when their position isn't possible, ie. when
they're less than 75 pixels inside the space, they're maximized or fullescreen.

The clickoverlays is now mostly decoupled from the visible status of the window
actor. They now always target the first window with an edge outside the
monitor. The width however is limited to 75 pixels (unless the window isn't
visible) making eg. drag and drop and drop possible while edge clicking will
never send input to the window.

The clickoverlays will now also span the window gap which makes it possible to
click on windows that's just off the monitor.
2018-06-03 14:21:18 +02:00
Ole Jørgen Brønner b4c3184d79 Notes 2018-06-03 14:16:16 +02:00
Ole Jørgen Brønner f6c8b902df Bugfix: selected window in minimap somtimes out of view for large maps
Happened if the minimap strip exceeded the monitor width and the initially
selected window was one of the rightmost windows.
2018-06-03 10:19:15 +02:00
Tor Hedin Brønner 632ff93ce7 Hide the clickoverlay when unwanted, show again on focus
This should fix the issues with the clickoverlay and the scratch layer, where
the overlay would be inactive after closing the scratch layer.
2018-06-03 00:49:49 +02:00
Tor Hedin Brønner 8296ffa786 Avoid killing eg. minimize animations on alt-tab
`_initialSelection` happens after pushModal possibly fails preventing proper
clean up.
2018-06-01 17:02:36 +02:00
Tor Hedin Brønner 293f2d18cd Add missing <Super><Ctrl>Left/Right binding 2018-05-29 18:32:43 +02:00
Tor Hedin Brønner 50158d6f91 <Super>Up/Down: bind to workspace mru stack
Also add <Super><Ctrl>Down/UP
2018-05-29 18:30:35 +02:00
Tor Hedin Brønner 5d9801ebb7 Fix the stackoverlay on startup and reload
ensureViewport needs to be run on the active space last.
2018-05-29 18:09:02 +02:00
Tor Hedin Brønner 748a300b9b Move the tiling when the selected window is moved
This puts the window in place vertically and makes it possible manually position
the tiling.

ref #54
2018-05-29 18:09:02 +02:00
Tor Hedin Brønner 0b2a26e69a Turn propagate into a for loop 2018-05-29 17:43:33 +02:00
Tor Hedin Brønner 2e23a8aa78 <Super>Home/End: activate first/last window 2018-05-29 14:22:35 +02:00
Tor Hedin Brønner cd6492443a readme: Document <Super>Left/Right 2018-05-29 14:06:48 +02:00
Tor Hedin Brønner 19695dfbfa disable: reset our own keybindings 2018-05-29 13:46:12 +02:00
Tor Hedin Brønner e48fef508f Restore restore-shortcuts binding 2018-05-27 21:30:25 +02:00
Ole Jørgen Brønner 39ddd6b4ca Restore built-in mutter keybindings on disable 2018-05-26 19:58:56 +02:00
Tor Hedin Brønner 94de302b22 Fix adding new workspaces
Adding a new workspace would obscure the active workspace.
2018-05-26 15:17:47 +02:00
Tor Hedin Brønner 5b12b44fb7 Prevent crash when removing workspaces
If the workspace is removed workspace.index() causes a crash...
2018-05-26 15:10:32 +02:00
Tor Hedin Brønner 3e6843ca1a Fix selection visibility
Always show the selection chrome on new windows, and always hide it when there's
no windows left.
2018-05-25 18:21:46 +02:00
Tor Hedin Brønner 6094bd46f8 Bind <Super>Up to toggleMaximizeHorizontally 2018-05-24 18:15:22 +02:00
Tor Hedin Brønner 7c70da6e66 Bind <Super>Right/Left to switch-next/previous
Don't think it's possible to rebind these keys on disable.
2018-05-24 17:52:59 +02:00
Tor Hedin Brønner 3d0fa30f37 Fix weird typo 2018-05-23 03:14:00 +02:00
Tor Hedin Brønner 170df6ba34 minimap: Use whole pixel values consistently 2018-05-21 22:31:14 +02:00
Ole Jørgen Brønner 33a365f326 Handle gnome-terminal specially in newWindow
Invoking `app.open_new_window` on gnome-terminal does not inherit $PWD. We want
that so take matter into our own hands.

Note: vte.sh must be sourced in the terminal's shell.

Other approaches:

Write a custom .desktop file where "Exec" is a custom script (Note that it's
probably not possible to call the dbus action using dbus-send or qdbus due to
the argument structure)

I tried to use the dbus interface directly from js too, but it seems basically
impossible to call correctly..

  const Gio = imports.gi.Gio;
  const GLib = imports.gi.GLib;
  Gio.DBus.session.call(
      metaWindow.gtk_unique_bus_name,
      metaWindow.gtk_window_object_path,
      "org.gtk.Actions",
      "Activate",
      GLib.Variant.new_tuple([
          new GLib.Variant("s", "new-terminal"),
          GLib.Variant.new_array(null,
             [new GLib.Variant('(ss)', ["window", "current"])]),
          GLib.Variant.new_array(new GLib.VariantType("{sv}"), [])
      ]),
      null, Gio.DBusCallFlags.NONE, -1, null,
      (conn, result) => {}
   );

Complains about wrong type - wants the first array to be "av", not "a(ss)", but
I don't know how to create a "opaque" variant..

Keywords: current directory
2018-05-21 14:32:06 +02:00
Ole Jørgen Brønner 1bc2075e84 Display notification on errors in user.js 2018-05-20 17:24:23 +02:00
Ole Jørgen Brønner dea5cb958d Minor future proofing: Replace all '-' occurrences (not just the first) 2018-05-20 13:23:56 +02:00
Ole Jørgen Brønner 2aa1f84b33 Bugfix: Canceling navigator didn't return to focused window
Regression after a8efb66aa5
2018-05-17 22:59:47 +02:00
Ole Jørgen Brønner b703bbb0b0 Bugfix: fixStack not always called when window receives focus
The primary symptom is that the wrong window is focused next when the current
window is closed. Most easily triggered by quickly letting <super> go when
navigation to the window (from far away).

I'm not sure why the fixStack call was conditioned in the first place?

Probably regression after: 8d3ae51728
2018-05-17 22:24:12 +02:00
Ole Jørgen Brønner acb383249e Minor cleanup 2018-05-17 14:18:43 +02:00
Tor Hedin Brønner 7012fbb6a2 readme: Document the workspace menu 2018-05-16 17:51:40 +02:00
Tor Hedin Brønner 6d55fbe3e4 Better fix for initial space.label positioning
Hide the label at space construction. Update and show the label when before we
start looking at the workspace mru stack.

Also use the position of the menu label relative to the panelbox, to support
placing the workspace menu in eg. the center.
2018-05-16 15:44:27 +02:00
Tor Hedin Brønner f4c6e057a9 If there's not enough colors in worspace-colors fill it up with '' 2018-05-15 22:37:17 +02:00
Tor Hedin Brønner ccbd44e3ff workspace menu: Always update the text color
We need to connect the Ste.Entry.clutter_text actor here.
2018-05-15 22:37:17 +02:00
Ole Jørgen Brønner 11a37af93d Create and destroy workspace menu on enable/disable
Lack of super.destroy() in WorkspaceMenu.destroy likely prevented previous
attempts from working properly.
2018-05-15 22:37:17 +02:00
Ole Jørgen Brønner 44237287f0 "Accept" PopupMenuEntry on <Return> (eg. set workspace name) 2018-05-15 22:37:17 +02:00
Ole Jørgen Brønner 5b60380d16 Handle renaming n'th workspace when (n-k)'th workspace doesn't have a name 2018-05-15 22:37:17 +02:00
Tor Hedin Brønner 88c11dadfe Add workspace menu with name and color selection 2018-05-15 22:37:17 +02:00
Tor Hedin Brønner e0f2d4b12b Fix stupid typo 2018-05-15 19:58:09 +02:00
Tor Hedin Brønner 6942df947f Monitor preference changes
Introduces `prefs.js` with simple `settings::change` signal handling.

Also put workspace colors in the schema and draw them from there.
2018-05-15 16:31:01 +02:00
Tor Hedin Brønner 846cbacffc readme: Document close keybinding 2018-05-14 15:28:09 +02:00
Tor Hedin Brønner d23ae6f7ac Use custom handler for extra close methods
This avoids overriding the default close binding (alt-f4).
2018-05-14 15:22:57 +02:00
Tor Hedin Brønner ed054062df Use window_manager::switch-workspace instead of screen::workspace-switched
The former happens earlier so is probably a better fit.
2018-05-13 13:07:41 +02:00
Tor Hedin Brønner 08ba7c89df bindings: Use a custom handler on restore-shortcuts
Haven't looked at restoration at disable, but this will at least restore things
on restart.

Also remove killKeybinding and restoreKeybindings as they worked out really
badly.
2018-05-11 15:45:19 +02:00
Tor Hedin Brønner 48eac9081b new window: Use correct coordinates for initial clone position 2018-05-11 14:00:12 +02:00
Tor Hedin Brønner 000881524a New minimap
Simple switcherlist styled minimap without any animations.

TODO: add fading at the edges
2018-05-10 22:30:40 +02:00
Tor Hedin Brønner 3ff6570344 Fix selection highlight and reset visible windows on window-removed
Fixes the behavior of closing the last window in a workspace, where the
selection highlight would hang around. Navigating away from the workspace would
leave an empty minimap and require another keypress to make the intended action.
2018-05-10 22:30:40 +02:00