I don't think it's possible to add a menu item without editing the source and recompiling the program on your own. But there are other ways to do what you want.
First, and easiest, you can use the 'actions' function of klipper (I'm assuming you're using kde since you're using konsole). These are context-dependent functions that use regular expressions to detect when certain text patterns are copied and perform actions with them. It can be set so that whenever you copy a link starting with 'http://', it will pop up a list of programs you can send it to, including konqueror and firefox. In fact, this one should even already be set up for you as one of the defaults, you just have to enable it. If you also disable the "ignore selection" option then it will pop up automatically as soon as you highlight the text, but I find that rather annoying as that tends to fill up the klipper buffer very quickly, as klipper then remembers everything you highlight, not just copy. Otherwise you'll actually have to copy the text to the clipboard before it will activate.
Second, you might be able to set up an input action in the kde control center>regional & accessibility tab, so that you can open the current selection with a hotkey or mouse gesture. It shouldn't be too hard to write a short script using xclip (a nice little program for accessing the selection buffer) to grab the current selection and send it to your browser via the command line. Then you can set the input action to run that script. You could even use regex matching to make it context sensitive just like with klipper.
Best of all, either of these would allow you to use the action in any program, not just konsole.
|