You are not logged in.
Is it possible for a Search Actions* command to open two web pages simultaneously with a single search term?
Let's say I want to know the definition of a word, and would like to search three separate online dictionaries at the same time.
* Whisker Menu→Properties.
What does not work:
→Command:
exo-open https://www.dictionary.com/browse/%u https://www.merriam-webster.com/dictionary/%u
This opens the first page with the search term correctly, but the second page searches for “%u”.
→Combing multiple commands with “&&” doesn't work either because the Search Action command cannot seem to handle multiple instances of “%u”.
Anyone who has figured this out?
Last edited by CynicusRex (2022-03-28 05:18:54)
♔ cynicusrex.com: a sentient stack of stardust pondering nothing and everything.
Offline
There is xfce4-dict. It can display information from multiple sources in a single window.
Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please!
Offline
There is xfce4-dict. It can display information from multiple sources in a single window.
A dictionary was just an example, it needs to work for any website.
Last edited by CynicusRex (2022-03-27 13:27:47)
♔ cynicusrex.com: a sentient stack of stardust pondering nothing and everything.
Offline
The built-in interpreter is not a complete shell. Try running the command within a bash command string:
bash -c "exo-open https://www.dictionary.com/browse/%u && exo-open https://www.merriam-webster.com/dictionary/%u"
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
The built-in interpreter is not a complete shell. Try running the command within a bash command string:
bash -c "exo-open https://www.dictionary.com/browse/%u && exo-open https://www.merriam-webster.com/dictionary/%u"
☑ Problem solved. Thank you, ToZ.
For posterity, this works as well*:
bash -c "exo-open https://www.dictionary.com/browse/%u https://www.merriam-webster.com/dictionary/%u"
* When working with long URLs, using “&&” works best, because otherwise not all web pages are opened if the character limit is exceeded.
Last edited by CynicusRex (2022-03-27 17:33:34)
♔ cynicusrex.com: a sentient stack of stardust pondering nothing and everything.
Offline
* When working with long URLs, using “&&” works best, because otherwise not all web pages are opened if the character limit is exceeded.
In that case, you can create a script to do the work. For the custom action, pass %u:
/path/to/script %u
...and from within the script, "%u" will be accessible as "$1" (first parameter).
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
CynicusRex wrote:* When working with long URLs, using “&&” works best, because otherwise not all web pages are opened if the character limit is exceeded.
In that case, you can create a script to do the work. For the custom action, pass %u:
/path/to/script %u
...and from within the script, "%u" will be accessible as "$1" (first parameter).
Oh wow, awesome!
---
Again, for posterity's sake, a short tutorial:
Create a file named search-dictionaries.sh.
Write into that file:
#! /bin/bash
exo-open --launch WebBrowser "https://dictionary.reverso.net/english-dutch/$1"
exo-open --launch WebBrowser "https://www.dictionary.com/browse/$1"
exo-open --launch WebBrowser "https://www.thesaurus.com/browse/$1"
exo-open --launch WebBrowser "https://www.merriam-webster.com/dictionary/$1"
The quotes ("") are optional around short URLs, but mandatory for extremely long URLs such as:
exo-open --launch WebBrowser "https://start.duckduckgo.com/?q=$1&kae=t&kad=en_US&kc=-1&k1=-1&ex=ample&kam=google-maps&example=-1&anotherexample=-1&kaq=-1&kap=-1&somevariable=-1&ie=-1&k5=1&kt=a&kaa=7b518b&k8=herp&k9=derp"
Make sure to make the file executable by right-clicking it → Permissions → Program: ☑ Allow this file to run as a program.
Or by running:
sudo chmod +x search-dictionaries.sh
Lastly, right-click the Whisker Menu → Properties → Search Actions → enter into the command part of the specific Search Action:
/path/to/scripts/search-dictionaries.sh %u
Last edited by CynicusRex (2022-03-27 22:16:17)
♔ cynicusrex.com: a sentient stack of stardust pondering nothing and everything.
Offline
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 565.7 KiB (Peak: 582.98 KiB) ]