terminals: Tweak xterm, remove TERM setting

master
Pierre Neidhardt 2017-01-11 13:08:07 +01:00
parent ca15e05034
commit d29ec42312
3 changed files with 24 additions and 26 deletions

View File

@ -84,13 +84,27 @@ URxvt.color15 : white
!!==============================================================================
!! Xterm
xterm*termName: xterm-256color
xterm*locale: true
! XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
! xterm.font: xft:Dina:pixelsize=18
! xterm*font : -*-dejavu sans-medium-r-*-*-14-*-*-*-*-*-*-*
xterm*faceName:DejaVu Sans Mono:pixelsize=14
!! Make Meta-* bindings work.
*VT100.eightBitInput: false
xterm*eightBitInput: false
!! Fix the backspace key
xterm*backarrowKey: false
xterm*ttyModes: erase ^?
xterm*saveLines: 4096
xterm*selectToClipboard: true
xterm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
xterm*on3Clicks: regex ([[:alpha:]]+://)?([[:alnum:]!#+,./=?@_~-]|(%[[:xdigit:]][[:xdigit:]]))+
xterm*background: black
xterm*foreground: white
@ -110,4 +124,3 @@ xterm*color12 : #1e90ff
xterm*color13 : magenta
xterm*color14 : cyan
xterm*color15 : white

21
.bashrc
View File

@ -4,27 +4,6 @@
## Shell-independant code: everything we set here must be exported before we run
## our favorite shell.
## Terminal
## WARNING: This is often a bad idea!
## FreeBSD urxvt $TERM variable is not set properly for some reasons.
# if [ ! "$(uname -o)" = "GNU/Linux" ]; then
# case "$TERM" in
# *rxvt*) export TERM="rxvt-unicode-256color";;
# esac
# fi
## Most xterm-based terminals support 256 colors, so let's turn this on.
# if [ "$TERM" = "xterm" ]; then
# export TERM="xterm-256color"
# fi
## Title: If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
# ;;
#*)
# ;;
#esac
## Enable color support of ls.
if [ "$TERM" != "dumb" ]; then
if [ "$OSTYPE" = "linux-gnu" ]; then

View File

@ -6,13 +6,19 @@ for i in qutebrowser dwb luakit chromium google-chrome; do
command -v $i >/dev/null 2>&1 && export BROWSER=$i && break
done
## X resources for URxvt et al.
[ -f "$HOME/.Xresources" ] && xrdb -merge "$HOME/.Xresources"
## X resources for xterm, rxvt et al.
# [ -f "$HOME/.Xresources" ] && xrdb -merge "$HOME/.Xresources"
## Dynamic values. We could have defined the value from a variable in
## .Xresources which we would have set with the preprocessor. But the login
## manager may merge after sourcing this file without setting the preprocessor
## variable, thus overwriting the value with the variable name.
echo "URxvt.url-select.launcher: $BROWSER" | xrdb -merge
cat <<EOF | xrdb -merge
URxvt.url-select.launcher: $BROWSER
*VT100*translations: #override Ctrl Meta <KeyPress> U: exec-formatted("$BROWSER '%t'", CLIPBOARD) \n\
Shift <KeyPress> Up:scroll-back(1,line,m) \n\
Shift <KeyPress> Down:scroll-forw(1,line,m)
EOF
## Load custom keymap and configure input devices.
xkbcomp -I"$HOME/.xkb" "$HOME/.xkb/usim.xkb" $DISPLAY