Overview
NOTE: This article was written for Arch Linux but can be applied to other Distros with some different approachs.
Xterm configuration
Config file location
Xterm is configured though X resources file
~/.Xresources , this file may not exist by default, you can manually create it with any text editor.Loading config file
Most Display manager will load
~/.Xresources file on login, if you use startx , you will need to add the line:xrdb ~/.Xresourcesto your
If you want your changes to take effect, you need to restart X Server or reload X Resources file manually.
xinitrc file.If you want your changes to take effect, you need to restart X Server or reload X Resources file manually.
Reverse color
Add this line to your X resources file to enable black background:
XTerm*reverseVideo: onEnable UTF-8
Xterm with UTF-8 can be access via
uxterm command, but you can configure xterm to accept UTF-8 characters. First make sure that your locale settings are correct for UTF-8. Sample UTF-8 locale configuration:
Uncomment the line in
/etc/locale.gen : ...
#en_SG ISO-8859-1
en_US.UTF-8 UTF-8
#en_US ISO-8859-1
...
Generate locales as root:
$ locale-genEdit
/etc/locale.conf:LANG=en_US.UTF-8After configured locales, add this line to your X resources file to enable UTF-8:
XTerm*locale: trueFix 'alt' key
If you use the 'alt' key for your shortcut, add this line to X resources file:
XTerm*metaSendsEscape: trueDisable bold fonts
Bold characters are sometimes hard to read on small font. Disable it:
XTerm*allowBoldFonts: falseChange title of terminal
This is a small bash script to change title of terminal:
/usr/bin/title#!/usr/bin/bash
xwit -id $WINDOWID -name "$1"
Usage example:
$ title "my new title"xwit can be installed from aurAutomatic transparency
To enable transparency, you need to install the package
transset-df and a composite manager, I recommend using Compton because it is stable and runs smoother than others.To install Compton , first make sure that Composite extension is enabled for the X Server. Run:
$ xdpyinfo | grep CompositeIf there is no output, add the Composite option to the Extensions section of
xorg.conf: /etc/X11/xorg.confSection "Extensions" Option "Composite" "true"EndSectionInstall compton :
$ pacman -S comptonTo use compton , you need to start it manually :
$ compton Or you can add it to
xinitrc file:/etc/X11/xinit/xinitrc...exec compton &...When your have installed compton, add this line to
~/.bashrc file to enable automatic transparency:[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" > /dev/nullBash interaction prompt decoration
This is a sample bash interaction prompt configuration:
/etc/bash.bashrc...if [ `whoami` = 'root' ]; then PS1='\[\e[1;33m\][\u@\h \W]\$\[\e[0m\] 'else PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] 'fiPS2='> 'PS3='> 'PS4='+ '...The terminal will look like thisResources:


No comments:
Post a Comment