#!/bin/sh
TXT="/tmp/speak.txt"
xsel > /tmp/speak.txt | trans -sp -n US,f -no-translate -e google -i /tmp/speak.txt
it is located:
/home/user_name/speak
I gave it run execute privileges.
I want to run the above script from global shortcut (Ctrl+Shift+L). I went to settings → shortcuts → own shortcuts → new → global → command or url.
I chose Ctrl+Shift+L and as action: /home/user_name/./speak
Although /home/user_name/./speak works in terminal, the shortcut from for example web browser doesn’t work.
Maybe it is a bug? How can I add this shortcut directly to kglobalshortcutsrc?
Is it possible to configure clipboard to run command line action? How to do it?
I’m not sure if it will let me post a link to my github, but I will try. Ignore what the little script does. I only did it to prove a proof of concept to myself. Just look at HOW it does what it does. I am just a newbie at scripting, so this was a learning experience for me.