~ dgfitch /.screenrc

# screenrc of stupid madness
#
# TODO:
# Quick functions for executing screen -X commands to other windows
# Bindings for running select on various window names quickly

# Unicode stuff
setenv LC_CTYPE en_US.UTF-8
defutf8 on

# Various visual options
autodetach on
nethack on
altscreen on
vbell off
vbell_msg "HOORAY!!"
deflogin off
startup_message off
defscrollback 0
msgwait 2
multiuser off
bufferfile $HOME/.screen_buffer

attrcolor b ".I"
sorendition =b Kd # bold on gray for messages and hilighting
defbce "on"

# Screen window number and info in ui terminal titles
#
# This spews out %w so that hardstatus displays everything inside the 
# screen session, which seems like overkill BUT gets me transparency if x 
# programs (like ratpoison scripts) want to subselect based on window title
termcapinfo xterm*|rxvt* 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'
defhstatus ">0` w"
hardstatus off

#backtick 0 60 60 screentitle

caption always "%{= Kw}%-w%{+b}%{+b y}%n%{-} %t%{-}%+w %= %{+b C}%`0%{-}"

shell zsh
shelltitle "..."


# KEY BINDING STUFF

# Make <C-\> the screen escape to get it out of the way, then hotkeys on 
# the OS level can map Caps+key to various screen sequences
escape ^\\

# Kill some default keybindings
bind .
bind k
bind ^k
bind ^h
bind s
bind q
bind ^S
bind ^Q

# Now for my keys yay
bind z screen -t zsh -ln

# URL view of screen dump
bind u eval "hardcopy .screen_hardcopy" "screen urlview .screen_hardcopy" 
bind i eval "hardcopy .screen_buffer" "readbuf" 

# Copy current cursor line to register
bind y eval "copy" "stuff Y" "writebuf"

# Buffer manipulation
bind > writebuf
bind < readbuf
bind c copy
bind x stuff .
bind v paste .

bind p prev
bind n next
bind h prev
bind l next
bind a other
bind ' ' other
bind w windowlist
bind j focus up
bind k focus down

bind s split
bind r remove
bind q remove

bind m monitor
bind M silence

bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max

bind ; process .
bind \" digraph