You are not logged in.
Hi,
I would like to know if it's possible to auto apply transset to all terminal windows.
x5x_tim
Offline
A simple (but not too elegant) solution using xdotool:
while true; do for wid in $(xdotool search --class XTerm); do transset-df --id $wid 0.85 &>/dev/null; done; sleep 0.1; done
If you use something other than xterm, find out the --class argument to xdotool by using:
xprop WM_CLASS
and click on your terminal. Use the second string reported.
Last edited by hbekel (2010-06-14 19:34:44)
Offline
Thanks, that works.
By not too elegant, did you mean 'take up 30% of your CPU'-non elegant?
The reason I came to Arch is mainly because I like having a 0% load when I am not really doing much but browing and IM.
Offline
you could use wmctrl -l | awk to find all your terminal's winid's and apply the transset-df command to each. you could also write a wrapper script to act as your terminal. this wrapper could launch a term and (re)apply the transparencies. i alway try to avoid while true loops idling in the background...
seems easier to just use urxvt + Xdefaults though...
//github/
Offline
How do I get urcvt, I'm quite new, and I can't find it with pacman.
Offline
Thanks, that works.
By not too elegant, did you mean 'take up 30% of your CPU'-non elegant?
Exactly It was just the first thing that came to mind... it's probably simpler to do what brisbin33 suggests.
Offline
If you still want to use xterm and transset, i wrote a (rather useless) bash script tairu, that uses a small c-application (tairu_notify) which does nothing but waiting until a new window is opened or closed, the source-code can be found here (can be compiled with gcc -lX11 tairu_notify.c -o outputname). So
while :; do
tairu_notify
for wid in $(xdotool search --class XTerm); do
transset-df --id $wid 0.85 &>/dev/null
done
done
only checks for new xterms, if a new window is opened or closed.
If you change line 16 in tairu_notify.c to
if (e.type == CreateNotify) {
it will only check, if a new window is created.
Offline
@portix: That's what I was looking into, too, but I didn't get very far with my limited c. Thanks for posting!
Offline
yeas devilspie (extra/devilspie) look like the correct solution for me I have this
(if
(matches (window_class) "URxvt")
(begin
(spawn_async (str "transset-df -i " (window_xid) " .95" ) )
)
)
And never noticed any cpu usage. (and have another 6 or so files like this)
Last edited by kazuo (2010-06-14 23:52:15)
Offline
x5x_tim wrote:How do I get urcvt, I'm quite new, and I can't find it with pacman.
hehe, you could [spell it right, and] search the wiki .
Thank you, I tried pacman -S urxvt, but the package was called rxvt-unicode. I am going to try this, the config I found in you sig looks cool.
Offline