mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-05 16:48:38 +00:00
cleanup zshrc, add support for screen
This commit is contained in:
parent
3226d4f06b
commit
383fcaa867
2 changed files with 86 additions and 10 deletions
64
screenrc
Normal file
64
screenrc
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
# Originally by Deason
|
||||||
|
# Modified by Majnematic
|
||||||
|
|
||||||
|
# turn on visual bell
|
||||||
|
vbell on
|
||||||
|
|
||||||
|
# default scrollback to 5000 lines
|
||||||
|
defscrollback 5000
|
||||||
|
|
||||||
|
# turn off visual bell
|
||||||
|
termcapinfo * vb@
|
||||||
|
|
||||||
|
# see, it's a bell, get it?
|
||||||
|
vbell_msg "Ring Ring Ring Ring Ring Ring"
|
||||||
|
|
||||||
|
# make screen even more fun
|
||||||
|
nethack on
|
||||||
|
|
||||||
|
# mess with bold
|
||||||
|
attrcolor b ".I"
|
||||||
|
|
||||||
|
# get screen to go for 256 colors
|
||||||
|
termcapinfo xterm-256color 'Co#256'
|
||||||
|
|
||||||
|
# erase background with current bg color
|
||||||
|
defbce on
|
||||||
|
|
||||||
|
# turn on utf8
|
||||||
|
defutf8 on
|
||||||
|
|
||||||
|
# set the term to 256 color, maybe
|
||||||
|
term "screen${SCREEN_COLOR}-bce"
|
||||||
|
|
||||||
|
# changes from the default binding " to `windowlist -b', so we don't create
|
||||||
|
# a new empty window
|
||||||
|
bind \" windowlist
|
||||||
|
|
||||||
|
# includes window title name in activity/bell messages
|
||||||
|
activity "Activity in window %n (%t)"
|
||||||
|
bell_msg "Bell in window %n (%t)"
|
||||||
|
|
||||||
|
# Argh, choosing a hardstatus line is difficult
|
||||||
|
# This can only be explained by example, but it takes too much damn space.
|
||||||
|
# The screen man page is actually good documentation for this, but it takes
|
||||||
|
# a little while to read. Look for "STRING ESCAPES', and that section will
|
||||||
|
# explain what all this line noise means.
|
||||||
|
#
|
||||||
|
# White background, black text, underlined bold current window
|
||||||
|
#hardstatus alwayslastline "%{= Wk}%-w%50>%{=ub dd}%n %t%?(%u)%?%{-}%+w%<"
|
||||||
|
# Normal text, underlined bold current window
|
||||||
|
#hardstatus alwayslastline "%{= dd}%-w%50>%{=ub}%n %t%?(%u)%?%{-}%+w%<"
|
||||||
|
# Blue background, white text, underlined bold current window
|
||||||
|
hardstatus alwayslastline "%{= bw}%-w%50>%{=ub dd}%n %t%?(%u)%?%{-}%+w%<"
|
||||||
|
|
||||||
|
startup_message off
|
||||||
|
|
||||||
|
# Show the screen version just for a second
|
||||||
|
msgwait 1
|
||||||
|
version
|
||||||
|
|
||||||
|
# how many seconds a message appears when we don't press any keys
|
||||||
|
msgwait 2
|
||||||
|
|
||||||
|
altscreen on
|
32
zshrc
32
zshrc
|
@ -89,8 +89,21 @@ function fix_term
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# sorta hacky, but I cannot find a better way to do this :/
|
||||||
|
function fix_terminfo_db
|
||||||
|
{
|
||||||
|
if [[ `which infocmp` = "$1/bin/infocmp" ]] ; then
|
||||||
|
export TERMINFO="$1/share/terminfo"
|
||||||
|
export TERM=$TERM
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
export TERM=$(fix_term $TERM)
|
export TERM=$(fix_term $TERM)
|
||||||
|
|
||||||
|
if [[ $TERM == *256* ]] ; then
|
||||||
|
export SCREEN_COLOR="-256color"
|
||||||
|
fi
|
||||||
|
|
||||||
( which lesspipe &> /dev/null ) && eval $(lesspipe)
|
( which lesspipe &> /dev/null ) && eval $(lesspipe)
|
||||||
export LESS=' -R'
|
export LESS=' -R'
|
||||||
|
|
||||||
|
@ -117,11 +130,7 @@ case `uname -s` in
|
||||||
Interix)
|
Interix)
|
||||||
alias ls="ls --color"
|
alias ls="ls --color"
|
||||||
|
|
||||||
# sorta hacky, but I cannot find a better way to do this :/
|
fix_terminfo_db "/usr/local"
|
||||||
if [[ `which infocmp` = /usr/local/bin/infocmp ]] ; then
|
|
||||||
export TERMINFO=/usr/local/share/terminfo
|
|
||||||
export TERM=$TERM
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
SunOS)
|
SunOS)
|
||||||
if (which gls &> /dev/null) ; then
|
if (which gls &> /dev/null) ; then
|
||||||
|
@ -140,11 +149,7 @@ case `uname -s` in
|
||||||
alias locate='glocate'
|
alias locate='glocate'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sorta hacky, but I cannot find a better way to do this :/
|
fix_terminfo_db "/opt/csw"
|
||||||
if [[ `which infocmp` = /opt/csw/bin/infocmp ]] ; then
|
|
||||||
export TERMINFO=/opt/csw/share/terminfo
|
|
||||||
export TERM=$TERM
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -197,6 +202,13 @@ case $TERM in
|
||||||
bindkey '\e[c' emacs-forward-word
|
bindkey '\e[c' emacs-forward-word
|
||||||
bindkey '\e[d' emacs-backward-word
|
bindkey '\e[d' emacs-backward-word
|
||||||
;;
|
;;
|
||||||
|
screen*)
|
||||||
|
bindkey '\e[1~' beginning-of-line
|
||||||
|
bindkey '\e[4~' end-of-line
|
||||||
|
bindkey '\e[1;5C' emacs-forward-word
|
||||||
|
bindkey '\e[1;5D' emacs-backward-word
|
||||||
|
bindkey '\e[3~' delete-char
|
||||||
|
;;
|
||||||
linux)
|
linux)
|
||||||
bindkey '\e[1~' beginning-of-line
|
bindkey '\e[1~' beginning-of-line
|
||||||
bindkey '\e[4~' end-of-line
|
bindkey '\e[4~' end-of-line
|
||||||
|
|
Loading…
Add table
Reference in a new issue