11-30-2014, 08:22 PM
(11-30-2014, 02:29 PM)mlsmith link Wrote: What's nice about it is that it doubles as an application launcher using just the keyboard. In addition, you could set up more search actions in the Whisker properties. One example could be to search the forums using the following command:
Code:firefox -new-tab https://duckduckgo.com/?q="site:https://linuxliteos.com/forums %u"
I set that Search Action to !ll (lowercase L's for Linux Lite). So now when I press Super key the menu pops up and I begin typing !ll and then my search query. Firefox pops up (or a new tab if already open) and searches only the LL forums using DDG. This makes finding what I'm looking for a breeze.
This gave me an idea.

It would be nice to add a keyboard shortcut that is going to run this script.
It will open a dialog and then you enter a search term.
If you click on Cancel or if you don't enter anything and click OK it stops.
Code:
#!/bin/bash
ENTRY=$(zenity --entry --text "Search DuckDuckGo" --title="Search")
if [[ "${PIPESTATUS[0]}" -ne "0" || -z $(echo $ENTRY) ]]; then
exit 0
fi
sh -c 'firefox -new-tab https://duckduckgo.com/?q='"$(echo -n $ENTRY)"''