Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
Created May 29, 2011 19:59
Show Gist options
  • Save terrancesnyder/998088 to your computer and use it in GitHub Desktop.
Save terrancesnyder/998088 to your computer and use it in GitHub Desktop.
Linux Screen Configuration
# to be consistent with ubuntu screen settings
# F1 | 'help' in gnome-terminal
register n "^a^c^aA" # | Goes with the F2 definition
bindkey -k k2 process n # F2 | Create new window (and name it)
bindkey -k k3 title # F3 | Previous Window
bindkey -k k4 kill # F4 | Next Window
register r "^a:source $HOME/.screen-profiles/profile" # | Goes with F5 definition
bindkey -k k5 process r # F5 | Reload profile
bindkey -k k6 detach # F6 | Detach from this session
bindkey -k k7 copy # F7 | Enter copy/scrollback mode
bindkey -k k8 help # F8 | Advanced help/keybindings
bindkey -k k9 screen -t help 0 screen-profiles # F9 | Configuration
# F10 | 'toolbar' in gnome-terminal
# F11 | 'fullscreen' in gnome-terminal
bindkey -k F1 prev # F11 | Previous Screen
bindkey -k F2 next # F12 | Next Screen
# Turn off start message:
startup_message off
# Set messages timeout to one second:
msgwait 1
# remove annoying audible bell, please
defscrollback 2500
activity "Activity in %n (%t) [%w:%s]~"
bell_msg "Trouble in %n!"
vbell on
vbell_msg "Beep Beep ..."
# detach on hangup
autodetach on
pow_detach_msg "BYE"
#
hardstatus alwayslastline
hardstatus on
hardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%<"
# tell screen that xterm can switch to dark background and has function keys.
termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'
termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'
# - uses background color for delete operations
termcapinfo xterm* be
termcapinfo linux "ve=\E[?25h\E[?17;0;64c"
#remove some stupid / dangerous key bindings
bind k
bind ^k
bind .
bind ^\
bind \\
bind ^h
bind h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment