I would like to create a launcher that does the same thing as the trash icon where different quicklists are shown depending on whether or not there are items on the trash.
I would like something like: if folder A
exists, show A,B,C
on the quick list, if folder A
does not exist, show D,E,F
on the quick list.
The following works:
python mylauncher.py
in the background. You'll have to add this to one of your start-up scripts.Source: https://wiki.ubuntu.com/Unity/LauncherAPI
Contents of mylauncher.desktop:
Contents of mylauncher.py:
EDIT: Use the following as mylauncher.py for the purpose mentioned in comments. Modifying to suit your needs should be straight forward and in case it isn't mention it in the comments.