Create shortcut to terminal command on Manjaro 21.0 Deepin

linuxmanjaroshortcutsterminal

I want to have easier access to the terminal command espanso stop (for some reason it's forgettable to me). How do I make it into a desktop shortcut? I'm running Manjaro Linux 21.0 with the Deepin desktop environment.

Best Answer

If you don't mind using the terminal, you can create an alias by adding the following line to ~/.bashrc and restart the terminal session:

alias es='espanso stop'

Now, you only need to type es.

If you really want to have a desktop shortcut, you can create a script on desktop, let's say named stop-espanso.sh, with content:

#! /bin/sh
espanso stop

And you need to make the script file executable with the following command:

chmod +x stop-espanso.sh

Now you can double-click to the script file.

Related Question