Commit Graph
742 Commits
Author SHA1 Message Date
Ole Jørgen Brønner c18ce14e00 Return early in Scratch.show if there's no scratch windows 2018-06-23 19:31:26 +02:00
Tor Hedin Brønner c7e4d99a35 Don't force the position of the first and last window 2018-06-23 19:09:46 +02:00
Tor Hedin Brønner dcb302d21d moveSizeHandler: return if window is already moving 2018-06-23 14:17:34 +02:00
Tor Hedin Brønner c991ce3765 centerWindowHorizontally: Animate and use whole pixels 2018-06-23 12:48:46 +02:00
Tor Hedin Brønner 0eade6d5cd Use grab-op-begin/end to turn off and on animation
Also let the user freely move a window on the y axis fixing the position when
the grab is done.
2018-06-23 12:48:46 +02:00
Tor Hedin Brønner cb9f73fc14 Only fix stack around an actual window
ref #56
2018-06-22 18:52:08 +02:00
Ole Jørgen Brønner cca3038957 Center window function (with mouse warp)
I find myself centering the focus window quite often since it's more
comfortable looking straight ahead.
2018-06-21 22:21:26 +02:00
Tor Hedin Brønner aa5a317625 move_to: avoid infinite loops 2018-06-21 11:55:18 +02:00
Tor Hedin Brønner ff17aa1aa3 clickoverlays: destroy any lingering previews on disable 2018-06-17 11:28:57 +02:00
Tor Hedin Brønner 5015cd2051 readme: specify app handlers a bit more 2018-06-16 02:36:26 +02:00
Tor Hedin Brønner c4f7efe2de readme: document new window handlers 2018-06-15 23:41:58 +02:00
Tor Hedin Brønner 5b491d77a9 app: Look up custom window handlers in a dict
This makes it easier to add new handlers in `user.js`.
2018-06-15 10:19:29 +02:00
Tor Hedin Brønner 3e4d9901d5 minimap: Use a more visible style for selection highlight 2018-06-14 21:14:33 +02:00
Tor Hedin Brønner 2c331640ae Hide minimized windows on startup
Should fixup e707ba404e
2018-06-11 19:44:07 +02:00
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