Hemanth's Scribes

cli

One click DuckDuckGo

Author Photo

Hemanth HM

Thumbnail

Check out the ONE CLICK DDG DEMO

Search any text that is selected anywhere in the OS with DuckDuckGo in a single click is really fun!

Yes you read it right, may the text be in a document, webpage, terminal - anywhere you can imagine and select - can be searched with DuckDuckGo with a single click, using a simple one liner and some easy GUI tricks as in the video.

Dependency: xclip - command line interface to X selections (clipboard)

sudo apt-get install xclip

The code:

xdg-open opens a file or URL in the user’s preferred application and in this case it’s fetching the selected data from xclip and opening a browser that takes the help of DuckDuckGo to search.

xdg-open https://www.duckduckgo.com/?q="$(xclip -o)"

Trying to make a right click context menu from Gnome-Terminal - people who are interested can ping me!

#linux#bash
Author Photo

About Hemanth HM

Hemanth HM is a Sr. Machine Learning Manager at PayPal, Google Developer Expert, TC39 delegate, FOSS advocate, and community leader with a passion for programming, AI, and open-source contributions.