Thursday, May 26, 2011

Top Unity Launcher Quicklists

Unity Launcher supports quicklists/jumplists for easier access to common app features. Implementation is not that difficult.


Backup

In this tutorial, we would be adding the quicklists for all users on your PC. If you want to do it only for a single user, you need to copy the respective .desktop files to ~/.local/share/applications directory and make the edits there.

In any case, it would be wise to backup your original .desktop files in case you want to revert back to the default quicklists. Follow these commands one by one:

mkdir ~/applications-backup
cd /usr/share/applications
sudo cp nautilus-home.desktop banshee.desktop firefox.desktop chromium-browser.desktop ubuntu-software-center.desktop libreoffice-startcenter.desktop ~/applications-backup

For restoration of the default quicklists later, just move back these files to the /usr/share/applications directory.

sudo cp ~/applications-desktop/* /usr/share/applications

Home Icon Quicklist


From Terminal, run this command all at once:

echo "[Desktop Entry]

Name=Home Folder
Comment=Open your personal folder
TryExec=nautilus
Exec=nautilus --no-desktop
Icon=user-home
Terminal=false
StartupNotify=true
Type=Application
Categories=GNOME;GTK;Core;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-Ubuntu-Gettext-Domain=nautilus

X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads
[Videos Shortcut Group]
Name=Videos
Exec=nautilus Videos
TargetEnvironment=Unity


[Documents Shortcut Group]
Name=Documents
Exec=nautilus Documents
TargetEnvironment=Unity

[Music Shortcut Group]
Name=Music
Exec=nautilus Music
TargetEnvironment=Unity

[Pictures Shortcut Group]
Name=Pictures
Exec=nautilus Pictures
TargetEnvironment=Unity

[Downloads Shortcut Group]
Name=Downloads
Exec=nautilus Downloads
TargetEnvironment=Unity" | sudo tee /usr/share/applications/nautilus-home.desktop

Banshee Quicklist


From Terminal, run this command all at once:

echo "X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Previous;Next;Preferences

[Play Shortcut Group]
Name=Play
Exec=banshee --play
TargetEnvironment=Unity

[Pause Shortcut Group]
Name=Pause
Exec=banshee --pause
TargetEnvironment=Unity

[Stop Shortcut Group]
Name=Stop
Exec=banshee --stop
TargetEnvironment=Unity

[Previous Shortcut Group]
Name=Previous
Exec=banshee --previous
TargetEnvironment=Unity

[Next Shortcut Group]
Name=Next
Exec=banshee --next
TargetEnvironment=Unity

[Preferences Shortcut Group]
Name=Preferences
Exec=banshee --show-preferences
TargetEnviroment=Unity" | sudo tee -a /usr/share/applications/banshee.desktop

Firefox Quicklist


From Terminal, run these commands one by one:

sudo sed -i '/X-Ayatana-Desktop-Shortcuts/ c\X-Ayatana-Desktop-Shortcuts=NewWindow;SafeMode;ProfileManager;' /usr/share/applications/firefox.desktop

echo "[SafeMode Shortcut Group]
Name=Open Firefox in safe mode
Exec=firefox -safe-mode
TargetEnvironment=Unity

[ProfileManager Shortcut Group]
Name=Firefox Profile Manager
Exec=firefox -ProfileManager
TargetEnvironment=Unity" | sudo tee -a /usr/share/applications/firefox.desktop

Chromium Browser Quicklist


From Terminal, run this command all at once:

echo "X-Ayatana-Desktop-Shortcuts=NewWindow;Incognito;

[NewWindow Shortcut Group]
Name=New Window
Exec=chromium-browser
TargetEnvironment=Unity

[Incognito Shortcut Group]
Name=New incognito window
Exec=chromium-browser --incognito
TargetEnvironment=Unity" | sudo tee -a /usr/share/applications/chromium-browser.desktop

Software Center Quicklist


From Terminal, run this command all at once:

echo "X-Ayatana-Desktop-Shortcuts=SoftwareProperties;SoftwareSources;

[SoftwareProperties Shortcut Group]
Name=Update Manager
Exec=update-manager -c %u
TargetEnvironment=Unity

[SoftwareSources Shortcut Group]
Name=Add/Edit PPAs
Exec=gksu software-properties-gtk
TargetEnvironment=Unity" | sudo tee -a /usr/share/applications/ubuntu-software-center.desktop

LibreOffice Quicklist


To get the LibreOffice Start Center icon in Launcher, you'll need to navigate to /usr/share/applications directory in file browser and drag and drop libreoffice-startcenter.desktop to the Launcher.

For adding the LibreOffice quicklist, run this command all at once:

echo "##Start of shortcut menu
##List of shortcuts
X-Ayatana-Desktop-Shortcuts=Writer;Impress;Calc;Math;Draw

##Define Shortcuts
[Writer Shortcut Group]
Name=Writer
Exec=libreoffice -writer %U
TargetEnvironment=Unity

[Impress Shortcut Group]
Name=Impress
Exec=libreoffice -impress %U
TargetEnvironment=Unity

[Calc Shortcut Group]
Name=Calc
Exec=libreoffice -calc %U
TargetEnvironment=Unity

[Math Shortcut Group]
Name=Math
Exec=libreoffice -math %U
TargetEnvironment=Unity

[Draw Shortcut Group]
Name=Draw
Exec=libreoffice -draw %U
TargetEnvironment=Unity
##End of shortcut menu" | sudo tee -a /usr/share/applications/libreoffice-startcenter.desktop

Implementation

Most of the quicklists appear as soon as you modify the .desktop file. For those which don't, either refresh Unity by pressing Alt + F2 and typing:

unity --replace

Or simply re-login.

Regular Updates and Quicklists

Make a note that every time the respective packages are updated, the Quicklists would reset to defaults. You might want to make a backup of your modified desktop files also so you can easily replace the original ones after the updates. For backup:

mkdir ~/applications-modified
cd /usr/share/applications
sudo cp nautilus-home.desktop banshee.desktop firefox.desktop chromium-browser.desktop ubuntu-software-center.desktop libreoffice-startcenter.desktop ~/applications-modified

And after the update, just execute this command and restart Unity:

sudo cp ~/applications-modified/* /usr/share/applications

Integration of default apps with Unity in 11.10

At UDS recently, there was a discussion regarding integration of default apps with Unity and hopefully, in Ubuntu 11.10, these quicklists would be present by default as for many other apps as well.

http://summit.ubuntu.com/uds-o/meeting/desktop-o-default-apps-unity-integration/

Related Posts:

Accessibility , Launcher , Unity