Announcement

Collapse
No announcement yet.

"Search with Google" context menu item for Konsole

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "Search with Google" context menu item for Konsole

    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?


    #2
    Re: "Search with Google" context menu item for Konsole

    Hi,

    Klipper does it for you. Try search "klipper" in your Adept then install it, you gonna live it

    Comment


      #3
      Re: "Search with Google" context menu item for Konsole

      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?

      Comment


        #4
        Re: "Search with Google" context menu item for Konsole

        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!
        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

        Comment


          #5
          Re: "Search with Google" context menu item for Konsole

          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:

          Code:
          ps x |grep -q '[f]irefox' && firefox -url "[url]http://www.google.com/search?q=%s"[/url] || 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.

          Comment


            #6
            Re: "Search with Google" context menu item for Konsole

            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!
            Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

            Comment


              #7
              Re: "Search with Google" context menu item for Konsole

              8)

              Thanks Wasabuu! I'll have to try that tonight!

              Comment

              Working...
              X