dot/Xdefaults, Makefile: Replace `putty-defaults' with X resources.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 24 May 2020 03:21:16 +0000 (04:21 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 24 May 2020 03:25:35 +0000 (04:25 +0100)
This is more cumbersome to set up, but ends up being more useful.  Using
X resources, it's possible to have a number of different profiles for
`pterm' which can be switched using the `-name' option.  Also, this
allows for overriding on the command-line using `-xrm', which doesn't
work if the settings are defined in `pterm''s own configuration file.

Makefile
dot/Xdefaults
dot/Xdefaults.pterm [new file with mode: 0644]
dot/putty-defaults [deleted file]

index eda523c..a23e263 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -278,9 +278,6 @@ DOTLINKS            += .config/fontconfig/fonts.conf
 .config/fontconfig/fonts.conf_SRC = fonts.conf
 DOTLINKS               += .stalonetrayrc
 
-DOTLINKS               += .putty/sessions/Default%20Settings
-.putty/sessions/Default%20Settings_SRC = putty-defaults
-
 DOTLINKS               += .config/gnome-session/sessions/mdw.session
 .config/gnome-session/sessions/mdw.session_SRC = mdw.session
 
@@ -313,7 +310,7 @@ SCRIPTLINKS         += xduplic-terminal
 
 DOTCPP                 += .Xdefaults
 Xdefaults_DEFS          = -DEMACSWD=$(call mdw-conf,emacs-width,77)
-$(HOME)/.Xdefaults: $(HOME)/.mdw.conf
+$(HOME)/.Xdefaults: $(HOME)/.mdw.conf dot/Xdefaults.pterm
 
 ifeq ($(shell case $${DISPLAY-nil} in (:[0-9]*) echo t ;; (*) echo nil ;; esac),t)
 dotfile-hook/.Xdefaults = \
index b908cb1..e80ff95 100644 (file)
@@ -72,6 +72,27 @@ XTerm*VT100*translations:    #override \
        <Btn4Down>:             scroll-back(1,halfpage) \n\
        <Btn5Down>:             scroll-forw(1,halfpage)
 
+!! pterm.
+#define PTERM_NAME pterm
+#define PTERM_FOREG 255, 255, 255
+#define PTERM_BACKG 0, 0, 0
+#include "Xdefaults.pterm"
+
+#define PTERM_NAME pterm-red
+#define PTERM_FOREG 255, 168, 168
+#define PTERM_BACKG 42, 0, 0
+#include "Xdefaults.pterm"
+
+#define PTERM_NAME pterm-green
+#define PTERM_FOREG 168, 255, 168
+#define PTERM_BACKG 0, 42, 0
+#include "Xdefaults.pterm"
+
+#define PTERM_NAME pterm-blue
+#define PTERM_FOREG 168, 168, 255
+#define PTERM_BACKG 0, 0, 42
+#include "Xdefaults.pterm"
+
 !! XConsole.
 XConsole*font:                 FIXED
 XConsole*background:           #002000
