first install these tools
Code:
sudo apt-get install xdotool xsel
predefined text can be pasted like this:
text typed explicitly
Code:
echo "text to paste" | xsel -pi; xdotool click 2
text from file
Code:
xsel -pi < text_to_paste.txt; xdotool click 2
xsel puts the text in (-i) the primary buffer (-p), which then gets pasted with middle click, emulated by xdotool.
create a key combo enter the code below
Code:
sh -c 'echo "some text to paste" | xsel -pi; xdotool click 2'
or
Code:
sh -c 'xsel -pi < text_to_paste.txt; xdotool click 2'
hotkeys don't like multiple commands so sh -c wraps everything up and acts as 1 cmd.
Bookmarks