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
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
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.
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.
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.
Might be a bit subtle, but works better as a selection, as there's a background
color (somewhat transparent).
We position the highlight vertically from the bottom of the top bar to the
bottom of the monitor.
Access the spaces using a straight mru list, instead of through the awkward
`multimap.minimaps[i].space`.
Also move the rest of `_init` into `_initialSelection`, leaving the absolutely
bare minimum (`_switcherList` is required before `_initialSelection` is run).
In the case a new window didn't already receive focus, giving it focus after
having moved the frame would immediately show the WindowActor.
Instead we always run ensure with force on new windows, marking them as moving.
Making it unnecessary to add special handling in the focus handler for new
windows.
We store windows that should be visible, ie. their WindowActor should be shown,
in a `Space.visible` array. When done with animation we emit `move-done` and the
space will take care of replacing the clones with WindowActors.
Navigator integration is a bit awkward as we simply rely on a `Space.delay` to
indicate if we're in a non-moving state and can commit the WindowActors
immediately when finishing a navigation.