diff --git a/dot/Xdefaults.pterm b/dot/Xdefaults.pterm
new file mode 100644 (file)
index 0000000..18f6504
--- /dev/null
@@ -0,0 +1,46 @@
+!!! -*-conf-xdefaults-*-
+
+PTERM_NAME.TerminalType:       xterm-256color
+PTERM_NAME.LinuxFunctionKeys:  2
+PTERM_NAME.HideMousePtr:       1
+PTERM_NAME.WindowBorder:       0
+PTERM_NAME.CurType:            2
+PTERM_NAME.BlinkCur:           1
+PTERM_NAME.BellOverloadT:      2000
+PTERM_NAME.BellOverloadS:      5000
+PTERM_NAME.ScrollbackLines:    10000
+PTERM_NAME.WinNameAlways:      1
+PTERM_NAME.TermWidth:          80
+PTERM_NAME.TermHeight:         75
+PTERM_NAME.FontName:           server:FIXED
+PTERM_NAME.BoldAsColour:       2
+PTERM_NAME.ScrollOnKey:                1
+PTERM_NAME.ScrollOnDisp:       0
+PTERM_NAME.StampUtmp:          0
+PTERM_NAME.LoginShell:         0
+PTERM_NAME.Colour0:            PTERM_FOREG
+PTERM_NAME.Colour1:            PTERM_FOREG
+PTERM_NAME.Colour2:            PTERM_BACKG
+PTERM_NAME.Colour3:            PTERM_BACKG
+PTERM_NAME.Colour4:            255, 255, 255
+PTERM_NAME.Colour5:            255,   0,   0
+PTERM_NAME.Colour6:              0,   0,   0
+PTERM_NAME.Colour7:             68,  68,  68
+PTERM_NAME.Colour8:            255,  34,  34
+PTERM_NAME.Colour9:            255,  68,  68
+PTERM_NAME.Colour10:            68, 255,  68
+PTERM_NAME.Colour11:            68, 255,  68
+PTERM_NAME.Colour12:           255, 255,   0
+PTERM_NAME.Colour13:           255, 255,  68
+PTERM_NAME.Colour14:             0,   0, 255
+PTERM_NAME.Colour15:            68, 102, 255
+PTERM_NAME.Colour16:           255,  68, 255
+PTERM_NAME.Colour17:           255,  68, 255
+PTERM_NAME.Colour18:             0, 170, 170
+PTERM_NAME.Colour19:            68, 255, 255
+PTERM_NAME.Colour20:           221, 221, 221
+PTERM_NAME.Colour21:           255, 255, 255
+
+#undef PTERM_NAME
+#undef PTERM_FOREG
+#undef PTERM_BACKG
diff --git a/dot/putty-defaults b/dot/putty-defaults
deleted file mode 100644 (file)
index 78a0a29..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-Present=1
-HostName=
-LogFileName=putty.log
-LogType=0
-LogFileClash=-1
-LogFlush=1
-SSHLogOmitPasswords=1
-SSHLogOmitData=0
-Protocol=ssh
-PortNumber=22
-CloseOnExit=2
-WarnOnClose=1
-PingInterval=0
-PingIntervalSecs=0
-TCPNoDelay=1
-TCPKeepalives=0
-TerminalType=xterm-256color
-TerminalSpeed=38400,38400
-TerminalModes=CS7=A,CS8=A,DISCARD=A,DSUSP=A,ECHO=A,ECHOCTL=A,ECHOE=A,ECHOK=A,ECHOKE=A,ECHONL=A,EOF=A,EOL=A,EOL2=A,ERASE=A,FLUSH=A,ICANON=A,ICRNL=A,IEXTEN=A,IGNCR=A,IGNPAR=A,IMAXBEL=A,INLCR=A,INPCK=A,INTR=A,ISIG=A,ISTRIP=A,IUCLC=A,IXANY=A,IXOFF=A,IXON=A,KILL=A,LNEXT=A,NOFLSH=A,OCRNL=A,OLCUC=A,ONLCR=A,ONLRET=A,ONOCR=A,OPOST=A,PARENB=A,PARMRK=A,PARODD=A,PENDIN=A,QUIT=A,REPRINT=A,START=A,STATUS=A,STOP=A,SUSP=A,SWTCH=A,TOSTOP=A,WERASE=A,XCASE=A
-AddressFamily=0
-ProxyExcludeList=
-ProxyDNS=1
-ProxyLocalhost=0
-ProxyMethod=0
-ProxyHost=proxy
-ProxyPort=80
-ProxyUsername=
-ProxyPassword=
-ProxyTelnetCommand=connect %host %port\n
-Environment=
-UserName=
-UserNameFromEnvironment=0
-LocalUserName=
-NoPTY=0
-Compression=0
-TryAgent=1
-AgentFwd=0
-GssapiFwd=0
-ChangeUsername=0
-Cipher=aes,blowfish,3des,WARN,des,arcfour
-KEX=dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,WARN,rsa
-RekeyTime=60
-RekeyBytes=1G
-SshNoAuth=0
-SshBanner=1
-AuthTIS=0
-AuthKI=1
-AuthGSSAPI=1
-GSSLibs=libgssapi,libgssapi_krb5,libgss,custom
-GSSCustom=
-SshNoShell=0
-SshProt=2
-LogHost=
-SSH2DES=0
-PublicKeyFile=
-RemoteCommand=
-RFCEnviron=0
-PassiveTelnet=0
-BackspaceIsDelete=1
-RXVTHomeEnd=0
-LinuxFunctionKeys=2
-NoApplicationKeys=0
-NoApplicationCursors=0
-NoMouseReporting=0
-NoRemoteResize=0
-NoAltScreen=0
-NoRemoteWinTitle=0
-RemoteQTitleAction=1
-NoDBackspace=0
-NoRemoteCharset=0
-ApplicationCursorKeys=0
-ApplicationKeypad=0
-NetHackKeypad=0
-AltF4=1
-AltSpace=0
-AltOnly=0
-ComposeKey=0
-CtrlAltKeys=1
-TelnetKey=0
-TelnetRet=1
-LocalEcho=2
-LocalEdit=2
-Answerback=PuTTY
-AlwaysOnTop=0
-FullScreenOnAltEnter=0
-HideMousePtr=1
-SunkenEdge=0
-WindowBorder=0
-CurType=2
-BlinkCur=1
-Beep=1
-BeepInd=0
-BellWaveFile=
-BellOverload=1
-BellOverloadN=5
-BellOverloadT=2000
-BellOverloadS=5000
-ScrollbackLines=10000
-DECOriginMode=0
-AutoWrapMode=1
-LFImpliesCR=0
-CRImpliesLF=0
-DisableArabicShaping=0
-DisableBidi=0
-WinNameAlways=1
-WinTitle=
-TermWidth=80
-TermHeight=75
-FontName=client:Fixed 13
-FontQuality=0
-FontVTMode=4
-UseSystemColours=0
-TryPalette=0
-ANSIColour=1
-Xterm256Colour=1
-BoldAsColour=2
-Colour0=255,255,255
-Colour1=255,255,255
-Colour2=0,0,0
-Colour3=0,0,0
-Colour4=255,255,255
-Colour5=255,0,0
-Colour6=0,0,0
-Colour7=68,68,68
-Colour8=255,34,34
-Colour9=255,68,68
-Colour10=68,255,68
-Colour11=68,255,68
-Colour12=255,255,0
-Colour13=255,255,68
-Colour14=0,0,255
-Colour15=68,102,255
-Colour16=255,68,255
-Colour17=255,68,255
-Colour18=0,170,170
-Colour19=68,255,255
-Colour20=221,221,221
-Colour21=255,255,255
-RawCNP=0
-PasteRTF=0
-MouseIsXterm=0
-RectSelect=0
-MouseOverride=1
-Wordness0=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-Wordness32=0,1,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1
-Wordness64=1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2
-Wordness96=1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1
-Wordness128=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
-Wordness160=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
-Wordness192=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2
-Wordness224=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2
-LineCodePage=UTF-8
-CJKAmbigWide=0
-UTF8Override=1
-Printer=
-CapsLockCyr=0
-ScrollBar=1
-ScrollBarFullScreen=0
-ScrollOnKey=1
-ScrollOnDisp=0
-EraseToScrollback=1
-LockSize=0
-BCE=1
-BlinkText=0
-X11Forward=0
-X11Display=
-X11AuthType=1
-X11AuthFile=
-LocalPortAcceptAll=0
-RemotePortAcceptAll=0
-PortForwardings=
-BugIgnore1=0
-BugPlainPW1=0
-BugRSA1=0
-BugIgnore2=0
-BugHMAC2=0
-BugDeriveKey2=0
-BugRSAPad2=0
-BugPKSessID2=0
-BugRekey2=0
-BugMaxPkt2=0
-BugOldGex2=0
-BugWinadj=0
-BugChanReq=0
-StampUtmp=0
-LoginShell=0
-ScrollbarOnLeft=0
-BoldFontName=
-WideFontName=
-WideBoldFontName=
-ShadowBold=0
-ShadowBoldOffset=1
-SerialLine=/dev/ttyS0
-SerialSpeed=9600
-SerialDataBits=8
-SerialStopHalfbits=2
-SerialParity=0
-SerialFlowControl=1
-WindowClass=
-ConnectionSharing=0
-ConnectionSharingUpstream=1
-ConnectionSharingDownstream=1
-SSHManualHostKeys=