You are not logged in.

#1 2025-10-23 13:11:39

barthel
Member
From: Saint Charles, MO
Registered: 2011-07-27
Posts: 24

[SOLVED] urxvt pixbuf -icons

seth wrote:

it was ignoring the command line options in favor of the values set in .Xresources

Which ones exactly? (I've frankly never tested -icon and no: I doubt there's an OSC for that lol)

At the risk of this thread going off-topic to a urvxt thread....
I'd probably have to go to an aur package (or make my own) to get the pixbuf support for -icon. But -bg / -fg were completely ineffective. I tried different forms of color-specification, but the only one that worked consistently on -fg was an integer to reference color0 - color15. (To use the OSCs, I'm fairly certain I'd be limited to the 256 palette...)

With -bg, it's possible that the transparency setting is interfering. But I stopped testing to get some sleep. I'll investigate more after I complete my 7km walk with Whiskey.

(I think -name is working. I revised my .Xresources to add contexts for -local, -root, -ssh, and -ssh-root. I think they worked because the fg color changed for the 2 root cases, but it was not my specified color but an odd shade of orange. I suspect that's from the color definitions for the Tango palette I copied from https://wiki.gentoo.org/wiki/Rxvt-unicode which substitutes orange for cyan...)

Last edited by barthel (2025-10-25 01:58:01)


Any technology distinguishable from magic is insufficiently advanced.
    - Cleon, _Foundation's Fear_

Offline

#2 2025-10-23 13:23:53

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,020

Re: [SOLVED] urxvt pixbuf -icons

We've a mod on the thread to split it off wink

urxvt -bg red -fg blue -e top

does not work for you??

urxvt -bg '#272727' -fg '#1793d0' -e top

should™ induce less eye cancer.

Online

#3 2025-10-23 18:32:42

barthel
Member
From: Saint Charles, MO
Registered: 2011-07-27
Posts: 24

Re: [SOLVED] urxvt pixbuf -icons

seth wrote:

We've a mod on the thread to split it off wink

urxvt -bg red -fg blue -e top

does not work for you??

urxvt -bg '#272727' -fg '#1793d0' -e top

should™ induce less eye cancer.

Turns out the issue was elsewhere in my .Xresources...
I had

!transparency
URxvt*transparent: true
!URxvt*shading: 0-99 darkens, 101-200 lightens
URxvt*shading: 12

but then I found this in the man page:

       When  using  a  background  pixmap  or  pseudo-transparency,  then   the
       background   colour   will  always  behave  as  if  it  were  completely
       transparent (so the background image shows instead), regardless  of  how
       it  was  specified,  while  other  colours will either be transparent as
       specified (the background image will show through) on servers supporting
       the RENDER extension, or fully opaque  on  servers  not  supporting  the
       RENDER EXTENSION.

So it didn't matter what background color I was attempting to use - it would always be fully transparent. (It also resulted in my foreground color looking wrong because it had a different background color, much like the optical illusion where two areas with the same hex value look different because of the surrounding colors.)

With transparency, the correct approach then, is to specify tintColor. But we can't specify the opacity: values for shading take precedence over tintColor and you're back to a fully transparent background. The trick is to specify a tintColor that will mimic the appearance of the background color at the desired opacity.

So that's what I've been doing since I came back from walking Whiskey: trial and error tweaking of colors to find the happiest medium. I've been getting close: the psychic is mildly amused, but not yet truly happy... tongue

Last edited by barthel (2025-10-23 18:40:58)


Any technology distinguishable from magic is insufficiently advanced.
    - Cleon, _Foundation's Fear_

Offline

#4 2025-10-23 20:35:07

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,020

Re: [SOLVED] urxvt pixbuf -icons

If you've pixbuf support enabled you can load a (tiling) background pixmap (transparent, colored) that will overlay the background.

Online

#5 2025-10-24 09:13:54

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,487

Re: [SOLVED] urxvt pixbuf -icons

Split off from https://bbs.archlinux.org/viewtopic.php?id=309547 as (implicitly) requested.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2025-10-24 10:51:43

barthel
Member
From: Saint Charles, MO
Registered: 2011-07-27
Posts: 24

Re: [SOLVED] urxvt pixbuf -icons

seth wrote:

If you've pixbuf support enabled you can load a (tiling) background pixmap (transparent, colored) that will overlay the background.

Thanks, I'll keep that in mind for the next stage. smile

Once I commented out the shading option in .Xresources, everything proceeded very smoothly. I've set up the 4 classes in .Xresources like so:

!My default uses the same values as my "local" class...
URxvt.background:           #000000
URxvt.tintColor:            #181818
URxvt.foreground:           #C0C0C0
URxvt.cursorColor:          #C0C0C0
URxvt.iconName:             /usr/local/share/icons/hicolor/scalable/apps/bap-terminal-tango.svg

!The following classes replicate my evilvte/mate-terminal appearance settings
!   and can be invoked with -name, e.g. "-name URxvt-root".
URxvt-local.background:     #000000
URxvt-local.tintColor:      #181818
URxvt-local.foreground:     #C0C0C0
URxvt-local.cursorColor:    #C0C0C0
URxvt-local.iconName:       /usr/local/share/icons/hicolor/scalable/apps/bap-terminal-tango.svg
URxvt-root.background:      #480000
URxvt-root.tintColor:       #480808
URxvt-root.foreground:      #E89000
URxvt-root.cursorColor:     #E89000
URxvt-root.iconName:        /usr/local/share/icons/hicolor/scalable/apps/bap-terminal-sudo-tango.svg
URxvt-ssh.background:       #000040
URxvt-ssh.tintColor:        #1313A8
URxvt-ssh.foreground:       #C0C0C0
URxvt-ssh.cursorColor:      #C0C0C0
URxvt-ssh.iconName:         /usr/local/share/icons/hicolor/scalable/apps/bap-terminal-ssh-tango.svg
URxvt-ssh-root.background:  #240048
URxvt-ssh-root.tintColor:   #200C70
URxvt-ssh-root.foreground:  #E89000
URxvt-ssh-root.cursorColor: #E89000
URxvt-ssh-root.iconName:    /usr/local/share/icons/hicolor/scalable/apps/bap-terminal-ssh-sudo-tango.svg

(Naturally, I've replaced the "." in other URxvt resource strings with "*" so that they apply to all versions.)

While I have specified tintColor, the psychic is still not truly happy. tongue For now, I've commented out transparency, and have acceptable, if boring, solid background shells with my preferred color combinations.

The next step will be to try using AUR builds to get the desired customizations. My first candidate is rxvt-unicode-pixbuf-patched. The description claims opacity is fixed. If so, I can let the patched version do all the heavy lifting. Failing that, I'll create the 4 tiles with the desired transparency and try out your suggestion above. Worst case, I can use the tintColor options or just stick with plain old solid colors.

(SMH. I remember when a terminal was a keyboard and monochrome monitor. When did I get so soft and spoiled that I gotta have transparency overlaying fancy background wallpapers and multicolor icons?? We used to have plain old phosphors burning our retinas and we were thankful for the privilege - because the other options were DEC line printers at 110 baud or keypunched cards with next day delivery times for the printouts. tongue)

In the meantime, I've already created the custom .desktop files and include the urxvt options in my helper script. Once I'm happy with the results, it's just a matter of housekeeping to comment out evilvte and gzip the .desktop files (while uncommenting urxvt and gunziping those .desktop files). Then I get to propagate the new versions to the other systems in the house.

Again, thanks for all your help and suggestions, seth! We were able to transform a moment of systemd frustration into an overall improvement in my installation. big_smile

Also, shout out to Lone_Wolf. Your systemd taming efforts are GREATLY appreciated!!!


Any technology distinguishable from magic is insufficiently advanced.
    - Cleon, _Foundation's Fear_

Offline

#7 2025-10-25 01:57:30

barthel
Member
From: Saint Charles, MO
Registered: 2011-07-27
Posts: 24

Re: [SOLVED] urxvt pixbuf -icons

So a quick follow-up with some lessons learned after switching to the AUR rxvt-unicode-pixbuf-patched build.

  • With the official package, only set background if you're not using transparency. If you want to use transparency, use tintColor (or a pixbuf build).

  • Shading works best with a black or white terminal background. You can use it to tweak the appearance of a background pixmap, however I only tested solid-color tiles.

  • If you choose to use tintColor, set shading to 0 or 100, or comment it out. All 3 options yield full transparency. Possible values range from 1 (opaque black) to 200 (opaque white).

  • Use iconFile with a full pathname. SVGs from a theme's scalable folder work well.

Except for my black background local terminal I was unable to duplicate the appearance from either evilvte or mate-terminal.

URxvt*transparent: true
URxvt*shading: 13

!My default uses the same values as my "local" class...
URxvt.background:           #000000
URxvt.foreground:           #C0C0C0
URxvt.cursorColor:          #C0C0C0
URxvt.iconFile:             /usr/local/share/icons/hicolor/scalable/apps/bap-terminal-tango.svg

Technically, I should have used a shading value of 12 to exactly duplicate my evilvte / mate-terminal appearance, but I like 13s. wink

For the shells with non-grayscale backgrounds, I created tiles of the desired color with an 88% layer opacity, exported as PNGs. I achieved an acceptable appearance with shading set to 13. The shell background is dark enough to allow text to be legible, but shows enough of the desktop background to be interesting (to me, at least). For example,

!URxvt-root.background:      #480000
!URxvt-root.tintColor:       #480000
URxvt-root.pixmap:          /usr/local/share/pixmaps/urxvt-bg-root.png;style=tiled
URxvt-root.foreground:      #E89000
URxvt-root.cursorColor:     #E89000
URxvt-root.iconFile:        /usr/local/share/icons/hicolor/scalable/apps/bap-terminal-sudo-tango.svg

For all in tents (and porpoises) tongue, we can flag this thread as solved.

Thanks again to seth for prodding me to follow up on updating my default terminal.

Postscript:
I should probably note that I'm using pseudo-transparency to show the desktop background and ignoring any underlying windows. I have a small script that I run under cron to auto-magically change my desktop to match the season. I can also invoke it manually for realtime changes.

#!/bin/bash

# set_desktop_bg.sh - set PCManFM-Qt's desktop background (and update the bg
#   for evilvte pseudo transparency as well...)

# The Q&D solution is to hard-code the user info.
#   (This also avoids the processing cost of looking up the data every run...)
#
#       HOMEDIR=$(grep $LOGNAME /etc/passwd|cut -d: -f6)
#           (The ~user option doesn't work with variable substitution...)
#       UID=$(grep $LOGNAME /etc/passwd|cut -d: -f3)
#           also UID=$(id -u $LOGNAME)
#
#   NOTE: cron should set $LOGNAME, but may not set $USER

# Require an argument...
if [ -z "$1" ]; then
    echo "Usage: set_desktop_bg.sh filename"
    exit 0
fi

# Only proceed if $1 exists...
if [ ! -f "$1" ]; then
    echo "File not found: $1"
    exit 10
fi

# Quick check for valid image (JPG or PNG)
TYPE=$(file -Lb $1 |cut -d\  -f1)
case $TYPE in
    "JPEG" )    ;;
    "PNG" )     ;;
    * )         echo "Unsupported file type: $TYPE"
                exit 10 ;;
esac

# Convert a relative path to the fully qualified pathname
WALLPAPER=$(realpath $1)

# Export XDG environment for running under a cron job...
export DISPLAY=:0
export XAUTHORITY=$HOME/.Xauthority
export XDG_RUNTIME_DIR=/run/user/$(id -u $LOGNAME)

# Finally, set the wallpaper with both PCManFM-Qt & feh...
pcmanfm-qt --set-wallpaper $WALLPAPER
feh --no-fehbg --bg-scale $WALLPAPER

(The last 2 lines do the actual work. The rest is basic sanity checking...)


Any technology distinguishable from magic is insufficiently advanced.
    - Cleon, _Foundation's Fear_

Offline

Board footer

Powered by FluxBB