-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXresources
119 lines (118 loc) · 7.48 KB
/
Xresources
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
!============ [General info about Xresources] ==========
! ddd comments:
! - check man 7 X section about resources for more info
! - resource names are case-sensitive
! - syntax for a resource is: Component1.Component2.Component3....ComponentName
! - also: * matches any sequence of components and ? matches any one component. These are called bindings (== wildcards).
! - Component1 is the app itself. The others are widgets of the app.
! - Each component can be identified by its class (starts with capital) or instance name (lowercase).
! - Instance names are more precise and take precedence over class names. Class names take precedence over wildcards (obviously, as they are more precise)
!
! source: https://unix.stackexchange.com/questions/216723/xterm-or-xterm-in-configuration-file
! - conventionally X resource names use a leading capital letter for class name. when the first letter of the class name is X, theres a convention to make the second letter capitalized. So we get XTerm. Some programs do not follow the convention.
! - conventionally, the instance name is the actual name of the program (its filename). If you happen to rename the program (as happens occasionally, e.g., xterm.real) that changes the name. The program doesnt have to do this, but its done often. xterm does it.
! usually the class name is a constant. It is not in xterm, because it expects one of two classes: XTerm or UXTerm (3 leading capitals). The latter is used for the uxterm script, simplifying the way the fonts are specified (its a wrapper, see below).
!
!
! From my notes on fonts:
! To check current xft settings:
! appres Xft
! appres xft
! (the second one is for instances? - check my .Xresources file with more info on the difference)
! Also, to check all the Xresources values set by user (not the system defaults, as opposed to appres that will print those too):
! xrdb -query
!============ [Fonts] ==========
Xft.autohint: 0
Xft.antialias: 1
! true is same as 1 according to arch wiki Xresources entry
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.dpi: 96
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
! intentionally non-existent cursor theme should force use of current default, at least under Openbox
Xcursor.theme: ThisIsIntentionalDDD
!Xcursor.theme: Adwaita
!Xcursor.theme: DMZ-White
! size can be 16, 32, 48, 64
!Xcursor.size: 16
!============ [XTerm stuff] ==========
! For adjusting relative height between glyphs
XTerm*scaleHeight: 0.9
!
! DONT FORGET TO USE CLIPBOARD MANAGER LIKE PARCELLITE TO KEEP CLIPBOARD FROM
! DISAPPEARING WHEN APPLICATION EXITS
!
! TLDR: Set utf8 and do not use uxterm (which is just a wrapper).
! Source: https://lists.debian.org/debian-user/2016/11/msg00780.html
! Nowadays uxterm is pretty much obsolete, but 15 years ago UTF-8 locales
! were rather esoteric, and the uxterm wrapper allowed people to easily test
! them without changing their normal environment. If you already use a
! UTF-8 locale like almost everyone does these days, uxterm is not needed
! or useful.
!
! If some option is not present, but set to an unusual value, check /etc/X11/app-defaults/XTerm and XTerm-color and UXTerm
!
! Set consistent escape sequences
! source: http://www.hypexr.org/linux_ruboff.php#bsolution http://www.ibb.net/~anne/keyboard/keyboard.html#Xterm
! When using <c-v> in xterm or vim:
! delete should give [3~ and backspace should give
! On xubuntu 18.04 HOME gives OH and END gives OF and seems to work fine so far with man and less, but not with the below HOME and END.
! If having trouble with home or end, try modifying overrides like this:
!
!xterm*VT100.Translations: \
! #override <Key>BackSpace: string(0x7f) \n\
! <Key>Delete: string(0x1b) string("[3~") \n\
! <Key>Home: string("\033[1~") \n\
! <Key>End: string("\033[4~")
!
! erase sequence is now instead of , and <c-h> can now be used in vim bindings
xterm*ttyModes: erase ^?
xterm*VT100.Translations: \
#override <Key>BackSpace: string(0x7f) \n\
<Key>Delete: string(0x1b) string("[3~")
! rest of my settings
xterm*selectToClipboard: true
XTerm*selectToClipboard: true
xterm*metaSendsEscape: true
xterm*termName: xterm-256color
xterm*locale: true
xterm*utf8: 2
XTerm*utf8: 2
! from /etc/X11/app-defaults/UXTerm
xterm*utf8Title: true
! xterm*fontMenu.Label: Unicode Fonts
! ---
! setting Source Code Pro to Semibold makes it detect Semibold as both normal and bold variant, thus stopping showing bolds (which is what we want)
! when setting name to "Source Code Pro Semibold" and not setting style, the start stdout messages are the same, except for italic font xterm reports property "matrix=1 0.2 0 1" when using "style:" and omitting it when not using "style:" (using "Source Code Pro Semibold" with "style" also gives matrix, so matrix on italics is reported when style is set). When not specifying style (and matrix is not shown), xterm uses fonts real italics and doesnt show greek chars!
! according to man xterm, best way to get fonts name is:
! fc-list :scalable=true:spacing=mono: family
! and use the exact output, so semibold seems to be: "Source Code Pro,Source Code Pro Semibold" but then it complains that there are too many fonts for fNorm. So the correct one would be "Source Code Pro Semibold".
xterm*faceName: Source Code Pro Semibold:style=Semibold:size=10
!xterm*faceName: Source Code Pro Semibold:size=10
!xterm*faceName: Source Code Pro:style=Semibold:size=10
! If bitmap fonts are used (not ttf?) what to use as bold font (because if the corresponding real bold font is not found, xterm will perform overstriking, that is artificial production of bold font by widening shapes by 1px). Must be same width/heigth as normal font, otherwise is ignored. Also check alwaysBoldMode, boldMode and font resources: man xterm. Also faceName resource for difference of bitmaps/truetype.
!xterm*boldFont:
!xterm*font:
! stop showing bold fonts (regardless of whether bitmap or not), overrides alwaysBoldMode and boldMode resource settings, which is what we want, even if we dont set these
!xterm*allowBoldFonts: false
! TODO: set semibold as italic font (check xterm's startup stdout). Also, for some reason, when setting Source Code Pro's style Regular, it matches Black as bold font!!! When omitting style it sets Bold and Italic ttfs correctly. Almost surely this has to do with font server font-config not matching correctly. Maybe there is a way to force different settings that will result in different queries from xterm for bolds and italics.
xterm*cursorBlink: false
! on startup, print to stdout summary of loaded fonts for debugging
xterm*reportFonts: true
! show an empty box where a glyph is missing
xterm*showMissingGlyphs: true
! accept special escape sequences for changing color on the fly
xterm*dynamicColors: true
! always assume bold fonts have line-drawing characters. Helps when using with Source Code Pro Semibold to show vertical line for indentation, so that it is continuous.
xterm*forceBoxChars: true
! allow termcaps to help vim better identify terminal info and other stuff. true is default.
xterm*allowTcapOps: true
! do not map bold chars to bright versions (colors 0..7 -> 8..15). Breaks solarized without termguicolors on.
! may break other themes, if false? TODO: investigate
xterm*boldColors: false
! apply solarized dark palette
! TODO make it a shell script using escape sequences sourced by bashrc. That way it is possible to change theme on the fly without restarting terminal. Use examples base16 (my old custom term theme) and gruvbox.
! Hide mouse pointer when typing: Always (2)
xterm*pointerMode: 2
#include "dotfiles/Xresources.solarized.dark.ddd"