Description: Debian-specific tweaks to xterm
 Set the default VT widget foreground and background colors to gray90 on
 black, which approximates the color scheme of the Linux virtual console
 (and approximates actual DEC VT terminals far more closely than
 black text on a white background in any case).
 .
 Stop using an Xaw7 gradient for the backgrounds of the xterm menus; it
 produces an unappealing effect if the menus are configured to use a
 larger font than the stock configuration (also, xterm has added items to
 some menus since I last calculated the gradient size and I can't be
 bothered to do it again).
 .
 If the X server is capable of color and has more than 8 planes of color
 depth available, set the menu colors to gray15 on antique white, and
 customize the appearance VT widget's scrollbar.  Otherwise, do not eat up
 precious entries in the color palette.
 .
 Set the "ptyInitialErase" parameter to true by default.
 .
 Set kbs to \177 rather than to ^H for "xterm-new" in the termcap and
 terminfo files so that the backspace key is VT220-conformant, as directed
 by section 9.8 of the Debian Policy Manual. This used to be done for
 "xterm-debian" terminal type which is now just an alias for "xterm".
 .
 The "rep" feature has been removed from xterm-new and derived terminfo
 descriptions, as it causes compatibility problems with older terminal
 emulators, see https://bugs.debian.org/933053.
Author: Branden Robinson <branden@debian.org>
Author: Sven Joachim <svenjoac@gmx.de>

---
 XTerm-col.ad |   42 +++++++++++++++++++++++++++---------------
 XTerm.ad     |    3 +++
 termcap      |    6 ++++--
 terminfo     |    6 +++---
 4 files changed, 37 insertions(+), 20 deletions(-)

--- a/termcap
+++ b/termcap
@@ -243,6 +243,8 @@ v0|xterm|X11 terminal emulator:\
 
 # This fragment is for people who cannot agree on what the backspace key
 # should send.
+# Modified to more strictly conform to the DEC VT220 behavior; this is
+# mandated by Section 9.8 of the Debian Policy Manual.
 xterm+kbs|fragment for backspace key:\
-	:kb=^H:
-#	:kb=\177:
+#	:kb=^H:
+	:kb=\177:
--- a/terminfo
+++ b/terminfo
@@ -138,7 +138,7 @@ xterm-new|modern xterm terminal emulator
 	use=xterm+keypad,
 	use=vt420+lrmm,
 	use=xterm+sm+1006,
-	use=ansi+rep,
+#	use=ansi+rep,
 	use=ecma+strikeout,
 	use=xterm+pcfkeys,
 	use=xterm+tmux,
@@ -2639,12 +2639,12 @@ xterm-r5|xterm R5 version,
 # This is the only entry which you should have to customize, since "xterm"
 # is widely used for a variety of incompatible terminal emulations including
 # color_xterm and rxvt.
-xterm|X11 terminal emulator,
+xterm|xterm-debian|X11 terminal emulator,
 	use=xterm-new,
 #	use=xterm-r6,
 
 # This fragment is for people who cannot agree on what the backspace key
 # should send.
 xterm+kbs|fragment for backspace key,
-	kbs=^H,
+	kbs=\177,
 #	kbs=^?,
--- a/XTerm.ad
+++ b/XTerm.ad
@@ -174,6 +174,9 @@
 *tek4014*font3: 6x13
 *tek4014*fontSmall: 6x10
 
+! Debian package customizations follow.
+*ptyInitialErase: true
+
 ! If xterm is built with a toolbar, the widget hierarchy looks like this,
 ! showing widget name / class names.  The complete menu hierarchy is built
 ! at startup because it is needed to make the layout work for the menubar:
--- a/XTerm-col.ad
+++ b/XTerm-col.ad
@@ -37,9 +37,9 @@
 *VT100*boldColors: on
 *VT100*dynamicColors: on
 
-! Uncomment this for "white" text on a dark background.
-!*VT100*foreground: gray90
-!*VT100*background: black
+! Set the default text foreground and background colors.
+*VT100*foreground: gray90
+*VT100*background: black
 
 ! - OR -
 ! Uncomment this for black text on a "white" background.
@@ -144,20 +144,32 @@
 *Form.background: AntiqueWhite
 *form.background: AntiqueWhite
 
+*mainMenu*background: AntiqueWhite
+*mainMenu*foreground: gray15
+*vtMenu*background: AntiqueWhite
+*vtMenu*foreground: gray15
+*fontMenu*background: AntiqueWhite
+*fontMenu*foreground: gray15
+*tekMenu*background: AntiqueWhite
+*tekMenu*foreground: gray15
+
 ! The following two sections take advantage of new features in version 7
-! of the Athena widget library.  Comment them out if you have a shallow
-! color depth.
+! of the Athena widget library; see Xaw(7x).
+
+! This section is commented out because Xaw has no way to dynamically size
+! the gradient.  The dimension parameter may need to be adjusted depending
+! on the font used in the menu.
 !*SimpleMenu*backgroundPixmap:   gradient:vertical?dimension=350&start=gray90&end=gray60
 !*SimpleMenu*foreground:         gray15
 
-!*VT100.scrollbar.thumb:         vlines2
-!*VT100.scrollbar.width:         14
-!*VT100.scrollbar.background:    gray60
-!*VT100.scrollbar.foreground:    rgb:a/5/5
-!*VT100.scrollbar.borderWidth:   0
-!*VT100.scrollbar.displayList:\
-!foreground      gray90;\
-!lines           1,-1,-1,-1,-1,1;\
-!foreground      gray60;\
-!lines           -1,0,0,0,0,-1
+*VT100.scrollbar.thumb:         vlines2
+*VT100.scrollbar.width:         14
+*VT100.scrollbar.background:    gray60
+*VT100.scrollbar.foreground:    rgb:a/5/5
+*VT100.scrollbar.borderWidth:   0
+*VT100.scrollbar.displayList:\
+foreground      gray90;\
+lines           1,-1,-1,-1,-1,1;\
+foreground      gray60;\
+lines           -1,0,0,0,0,-1
 #endif
