1. Combining multiple applications into one icon
To combine multiple applications in one icon in the launcher, you can use QLE Quicklist Editor
Disclaimer: I am the author of the application. The first version was developed when (I believe) 11.04 was just released, but the most recent version still works fine on 16.04. Currently rewriting it, but slowly, because it still works fine with current Ubuntu versions
To use the application
Install QLE Quicklist Editor:
sudo add-apt-repository ppa:vlijm/qle
sudo apt-get update
sudo apt-get install qle
As an example, I will add a few applications to my pinned Bluefish
icon:
Open the quicklist editor:
Click on the big + icon, with the small + orange icon inside. In the popup list, choose "Add an application shortcut".
In the listbox, select your application and press Add
Done. Your applications was added to the icon:
Repeat this for every application you want to add to the icon.
Note
Make sure your application (in this case Bluefish) is not running when you edit the icon, else you will have to log out/in for the changes to be applied.
2. Alternatively, run your favorite applications from a menu in the panel
Use the indicator below to make your favorite applications easily accessible
With the setup below, you can have your applications under an icon in the panel:
The script
#!/usr/bin/env python3
import subprocess
import os
import signal
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')
from gi.repository import Gtk, AppIndicator3
currpath = os.path.dirname(os.path.realpath(__file__))
class Indicator():
def __init__(self):
self.app = 'update_setting'
iconpath = currpath+"/icon.png"
self.indicator = AppIndicator3.Indicator.new(
self.app, iconpath,
AppIndicator3.IndicatorCategory.SYSTEM_SERVICES)
self.indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
self.indicator.set_menu(self.create_menu())
def getscripts(self):
apps = [l.strip().split("|") for l in open(currpath+"/applist").readlines()\
if not l == "\n"]
for l in apps:
menuitem = Gtk.MenuItem(l[0])
menuitem.connect("activate", self.run_script, l[1])
self.menu.append(menuitem)
def create_menu(self):
self.menu = Gtk.Menu()
self.getscripts()
# quit
item_quit = Gtk.MenuItem('Quit')
sep = Gtk.SeparatorMenuItem()
self.menu.append(sep)
item_quit.connect('activate', self.stop)
self.menu.append(item_quit)
self.menu.show_all()
return self.menu
def run_script(self, widget, script):
subprocess.Popen(["/bin/bash", "-c", script])
def stop(self, source):
Gtk.main_quit()
Indicator()
signal.signal(signal.SIGINT, signal.SIG_DFL)
Gtk.main()
The icon
How to use
- Create a folder to contain the script, the icon and a application list (see further)
- Copy the script into an empty file, save it as
list_applications.py
in the folder you created.
- Copy the icon (right-click -> save as), save it as (exactly)
icon.png
in one and the same folder as the script.
Now create, again in the very same folder, a file, (exactly) named applist
(no extension). Now add for each of your applications a line, with the name you want to use for the application, and the command to run it. Use the delimiter |
e.g.:
Test- run the script with the command:
python3 /path/to/list_applications.py
If all works fine, add it to Startup Applications: Dash > Startup Applications > Add. Add the command:
/bin/bash -c "sleep 10 && python3 /path/to/list_applications.py"
Note
If you add or remove applications to or from the list, the script needs to be restarted.