Compare commits

...

7 Commits

Author SHA1 Message Date
Peter J. Holzer 6951e5b579 Merge branch 'master' into wsr 2020-03-17 15:53:03 +01:00
Peter J. Holzer 0fdf383857 Set highlight color for darkbg 2020-03-15 13:06:47 +01:00
Peter J. Holzer e571e6068d Merge branch 'master' of github.com:hjp/dot 2020-03-14 18:25:55 +01:00
Peter J. Holzer 4717013939 Remove xterm+256color again but check /lib/terminfo
The terminal defintions with a + are just building blocks, not full
definitions. We can't use them.

OTOH, the definitions in /lib/terminfo seem to work fine in current
Debian and Ubuntu versions (which is what I care about these days), so
we accept them.
2020-02-28 10:49:11 +01:00
Peter J. Holzer 43ba5d2b5c Improve detection of xterm-256color and remove xterm+256color again 2019-12-31 12:10:05 +01:00
Peter J. Holzer be8eb03364 Accept xterm+256colors as an xterm variant 2019-12-31 11:51:20 +01:00
Peter J. Holzer 9a1b52eee2 Assume xterm has 256 colors 2019-12-27 20:08:53 +01:00
2 changed files with 17 additions and 2 deletions

View File

@ -23,11 +23,26 @@ then
stty erase 
fi
if [[ $TERM == xterm-256color && ! -f /usr/share/terminfo/x/xterm-256color ]]
if [[ $TERM == xterm-256color && ! -f /usr/share/terminfo/x/xterm-256color && ! -f /lib/terminfo/x/xterm-256color ]]
then
TERM=xterm
fi
if [[ $TERM == xterm ]]
then
for t in xterm-256color
do
for dir in /usr/share/terminfo/x /lib/terminfo/x
do
if [[ -f $dir/$t ]]
then
TERM=$t
break 2
fi
done
done
fi
case "$TERM" in
xterm*|screen)
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)

2
.zshrc
View File

@ -27,7 +27,7 @@ if ack=`whence ack-grep`
then
alias ack=$ack
fi
alias darkbg='xtermcontrol --bg "#000" --fg "#FFF"; export BG=dark'
alias darkbg='xtermcontrol --bg "#000" --fg "#FFF --highlight="#00F""; export BG=dark'
alias lightbg='xtermcontrol --bg "#EEE" --fg "#000" --highlight="#0FF"; export BG=light'
alias defaultbg='. ~/.zxtermcolors'
alias ag='ag --color-path "34;47"'