Jan 18, 2017

Add A Searchable Command Palette To Any GTK3 Application Using Plotinus

Plotinus is a library that adds a searchable command palette to any GTK+ 3 application, similar to the Atom and Sublime Text Command Palette feature (or Unity HUD).

Plotinus with Gedit

To use it, press Ctrl + Shift + P and you can easily find the action you're looking for by typing a few letters, without having to go through the application menus. The keyboard shortcut cannot be changed, unless you build Plotinus from source.

You don't have to make any modifications to GTK+ 3 applications to use this, you'll only need Plotinus, which can be used either for some specific applications, or globally, for all GTK+ 3 applications.

Since I'm not sure if it works properly with all GTK+ 3 applications (I didn't encounter any issues in my test though), the Plotinus package from the WebUpd8 PPA doesn't activate Plotinus globally, but you can do this manually if you wish.


Installing and using Plotinus


For Ubuntu 16.10 or 16.04 / Linux Mint 18 (I was unable to build it for Ubuntu 14.04), you can install Plotinus by using the main WebUpd8 PPA. Add the PPA and install Plotinus using the following commands:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install libplotinus
Alternatively, you can download the deb from HERE.

For how to install Plotinus in other Linux distributions, see its installation section on GitHub.

To use Plotinus for an application, use the following command:
GTK3_MODULES=/path/to/libplotinus.so application
where "application" is the application executable and /path/to/libplotinus.so is the exact path to libplotinus.so. If you've used the WebUpd8 PPA, the path is:
  • 32bit: /usr/lib/i386-linux-gnu/libplotinus/libplotinus.so
  • 64bit: /usr/lib/x86_64-linux-gnu/libplotinus/libplotinus.so

For example, to run Gedit with Plotinus enabled on a 64bit system (assuming Plotinus was installed via the WebUpd8 PPA), use the following command (make sure no Gedit instances are currently running):
GTK3_MODULES=/usr/lib/x86_64-linux-gnu/libplotinus/libplotinus.so gedit

You can either run this command from a terminal, or edit the application .desktop file and change the "Exec" line to this command.

To enable Plotinus globally (for all GTK+ 3 applications), open /etc/environment with a text editor (as root) and at the end of this file, paste the following:
GTK3_MODULES=$GTK3_MODULES:/path/to/libplotinus.so
where "/path/to/libplotinus.so" is the exact path to libplotinus.so (if you've installed Plotinus from the WebUpd8 PPA, see the exact path for 32bit and 64bit above). Then restart the session (logout/login).

To download the source, report bugs, etc., see the Plotinus GitHub page.

Also see: How To Get A Unity-Like HUD (Searchable Menu) In Xubuntu, Ubuntu MATE, Linux Mint, More


via Web Upd8 - Ubuntu / Linux blog http://ift.tt/2iIfwy1