Search code examples
searchgnu-screencopy-mode

Unable to start Google in Firefox from terminal to search Screen's clipboard


Problem: to have a keyboard shortcut to google a current selection in Screen's copy mode from terminal to Firefox

You can copy the sentence to Screen's clipboard in copy-mode by pressing enter. However, I want to be able to press g to put the Screen's clipboard to the command below as the first parameter:

#!/bin/sh
q=$1
open "http://www.google.com/search?q=$q"

I do the same at the moment by

  1. C-a Esc [select the area] enter
  2. C-z [to put the current window out of the way]
  3. google C-a ]

How can you put Screen's clipboard to the command?


Solution

  • Here's a description of how someone modified their .screenrc file to sync it with the X clipboard. You might try modifying it to send the selected text to Firefox instead of xsel.