Changing the cursor color within tmux based on vi mode

As outlined on SE and SU you can execute actions in zsh when you change between normal and insert mode in a vi mode zsh session. For changing the cursor color see the snippet below. # use cursor as indicator of vi mode zle-keymap-select () { if [ $KEYMAP = vicmd ]; then if [[ $TMUX = '' ]]; then echo -ne "\033]12;Red\007" else printf '\033Ptmux;\033\033]12;red\007\033\\' fi else if [[ $TMUX = '' ]]; then echo -ne "\033]12;Grey\007" else printf '\033Ptmux;\033\033]12;grey\007\033\\' fi fi } zle-line-init () { zle -K viins echo -ne "\033]12;Grey\007" } zle -N zle-keymap-select zle -N zle-line-init Put it somewhere in your zshrc and your cursor should switch to red when you enter normal mode and become grey again when you leave it.

Read the rest of this entry »

open urxvt here and open in vim applescript

Update: noticed a little bug in the script, the right way to do it should be this: set disp_no to do shell script "disp_no=($( ps -awx | grep -F 'bin/X' | awk '{print $(NF-2)}' | grep -e \":[0-9]\" )); if [[ -n $disp_no ]];then DISPLAY=${disp_no}.0; else DISPLAY=:0.0; fi;echo $DISPLAY" if you have tcp forward off, maybe without \$NF if it’s enabled but anyway grep -F X11.app won’t work with newer X versions

Read the rest of this entry »

A prettier Terminal in OS-X Part 3 (urxvt and screen)

I was a bit annoyed of having to set TERM=xterm-256color. A more or less proper solution can be found on the rxvt-unicode ml from John Eikenberry. cd ~ infocmp -L rxvt-unicode > rxvt-unicode.terminfo sed -i '' 's/#256/#32767/' rxvt-unicode.terminfo sed -i '' 's/#88/#256/' rxvt-unicode.terminfo if [ ! -e .terminfo ]; then mkdir .terminfo fi tic -o .terminfo/ rxvt-unicode.terminfo rm rxvt-unicode.terminfo I’ve also largely assimilated Bart’s configs. You can find them and the screenrc here .

Read the rest of this entry »

A prettier Terminal in OS-X Part 2 (urxvt and more awesomeness)

Update: thanks to Sung Pae you don’t need to rename perl, you can just set the environment variable: PERL=/usr/bin/perl ./configure --foo --bar ... Update2: you also no longer need the system perl at all along with the double free patch. since my own macosx-clipboard got released with urxvt 9.07 see the changelog here it does depend on Mac-Pasteboard though. Last time I explained a bit on how to get awesome going.

Read the rest of this entry »

 Scroll to top