Author Topic: Xterm customizations whats in your .Xdefaults?  (Read 4912 times)

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Xterm customizations whats in your .Xdefaults?
« on: March 10, 2011, 03:41:16 PM »
I have been toying with having a .Xdefaults file so that I can customize my xterm usage, I was wondering if there are any other folks that use Xterm as their terminal of choice and whether they too have customized it - if so how?

Code: (Hootiegibbons .Xdefaults) [Select]

!nicer fonts
Xft.dpi: 96
Xft.hinting: 1
Xft.antialias: 1
Xft.hintstyle: hintfull
Xft.rgba: rgb

*customization: -color
XTerm*termName:  xterm-256color
xterm*Background: black
xterm*Foreground: green
xterm*highlightColor: red
Xterm*toolBar: false
XTerm*faceName: liberation mono:pixelsize=10
XTerm*dynamiccolors: true
!easier url grabbing
xterm*charClass:        33:48,35-38:48,39:43,42-47:48,58-59:48,61:48,63-64:48,126:48


in order for any changes to be made you will need to run  'xrdb -merge $HOME/.Xdefaults' without the quotes, or to have this execcute on startup (applying the Xdefaults by default) you would need to add the following to  ~/.Xsession

Code: [Select]
if [ -f $HOME/.Xdefaults ]; then
  xrdb -merge $HOME/.Xdefaults
fi

Here is a screenshot of the w3m browser browsing the monthly screenshots for march


PostImage.OrgHosting
« Last Edit: March 10, 2011, 04:06:02 PM by Hootiegibbon »


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Xterm customizations whats in your .Xdefaults?
« Reply #1 on: July 03, 2011, 04:50:27 AM »
Hi Hootie,

I just noticed your post with no answer. Here is a trick a French guy brought us and that I copied to a FAQ at French PCLinuxOS site:
http://pclinuxos-fr.org/2011/01/06/configurer-xterm-et-urxvt/#more-554

Quote
XTerm*background: black
XTerm*foreground: white
XTerm*cursorColor: grey
XTerm*faceName: Liberation Mono
XTerm*faceSize: 11


and in case you want to use urxvt:
Quote
URxvt*termName: rxvt


add it just before the lines related to Urxvt.(found this one googling as I had some error message while using urxvt)

In your's what does "xterm*charClass:        33:48,35-38:48,39:43,42-47:48,58-59:48,61:48,63-64:48,126:48" do ?

Regards,
Mélodie
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

ongoto

  • Guest
Re: Xterm customizations whats in your .Xdefaults?
« Reply #2 on: July 03, 2011, 05:32:39 AM »
Quote
I have been toying with having a .Xdefaults file so that I can customize my xterm usage, I was wondering if there are any other folks that use Xterm as their terminal of choice and whether they too have customized it - if so how?

hello

I don't remember where it came from but ere's what I use.   :)
 xfontsel helps make sense of the font statements.

Code: [Select]
#ifdef COLOR
*customization: -color
#endif

emacs*Background: DarkSlateGray
emacs*Foreground: Wheat
emacs*pointerColor: Orchid
emacs*cursorColor: Orchid
emacs*bitmapIcon: on
emacs*font: fixed
emacs.geometry: 80x25

Seyon.modems: /dev/modem

xterm*background: Black
xterm*foreground: White
xterm*cursorColor: Orchid
xterm*reverseVideo: false
xterm*scrollBar: true
xterm*reverseWrap: true
xterm*font: -*-fixed-*-*-*-20-*-*-*-*-*-*-*
xterm*geometry: 96x32
xterm*fullCursor: true
xterm*scrollTtyOutput: off
xterm*scrollKey: on
xterm*VT100.Translations: #override\n\
<Key>BackSpace: string(0x7F)\n\
<Key>Delete: string("\033[3~")\n\
<Key>Home: string("\033[1~")\n\
<Key>End: string("\033[4~")
        <KeyPress>Prior : scroll-back(1,page)\n\
<KeyPress>Next : scroll-forw(1,page)
xterm*titleBar: false

xterm_color*background: Black
xterm_color*foreground: White
xterm_color*cursorColor: Orchid
xterm_color*reverseVideo: false
xterm_color*scrollBar: true
xterm_color*saveLines: 5000
xterm_color*reverseWrap: true
!xterm_color*font: fixed
xterm_color*font: -*-fixed-*-*-*-20-*-*-*-*-*-*-*
xterm_color*geometry: 96x32
xterm_color*fullCursor: true
xterm_color*scrollTtyOutput: off
xterm_color*scrollKey: on
xterm_color*VT100.Translations: #override\n\
<KeyPress>Prior : scroll-back(1,page)\n\
<KeyPress>Next : scroll-forw(1,page)
xterm_color*titleBar: false

! GVim great Colors.
Vim*background: black
Vim*foreground: lightyellow
Vim*font: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-15-*-5
Vim*geometry: 96x32
Vim*menuBackground: black
Vim*menuForeground: moccasin
« Last Edit: July 03, 2011, 05:41:24 AM by ongoto »

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Xterm customizations whats in your .Xdefaults?
« Reply #3 on: July 03, 2011, 06:19:39 AM »
I don't remember where it came from but ere's what I use.   :)
 xfontsel helps make sense of the font statements.

Hi Ongoto,

this looks very interesting...
Quote
$ apt-cache search xfontsel
xfontsel - Point and click selection of X11 font names

I don't understand what it does exactly. Does it help make the fonts look nicer in the system, or is it something else ?

Thanks,
Mélodie
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Xterm customizations whats in your .Xdefaults?
« Reply #4 on: July 03, 2011, 08:46:20 AM »
Mel,

the entry `xterm*charClass:        33:48,35-38:48,39:43,42-47:48,58-59:48,61:48,63-64:48,126:48` makes it easier to highlight-click urls in xterm although I may have a couple of digits incorrect as it does not seem to quite do it right .


xfontsel makes it easy to get the correct font syntax for configuration files, and immediatly gives an example

having 256colours in xterm is pretty handy too.

Jase
« Last Edit: July 03, 2011, 08:48:25 AM by Hootiegibbon »


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

ongoto

  • Guest
Re: Xterm customizations whats in your .Xdefaults?
« Reply #5 on: July 03, 2011, 04:00:09 PM »
Quote
I don't understand what it does exactly. Does it help make the fonts look nicer in the system, or is it something else ?
hi melodie

As Hootie says, xfontsel is just a gtk tool to help you build strings like these.
Code: [Select]
-*-fixed-*-*-*-20-*-*-*-*-*-*-*
-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-15-*-5
Each * is a place holder for each possible parameter.
It has dropdown lists showing what fonts are available and many other tweaks.
Takes a little practice.   :)

Hootiegibbon

How would you specify/write a 256 colors line?
« Last Edit: July 03, 2011, 04:15:11 PM by ongoto »

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Xterm customizations whats in your .Xdefaults?
« Reply #6 on: July 03, 2011, 04:45:01 PM »

so long as xterm is built with 256color support (ours is ) than adding those lines  above

*customization: -color
XTerm*termName:  xterm-256color
XTerm*dynamiccolors: true

should do it after activating them by using

xrdb -merge $HOME/.Xdefaults

here is a screenie usning a perl script to generate 256 colors

It would be handy to get 'fbterm' requested as a ateminal in rl3
 

fullsize image


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

ongoto

  • Guest
Re: Xterm customizations whats in your .Xdefaults?
« Reply #7 on: July 03, 2011, 08:51:55 PM »
Thanks Hootiegibbon   ;D

Your .Xdefaults is loaded with alot of good stuff.