Topic: Compositing

Is there any way to change the behavior of compositing effects?  Removing the fade effect perhaps or adding other compositing features?

Cheers.

Re: Compositing

gnome-settings-visualeffects has some control over it I believe, i'm not entirely sure how much though...

Arch64/Xmonad | @mo6020 on Identica

"Every normal man must be tempted at times to spit on his hands, hoist the black flag, and begin to slit throats." - H. L. Mencken

Re: Compositing

You can add automatic transparency changing for active/inactive windows. First, you'll need transset-df, then you'll need the following perl script, created by a member of the Binary Revolution forums and referred to as focustran.pl:

#!/usr/bin/perl -w

# This script is written by Andrei Perhinschi
# and is licensed under the GNU GPL license
# http://www.gnu.org/licenses/gpl.html

# Much thanks goes to Daniel Forchheimer (http://www.forchheimer.se/)
# for creating transset-df and the eutotrans
# script from which this script gets its inspiration

if ( !defined $ARGV[0] || !defined $ARGV[1] || !defined $ARGV[2] ) {
die "Usage: focustran <unfocused value> <focused value> <refresh value (secs)>\n";
}

# default values
$trans_val = $ARGV[0];
$opaque_val = $ARGV[1];
$sleep_val = $ARGV[2];

# grab all window IDs
@win_ids = `xwininfo -root -all`;
foreach my $win_id ( @win_ids ) {
unless ( $win_id =~ /has\ no\ name/ || $win_id !~ /0x/ || $win_id =~ /Desktop/ ) {
 $win_id =~ /\ \"/;
 $win_id = "$`";
 $win_id =~ s/\s//g;
 push @id_lines, $win_id;
 }
}

print "ID_LINES:@id_lines\n";

# make all windows transparent
foreach my $win_id ( @id_lines ) {
system ( "transset-df --id $win_id $trans_val" );
}

$old_id = 0;
# get currently focused window's ID
while ( 1 ) {
my $active_id = `xprop -root  | grep "_NET_ACTIVE_WINDOW(WINDOW): window id # "`;
$active_id =~ /\#\s/;
$active_id = "$'";
chomp $active_id;
# set active window to opaque_val and old window to trans_val
if ( $old_id ne $active_id ) {
 system ( "transset-df --id $active_id $opaque_val" );
 system ( "transset-df --id $old_id $trans_val" );
 }
$old_id = $active_id;
print "active_ID:$active_id\n";
select ( undef, undef, undef, $sleep_val );
}

You use it like this

perl focustran.pl <value to make transparent windows> <value to make opaque windows> <value to wait between loops> (I recommend 0.3-0.4)

I hope that helps. It'd be cool to see those in #! 9.04, heh.

Last edited by scythe (2009-02-27 10:09:01)

Re: Compositing

taintedsushi wrote:

Is there any way to change the behavior of compositing effects?  Removing the fade effect perhaps or adding other compositing features?

Hello taintedsushi smile

Compositing is handled by xcompmgr. It is possible to change its behaviour by modifying the arguments with which you call it. For more information about the available arguments, enter the following command in your terminal:

man xcompmgr

Hope this helps!

@scythe: Whoa, nice script, thank you for sharing, I will be sure to check it out. smile

Re: Compositing

Thanks,

That helps alot   \^_^/

Re: Compositing

Here's probably a stupid question ...

Why do I sometimes see a bunch of static like you're changing the TV channel before a dialog or popup appears? Only happens with composting on.  I noticed also with compiz as well under ubuntu.

Re: Compositing

I get that with the default compositing settings used by #! as well, haven't bothered to see which effect is causing it but if I just manually launch xcompmgr I don't have the static.

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Re: Compositing

Hmmm...Interesting.  I launch it from autostart.sh and still get it.  Maybe it has something to do with what effects are being used or one of the command line settings.  What launch string are you using?

Re: Compositing

if your using the default autostart setting it is using the #! settings:

xcompmgr -cCfF -t-5 -l-5 -r4.2 -o.55 -D6

I just launch:

xcompmgr

and I don't get the bad effects, need to see which effect is causing it.

edit: if you still want to use the crunchbang launcher you can edit /usr/bin/crunchbang/xcompmgr-crunchbang to change the settings there

edit again: testing it out and I realized it still does it, just with the default settings it's fast enough I didn't notice before

Last edited by iggykoopa (2009-02-28 19:41:17)

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Re: Compositing

scythe wrote:

You can add automatic transparency....

Nice script. I'm using 0.9 1 0.1 which gives just a little transparency on unfocused windows and a very fast transition.

I blog too much....       geek stuff LinuxMintDebian | linux noob stuff LinuxMintNoob | spiritual stuff Daily Cup of Tao