4

This question already has an answer here:

I've just switched from xfce4-terminal to rxvt-unicode and I've been reading a lot of .Xresources and .Xdefaults files, piecing things together to create my own. My googling skills have left me with a number of unanswered questions; one of which is:

Is there a difference between URxvt.font and URxvt*font?

I have seen a number of variations, for example, the answer for this questions uses a asterisk in one line and periods in another.

URxvt*scrollBar:false
URxvt*scrollBar_right: false
URxvt.keysym.Shift-Up: command:\033]720;1\007
URxvt.keysym.Shift-Down: command:\033]721;1\007`

Does that mean it doesn't matter or that it matters for some setting and not others? I'm hoping understanding the differences, if there are any, will help with the settings I can't get to work.

marked as duplicate by Thomas Dickey, Jeff Schaller, don_crissti, Stephen Rauch, Community Aug 27 '17 at 14:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6

This is explained in the X manual (man 7 X):

When an application looks for the value of a resource, it specifies a complete path in the hierarchy, with both class and instance names. However, resource values are usually given with only partially specified names and classes, using pattern matching constructs. An asterisk (*) is a loose binding and is used to represent any number of intervening components, including none. A period (.) is a tight binding and is used to separate immediately adjacent components.

This means that

URxvt*scrollBar:false

happens to be the same as

URxvt.scrollBar:false

since there is no intermediate component between URxvt and the scrollBar component (if I read the urxvt manual correctly).

However,

URxvt.keysym.Shift-Up: command:\033]720;1\007

could probably be written

URxvt*Shift-Up: command:\033]720;1\007

to bypass that intervening keysym component. This will also set any other Shift-Up resource for the URxvt class though, if there are any other.

*Shift-Up: command:\033]720;1\007

would set that resource for all X classes.

Asterisk works like a "globbing character", like * does for names in the shell, but for X resource names. Also, I believe you can't place a dot in the middle of a component name, so the analogy doesn't go all the way.

Not the answer you're looking for? Browse other questions tagged or ask your own question.