[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

GNOME 3, how do you ensure windows are grouped in the dash?



Hi,

I'm experimenting with moving to GNOME 3 from Unity but there is a
particular behaviour I'm having trouble replicating and although
it's a small thing, I don't think I can live without it.

My workflow generally results in me having many (15+) rxvt-unicode
terminal windows each connected to different remote hosts, and a
couple of browser windows.

On Unity I provide myself with easy access to the different urxvt
launchers by making each one a different .desktop file in
~/.local/share/applications/

For example, ~/.local/share/applications/remotehost-foo.desktop:

[Desktop Entry]
Comment=Terminal on foo
Terminal=false
Name=foo
Exec=urxvt -T foo -e autossh -M 0 foo.example.com
Type=Application
Icon=utilities-terminal
StartupNotify=true
StartupWMClass=RemoteHosts

I can launch this by hitting the super key and starting to type
"foo". This application will appear in the dash as I type. If I
launch it again, or launch a different one, they will appear grouped
together under a single terminal icon on the launcher bar. I would
be able to select between them by right clicking on the single
terminal icon on the launcher bar.

I tried to set up the same thing on GNOME 3. It almost works.
Hitting super and starting to type indeed finds the applications,
but each one shows as its own icon on the dash while running. If I
carry on this way then my dash will be full of terminal icons that
are difficult to select between.

I tried changing StartupWMClass to "urxvt". That does not allow me
to launch multiple applications; the search finds the application,
but selecting it just brings the existing window to focus without
launching a new one.

I found one workaround, which was to make a single .desktop file
that has many alternate actions. Like this:

[Desktop Entry]
Comment=Terminals
Terminal=false
Name=urxvt
Exec=urxvt -T localhost
Type=Application
Icon=utilities-terminal
StartupNotify=true
Actions=foo;bar;

[Desktop Action foo]
name=foo
Comment=Terminal on foo
Exec=urxvt -T foo -e autossh -M 0 foo.example.com

[Desktop Action bar]
name=bar
Comment=Terminal on bar
Exec=urxvt -T bar -e autossh -M 0 bar.example.com

Basically one alternate action for each host I often connect to. I
would then launch them by hitting super, beginning to type urxvt,
right clicking on the icon that appears and selecting the correct
action. Multiple windows now do group under urxvt on the dash.

Downsides:

- Can't search for the application by its host name
- Have to select correct host from a huge list of actions

Those are pretty big downsides for that workaround.

I am aware that I could change my workflow. I could use one terminal
with screen or tmux or similar to have a different window on each
host. I know I could use terminator to have multiple terminal
windows inside one window. Or I could use a tabbed terminal emulator
like gnome-terminal.

The thing is, I really like urxvt! And I really like having one
urxvt window for each host, using screen to have multiple sessions
within each one.

So, does anyone know how to make GNOME 3's dash group multiple
windows under the one icon?

Perhaps this is not the best forum for asking GNOME 3 questions. I
had a search around and couldn't find any official GNOME support
channels though. If there's a better place please do let me know.

Cheers,
Andy


Reply to: