[three]Bean
fpaste to and from clipboard by hotkey in xmonad
Apr 07, 2011 | categories: gtd View CommentsI find that in irc, I'm often selecting some code from vim or some shell output with my mouse, jumping to a browser, loading fpaste.org, pasting the content, clicking submit, selecting the link/copying it, switching back to IRC and finally pasting the link.
Jeez. That's mouse->keyboard->keyboard->mouse->mouse->mouse->keyboard->mouse.
If you have the fpaste cli tool installed (on Fedora) you can do what I did and bind a handy keystroke right next to your bitlyclip binding in your ~/.xmonad/xmonad.hs (or whatever window manager config of your choice).
,("C-b", spawn "/usr/bin/bitlyclip") ,("C-M-z", spawn "notify-send 'fpasteclip' $(fpaste -i -o)") ,("C-M-a", spawn "notify-send 'fpasteclip with python syntax highlighting' $(fpaste -l python -i -o)")
Now with ctrl+alt+z, whatever was in your clipboard has been dumped into fpaste and your clipboard now contains the needed link in one go!