Install the xsel
will work too), to allow you scripting access the visual selection. Then just set up a hotkey (using the binding feature your desktop offers, or xbindkeys
) to run a simple script like this:
echo >> "$1"
xsel >> "$1"
The first and only argument for the script will be the name of the file you want to use, so the command for your hotkey will be: