You are not logged in.

#1 2019-01-22 00:05:10

Vofan
Member
Registered: 2019-01-21
Posts: 65

.Xresources works for some colours and not others [Solved]

I'm getting a new install setup, but have been having trouble getting .Xresources to actually display what I want.

When I have:

*.background: #170F0D
*.foreground: #746C48
*.color0: #392925
*.color1: #98724C
*.color2: #908F32
*.color3: #AA964C
*.color4: #7B854E
*.color5: #6B5644
*.color6: #5C5142
*.color7: #C8B55B
*.color8: #544B2E
*.color9: #AF652F
*.color10: #C3C13D
".color11: #C8B55B
".color12: #70A16C
".color13: #98724C
".color14: #778725
".color15: #E4DC8C

Everything works as expected.

However, when I change it to:

Xft.dpi: 131
Xft.antialias: true
Xft.hinting: true
Xft.hinstyles: hintfull
Xft.rgba: rgb
st.termname: st-256color
st.chscale: 1.2
st.cwscale: 1.1
st.borderpx: 15
st.cursorshape: 2
st.blinktimeout: 0
st.bellvolume: 0
st.opacity: 255
st.background: #262626
st.foreground: #ffffff
st.color0: #eeeeee
st.color8: #a0a0a0
st.color1: #e2a76d
st.color9: #e2a75d
st.color2: #f0c674
st.color10: #f0c674
st.color3: #f3dd71
st.color11: #f3dd71
st.color4: #fff06e
st.color12: #fff06e
st.color5: #99d9c9
st.color13: #99d9c9
st.color6: #85abbd
st.color14: #85abbd
st.color7: #464646
st.color15: #464646

I get a white background the terminal.

$ echo $TERM
st-256color

.xinitrc:

#!/bin/sh

[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources

xset r rate 200 50

exec i3

Thanks for any pointers on how to troubleshoot - in the meantime I'll go and reread the relevant documentation.

TL;DR
Adding this in case anyone makes the same lazy mistake as me and comes across this in the search:

Trilby wrote:

Are you using a patched st?  If not, st does not use Xresources.

If the original works in st, but specifying st.colorN does not, then the problem is that 'st' is not actually the correct resource name.

While xprop output didn't help, it was the case that my st config was the culprit.

Last edited by Vofan (2019-01-25 23:55:17)

Offline

#2 2019-01-22 00:18:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: .Xresources works for some colours and not others [Solved]

Are you using a patched st?  If not, st does not use Xresources.

If the original works in st, but specifying st.colorN does not, then the problem is that 'st' is not actually the correct resource name.  Check the xprop output for the st terminal window.  The default resource name and class here seem to be st-256color, not st.

Last edited by Trilby (2019-01-22 00:19:41)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2019-01-25 03:26:06

Vofan
Member
Registered: 2019-01-21
Posts: 65

Re: .Xresources works for some colours and not others [Solved]

Trilby wrote:

Are you using a patched st?  If not, st does not use Xresources.

If the original works in st, but specifying st.colorN does not, then the problem is that 'st' is not actually the correct resource name.  Check the xprop output for the st terminal window.  The default resource name and class here seem to be st-256color, not st.

The issue seems to be with the custom version of st that I borrowed (I wanted to try it out but have it 'just work' for a while). I may try to tinker with the Xresources patch in the future, but for now I'd consider this solved. Thanks for pointing this out, I really hope I gain better habits re. documentation reading soon (I thought I had with LaTeX...).

Offline

#4 2019-01-25 05:07:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: .Xresources works for some colours and not others [Solved]

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB