You are not logged in.

#1 2012-05-29 23:08:48

maxmackie
Member
From: Ottawa, Canada
Registered: 2012-05-13
Posts: 6
Website

Trying to get dwm, urxvt, transparency to work nicely together

New Arch user here, great distribution.

I've been trying to set up dwm with the Monaco font (great monospace/ttf font) and transparency. As you know, dwm launches uxterm by default as a new terminal. I wanted something with transparency, so I tried urxvt and tried to get it to use "fake" transparency (I could try real transparency, but when I launch xcompmgr I get a plethora of streaming error messages, so I guess I'll have the fake stuff). My ~.Xresources file looks like so:

! URxvt*font: Monaco
URxvt*background: black
URxvt*foreground: white
URxvt*termName: rxvt
URxvt*multichar_encoding: utf-8
URxvt*transparent: true
URxvt*tintColor: white
URxvt*shading: 50
URxvt*loginShell: true
URxvt*scrollBar: false
URxvt*scrollKey: true
URxvt*saveLines: 3000

I grabbed this somewhere from the net. I've commented out the font, because its another issue and I'll address it below. After saving this, and running xrdb -load ~/.Xresources, I try launching urxvt. The colors work fine (background and foreground), but I can't seem to get the transparency working at all. Instead its just a solid color.

As for the font, I installed Monaco from the arch repos. I tried using xlsfonts to get the "name" of the font, but that showed up nothing. Can urxvt use ttf fonts?

Thanks for your help, I'll post anything else anyone needs.

Last edited by maxmackie (2012-05-29 23:41:54)

Offline

#2 2012-05-29 23:18:26

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

This will probably help (it will probably help with your font problems as well). See what it says about using shading and tintColor at the same time.

Also, just for future reference, please use Code tags for posting file content or terminal output.
Like this:

[code]Some text[/code]

Last edited by JackH79 (2012-05-29 23:20:03)

Offline

#3 2012-05-29 23:23:45

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

Re: Trying to get dwm, urxvt, transparency to work nicely together

I'm not sure where dwm comes into play here, but I will give you one of my own grievances: I much prefer "real" transparency because with psuedo-transparency, whenever the layout changes, there seems to be a good bit of lag between to windows changing shape and the pseudo-background being redrawn.  It's ugly as hell - so I use true transparency.  I'm still working, however, on a dwm patch to "hide other" windows in monocle mode, because as is, a true transparent terminal in monocle mode shows other windows below it ... also ugly as hell.

The only saving grace is that I never really use terminals in monocle mode - thats just for my web browser on occasion.

As for the problem at hand, I second Jack's point.  Remove one of those and try again.


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

Offline

#4 2012-05-29 23:32:58

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

Re: Trying to get dwm, urxvt, transparency to work nicely together

Welcome to the boards Max. What took you so long?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2012-05-29 23:55:28

maxmackie
Member
From: Ottawa, Canada
Registered: 2012-05-13
Posts: 6
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

JackH79 wrote:

This will probably help (it will probably help with your font problems as well). See what it says about using shading and tintColor at the same time.

Also, just for future reference, please use Code tags for posting file content or terminal output.
Like this:

[code]Some text[/code]

Thanks for the link. I must have skimmed over too quickly last time. I got the font working, awesome how the wiki uses the font I want as an example smile For the transparency however, no dice. I tried using either only shading or tint, but both of them failed. Just to be 100% certain, I don't need xcompmgr running or anything for this to work right?


Trilby wrote:

I'm not sure where dwm comes into play here, but I will give you one of my own grievances: I much prefer "real" transparency because with psuedo-transparency, whenever the layout changes, there seems to be a good bit of lag between to windows changing shape and the pseudo-background being redrawn.  It's ugly as hell - so I use true transparency.  I'm still working, however, on a dwm patch to "hide other" windows in monocle mode, because as is, a true transparent terminal in monocle mode shows other windows below it ... also ugly as hell.
The only saving grace is that I never really use terminals in monocle mode - thats just for my web browser on occasion.
As for the problem at hand, I second Jack's point.  Remove one of those and try again.

I figured I'd mention dwm seeing as they mention transparency issues out of box (ie, none). I thought maybe running dwm required me to have an extra daemon running or something... I do agree that true transparency would be much nicer, but I'm running into big issues with xcompmgr. Running from shell dumps an endless stream of "error 163: BadPicture request 149 minor 8 serial xxxxx" and running it straight from dmenu results in ugly transparency between different tags in dwm (I have a terminal open on tag 1 and firefox open on tag 2, I can see firefox through the terminal on tag 1). Admittedly, I haven't read into anything regarding xcompmgr so these could all be trivial issues.


jasonwryan wrote:

Welcome to the boards Max. What took you so long?

Hey Jason. Well, a couple years back I saw your awesome screenshot of dwm and decided to switch from KDE to it. I guess recently I felt like going the whole way and running Arch. I loved getting everything up and running manually (nothing like installing an OS and being given only a simple terminal big_smile). Thanks for the welcome.

Offline

#6 2012-05-30 07:41:07

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

I found that I had to restart X sometimes to really get the new stuff loaded from Xresources, especially transparency/no transparency changes. Don't know why, but have you tried that yet? I'm also on DWM


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#7 2012-05-30 08:00:33

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

Not sure if this is still the case, but there used to be some problems with fake transparency on 32 bit colours.
Try to add:

URxvt*depth: 24

and see if that makes a difference.

Last edited by JackH79 (2012-05-30 08:01:13)

Offline

#8 2012-05-30 08:00:46

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Trying to get dwm, urxvt, transparency to work nicely together

The xcompmgr / urxvt combination has an annoying bug on some systems that makes the text-cursor disappear, that's why i stick to pseudo-transparency..


ᶘ ᵒᴥᵒᶅ

