Select a word and use a shortcut key to notify the meaning in Farsi. Using translate-shell.
- xbindkeys
- xsel
- curl
- notify-send (for install it on ubuntu $ apt install notify-osd)
- gawk
After installing xbindkeys create a .xbindkeysrc file
xbindkeys --defaults > ~/.xbindkeysrc
append these lines to ~/.xbindkeysrc
"bash pathTofiles/seltr"
m:0x15 + c:52
Control+Shift+Mod2+z
for example in my case:
"~/autotranslate/seltr"
m:0x15 + c:52
Control+Shift+Mod2+z
to apply changes enter following commands:
killall -s1 xbindkeys
xbindkeys -f ~/.xbindkeysrc
- Select the word.
- Use shortcut Ctrl + Shift + z.