Michael Altfield's gravatar

Custom Synapse Shortcuts

I’ve been using Synapse for a few months now. This software is invaluable to my experience on my PC because:
# I can *quickly* do what I want to do without fighting with a big, hierarchaial menu
# It doesn’t require any huge dependencies (I use XFCE, so I don’t want something that requires Gnome or KDE libraries)

Unfortunately, the documentation is non-existant. So when I wanted to be able to configure Synapse to execute a custom command when I typed a custom keyword, it took me a while to figure it out.

This post explains how to define custom commands in Synapse to execute custom commands in your terminal. For example, I’ll show how to make “Google Drive” open a firefox window to https://drive.google.com

In XFCE, Synapse automatically searches your filesystem using zeitgeist. In order to configure Synapse to open a terminal with a custom command upon entering a custom keyword in Synapse on XFCE, you can simply create a .desktop file somewhere in ~/.local/share/applications

For example, consider the following file ~/.local/share/applications/googleDrive.desktop:

[Desktop Entry]
Categories=
Comment=
Comment[en]=
Encoding=UTF-8
Exec="/usr/bin/firefox https://drive.google.com"
GenericName=
GenericName[en]=
Icon=/home/guttersnipe/.local/share/applications/custom/icons/drive.png
MimeType=
Name=Google Drive
#Name[en]=
Path=
ServiceTypes=
SwallowExec=
SwallowTitle=
Terminal=true
TerminalOptions=
Type=Application
URL=

To make it pretty, I also created a directory (~/.local/share/applications/custom/icons/), where I downloaded drive.png.

Edit: I’ve decided to aggrigate all my custom Synapse .desktop files and icons onto my github, which can be viewed here.

To add my custom config to your machine, run the following commands:


mkdir -p ~/.local/share/applications
cd ~/.local/share/applications
git clone git://github.com/guttersnipe098/synapse.git custom

Related Posts

4 comments to Custom Synapse Shortcuts

  • This looks like it could be a potent time saver, and just generally convenient. I think I’ll give this a try when I’m running on the ‘nix side of my lappy.

  • Bookmarked your site. Took me about two hours to find your post but your the first one documenting this.

    Thank you!

  • Bassie

    This is what I was looking for, for days, BUT
    It doesn’t work on Arch linux with XFCE.

    I got the following error message when starting Synapse
    “Unable to create AppInfo for ”
    This occurs for all desktop files (I pulled your github files).

    Any idea how to solve this?

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>