Offline

#9 2012-05-30 12:29:08

n1x4
Member
From: Chernobyl
Registered: 2012-02-17
Posts: 149
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

I had the same problem as litemotive with the cursor disappearing but this will fix it.. Yes, you need a compositor running as well. I use compton.

Set your fonts like so to fix the missing cursor:

URxvt.font:  xft:ohsnap:size=10:antialias=false

instead of:

URxvt.font:-*-termsyn-medium-*-*-*-12-*-*-*-*-*-*-*

For true trans:

URxvt.depth: 32
URxvt.background: [80]#111122

Of course #111122 is the color you want your terminal.


||github||

Offline

#10 2012-05-30 21:40:35

maxmackie
Member
From: Ottawa, Canada
Registered: 2012-05-13
Posts: 6
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

Unia wrote:

I found that I had to restart X sometimes to really get the new stuff loaded from Xresources, especially transparency/no transparency changes. Don't know why, but have you tried that yet? I'm also on DWM

Yeah I've rebooted a couple times (I'm also messing around with my config.h so I've restarted X tons of times since)

JackH79 wrote:

Not sure if this is still the case, but there used to be some problems with fake transparency on 32 bit colours.
Try to add:
URxvt*depth: 24
and see if that makes a difference.

Gave that a try, didn't see any change. Thanks though.

litemotiv wrote:

The xcompmgr / urxvt combination has an annoying bug on some systems that makes the text-cursor disappear, that's why i stick to pseudo-transparency..

I haven't had any issues with the cursor disappearing, but then again I haven't gotten transparency to work at all.

n1x4 wrote:

...
For true trans:

URxvt.depth: 32
URxvt.background: [80]#111122

Of course #111122 is the color you want your terminal.

I tried this too, no dice sad

I'm going to give true transparency a try and patch my dwm with the transparency patch. Maybe I'll have better luck with that.

Offline

#11 2012-05-30 22:17:22

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

Re: Trying to get dwm, urxvt, transparency to work nicely together

I'd skip the transparency patch, this basically does the same thing as transet-df (btw have you checked that out?)

There are actually three flavors of transparency for a terminal, and I'll list them from worst to best (IMHO):
1) pseudo transparency: the window grabs the root window image and redraws part of it.
2) "true" window transparency: no grabbing of root window images, instead the whole window is made transparent at the WM level.  This would be where dwm's transparency patch and transset-df both work.
3) "true" cleint transparency: URxvt with 32 bit depth sets the background to be semi transparent while still having text rendered at full opacity.  This is *much* better in my opinion, otherwise at higher transparencies you start loosing the text in your terminal.  This generally works quite well in urxvt, but it requires a composite manager (xcompmgr).

Since both 2 and 3 require a composite manager, and you are going to work on getting xcompmgr working, I'd say go with 3.  It's much nicer, and much easier to set up if you're going to have to solve your xcompmgr problem either way.

On that, there are many variants of xcompmgr in the AUR.  I had to use xcompmgr-dana for a while, though I don't recall what the issue was that lead me to it.  Now the regular xcompmgr is working well here with urxvt and dwm.


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

Offline

#12 2012-05-31 09:30:29

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

Trilby wrote:

Since both 2 and 3 require a composite manager, and you are going to work on getting xcompmgr working, I'd say go with 3.  It's much nicer, and much easier to set up if you're going to have to solve your xcompmgr problem either way.

On that, there are many variants of xcompmgr in the AUR.  I had to use xcompmgr-dana for a while, though I don't recall what the issue was that lead me to it.  Now the regular xcompmgr is working well here with urxvt and dwm.

xcompmgr was buggy for me so I replaced it with the lesser known compton. It's a perfect composite manager, forked from xcompmgr and has solved some bugs that xcompmgr still has. Just wanted to throw that out here big_smile


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#13 2012-05-31 10:02:07

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Trying to get dwm, urxvt, transparency to work nicely together

Unia wrote:

xcompmgr was buggy for me so I replaced it with the lesser known compton. It's a perfect composite manager, forked from xcompmgr and has solved some bugs that xcompmgr still has. Just wanted to throw that out here big_smile

Hmm, compton causes tearing when i scroll pages in Chromium... sad


ᶘ ᵒᴥᵒᶅ

Offline

#14 2012-05-31 10:29:21

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

Strange, not for me - for me it's xcompmgr that did that


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#15 2012-05-31 10:37:26

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Trying to get dwm, urxvt, transparency to work nicely together

Unia wrote:

Strange, not for me - for me it's xcompmgr that did that

When i disable Chromium GPU rendering the tearing disappears, but scrolling is a lot less smooth. Enabling "Smooth scrolling" in about:flags improves this a bit, but it's not nearly as smooth as GPU rendering without compton.


ᶘ ᵒᴥᵒᶅ

Offline

#16 2012-05-31 14:43:33

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

litemotiv wrote:
Unia wrote:

Strange, not for me - for me it's xcompmgr that did that

When i disable Chromium GPU rendering the tearing disappears, but scrolling is a lot less smooth. Enabling "Smooth scrolling" in about:flags improves this a bit, but it's not nearly as smooth as GPU rendering without compton.

EDIT: I do have it, so nvm

Last edited by Unia (2012-05-31 14:48:34)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#17 2012-06-01 00:26:38

maxmackie
Member
From: Ottawa, Canada
Registered: 2012-05-13
Posts: 6
Website

Re: Trying to get dwm, urxvt, transparency to work nicely together

Thanks for all the ideas. I've decided to start tackling the xcompmgr issue. I'm also looking into compton. I guess I'll make a thread about those issues to keep them separate (I'm coming from the StackExchange network -- MUST STAY ON TOPIC!) big_smile

Offline

Board footer

Powered by FluxBB