Wednesday, August 25, 2010

Copy Screen buffer in X Windows

Add the below line in .screenrc file and restart screen. xsel should be installed. Go to copy mode(Ctrl-o-[), select the text ( space, select, space ) and press "Ctrl-o-b"

bind b eval writebuf 'exec /bin/sh -c "xsel -i -b < /tmp/screen-exchange"' 'exec /bin/sh -c "killall xsel"'

Now you can paste the copied buffer from screen in any editor.

Note: For Mac writebuf should be pbcopy
Default screen options are Ctrl-a-. If you use the attached file, it will be Ctrl-o-

autodetach on # Autodetach conference on hangup instead of [.]
escape ^Oo
shelltitle "$ |bash"
vbell off
screen -t rcs 1
startup_message off
defscrollback 5000
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "
bind b eval writebuf 'exec /bin/sh -c "xsel -i -b < /tmp/screen-exchange"' 'exec /bin/sh -c "killall xsel"'

Sunday, August 15, 2010

Use skype via Pidgin

Use the Pidgin plugin by Eion Robb via Lifehacker

For exporting the Skype chat history, you can try SkypeChatExtractor

Monday, August 2, 2010

Easier Python source code navigation in vim

Download the Python.vim script

Copy the script to the correct dir.
mkdir ~/.vim
mkdir ~/.vim/ftplugin
mv python.vim ~/.vim/ftplugin/

Add the below lines in ~/.vimrc file
filetype plugin on
syntax on

Use "[[" to go to beginning of block(class/function), "]]" to go to end of block. See the script for more info.