Is it possible to set the order in which extensions/indicators appear in the top panel in gnome 3 as they seem to change position every time I login and I want to set a specific order.
1 Answer
TL;DR The way is a little bit tricky:
You can reload and so influence the order the extensions.
Use this command and replace <Extension_UUID>
with the UUID
of the extension, don't use the ID
:
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method <Extension_UUID>
But I have found that sometimes the extension must be reloaded twice to achieve an effect.
Example:
My system wide extensions:
% ls -og /usr/share/gnome-shell/extensions
total 4
drwxr-xr-x 2 4096 Mär 31 15:15 [email protected]
My per user extensions:
% ls -og ~/.local/share/gnome-shell/extensions/
total 16
drwxrwxr-x 3 4096 Mär 26 08:01 [email protected]
drwxrwxr-x 3 4096 Mär 26 08:02 [email protected]
drwxrwxr-x 4 4096 Mär 26 07:56 [email protected]
drwxrwxr-x 3 4096 Mär 26 07:57 [email protected]
The extension ID should be the folder name, eg. [email protected]
.
To be sure, I would pick up the UUID
from the metadata file:
% less ~/.local/share/gnome-shell/extensions/[email protected]/metadata.json
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "A status menu for accessing and unmounting removable devices.",
"extension-id": "drive-menu",
"gettext-domain": "gnome-shell-extensions",
"name": "Removable Drive Menu",
"settings-schema": "org.gnome.shell.extensions.drive-menu",
"shell-version": [
"3.16"
],
"url": "http://git.gnome.org/gnome-shell-extensions",
"uuid": "drive-menu@gnome-shell-extensions.gcampax.github.com",
"version": 28
}
Therefore this is the command to reload the extension
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Extensions.ReloadExtension "[email protected]"
The UUID can be determined reliably with the following commands:
Install a JSON parser:
sudo apt-get install jq
Determine the UUID with:
jq '.uuid' ~/.local/share/gnome-shell/extensions/<shell_extension_path>/metadata.json
Example:
% jq '.uuid' ~/.local/share/gnome-shell/extensions/[email protected]/metadata.json
"[email protected]"
Or all in one:
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Extensions.ReloadExtension $(jq '.uuid' ~/.local/share/gnome-shell/extensions/driv[email protected]/metadata.json)
An other great solution is this answer.
-
Thank you this works. So if I write a script that runs at startup and reloads them in a specific order I can get them to display in the order I want. May 26, 2015 at 13:49
-