Custom menu on Gnome Top Bar with your favorite program shortcuts.
- Edit
~/.entries.json
to match your needs - If there's no such file named
~/.entries.json
a default will be created
- If you edit
~/.entries.json
file while running this gnome plugin and you'd like to see changes live ensure to execute one of these:- Reload the plugin. For example in a xorg Gnome Window Manager Session you can press: Alt+F2, "r" to reload it. Unfortunately it is NOT possible with Wayland.
- Disable/Enable the plugin to see changes.
- Logout/Login from the current session to have it reloaded for you.
- Use the newly added
reload
command available in the widgets manual below. This is the recommended option if you're running wayland.
- Tested on: Arch Linux, Wayland, Gnome v42.0.0 -> v48.0.0.
- Widgets manual section below describes available options, it's not a verbose
manual but it provides everything you need to create a valid configuration
file.
In the examples directory you can also see some tests you can pick for your setup.
Here are common widgets and entities you can use with this plugin:
Create a new entry in the menu to execute a command
{
"type": "launcher",
"title": "Item Name on Menu",
"command": "/your/command/to/execute --with-parameters"
},
Reload current configuration, it could be handy to invoke manually if you've
just edited the .entries.json
configuration file in the background.
The only configurable option is title
.
{
"type": "reload",
"title": "Reload Configuration",
},
Place a menu separator (<hr>), no options available here
{
"type": "separator"
},
Create a submenu inside current menu, items inside the submenu are placed
inside entries
and they can be of any type (launcher, separator, submenu,
...). All fields are mandatory
{
"type": "submenu",
"title": "Menu Name",
"entries": [
//... Place your entries here ...//
]
},
Special toggler
widget that can be used to detect/start/stop a systemd service.
{
"type": "systemd",
"title": "Print Service",
"unit": "cups"
},
Special toggler
widget to detect/start/stop a tmux session.
All fields are mandatory.
session
is the tmux session name.
command
might be as simple as "/usr/bin/bash"
or a more complex command like:
"ssh [email protected]"
, everything will be executed in a
bash -c "<Your Command Here>"
environment.
{
"type": "tmux",
"title": "Ben TMUX Session",
"session": "ben",
"command": "bash"
},
Create a toggle item on menu, it has a detector and ON|OFF commands. Command detector can be activated|deactivated by a 0 (success) return error level and later detected with a plain JavaScript eval. See graphical result on above screenshots
{
"type": "toggler",
"title": "Widget Title",
"command_on": "/command/when/turned/on",
"command_off": "/command/when/turned/off",
"detector": "/command/detector > /dev/null && echo yes"
},
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue and write your notes there.
Don't forget to give the project a star!
Thanks again!