View Full Version : "Search with Google" context menu item for Konsole
Nos4ah2
Oct 14th 2008, 09:08 PM
I'd love a way to be able to right click on a selected bit of text in Konsole and have a context menu item that would open my default browser and search Google.
I've been trying to figure out how to do this myself, but I'm also trying to get 100 other things working the way I want. Anyone have a quick and easy way to go about this?
wasabuu
Oct 14th 2008, 09:36 PM
Hi,
Klipper does it for you. Try search "klipper" in your Adept then install it, you gonna live it :)
Nos4ah2
Oct 14th 2008, 09:50 PM
I've got Klipper installed and running, but I don't see any options like the one I mentioned. Is this a custom option you created in Klipper? Or am I just missing something?
toad
Oct 14th 2008, 10:02 PM
Well, the way I do it is to select the required text in yakuake (or konsole or kate or whatever) - no copying required - alt-tab over to firefox with an empty google session waiting for me (if not, a simple mouse gesture will suffice to open one) and middle click. Bingo, the text is copied over.
Not quite what you wanted, but pretty quick I find. If you/anybody has a quicker way please tell!
wasabuu
Oct 14th 2008, 11:50 PM
I'm not sure if it's clean and proper, I use Klipper to do that. Sorry for possible different or wrong menus in English since I run Kubuntu in Japanese, but you can "guess" what menu item in English I believe.
Right click on Klipper -> Configure (or Settings?) -> Action Tab -> Add Action
Add new action with the regular expression just '.' that matches "anything." Then,
add right click on the newly added action '.' to add command for it.
On my side, the command is:
ps x |grep -q '[f]irefox' && firefox -url "http://www.google.com/search?q=%s" || firefox %s
The meaning is, to try find if firefox is already running, if it is, hit the Google and do search with the keyword (= copied text), or launch firefox.
You can set the "menu item" text which appears in Klipper's popup menu shows up when you copy something on the right, I set it to "Google Firefox"
I copied the line from Klipper's builtin actions. Someone may correct this to make it more effective or proper, I guess the line for when firefox isn't running yet should be something another with the command launches firefox with Google (and the keyword). (perhaps "|| firefox http://www.google.com/search?q=%s")
Now I seldom run firefox on my side, I usually use Opera these days.
toad
Oct 15th 2008, 08:36 AM
Cool stuff, wasabu!
I've always wanted to know more about klipper but could never be bothered to find out. Time for me to look through the handbook!
Nos4ah2
Oct 16th 2008, 12:20 AM
8)
Thanks Wasabuu! I'll have to try that tonight!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.