Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
transset on window open
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Fri Dec 23, 2005 10:50 pm    Post subject: transset on window open Reply with quote

I just got composite working fairly stable on my XFCE desktop (with the new nvidia drivers). I am liking the new eye candy, but am wondering if there is a way to have applications open up at certain opacity levels by default instead of opening the application and running transset to make it transparent.

Last edited by sirdilznik on Sat Jan 07, 2006 11:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
Erlend
Guru
Guru


Joined: 26 Dec 2004
Posts: 493

PostPosted: Sat Dec 24, 2005 10:36 am    Post subject: Reply with quote

~/.config/xfce4/xfwm4/xfwm4rc controls the Xfwm composite manager. There are some details: http://phobos.cs.msu.su/HTML/xfce4-fm-4.2.1/_usr_X11R6_share_xfce4_doc_C/xfwm4.html

You probably want to try move_opacity=70.

I've heard a bit about the Xfce composite manager being quite unstable. The next version will probably be more customisable.
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Sat Dec 24, 2005 4:04 pm    Post subject: Reply with quote

Erlend wrote:
~/.config/xfce4/xfwm4/xfwm4rc controls the Xfwm composite manager. There are some details: http://phobos.cs.msu.su/HTML/xfce4-fm-4.2.1/_usr_X11R6_share_xfce4_doc_C/xfwm4.html

You probably want to try move_opacity=70

I entered:
Code:
move_opacity=.75
resize_opacity=.75

into ~/.config/xfce4/xfwm4/xfwm4rc. Now the windows go semi-transparent when I move or resize them, but open up as fully solid and return to that state when not being moved or resized. Not exactly what I was looking for, but it's a start. Thanks Erlend.
I wonder if there is a open_opacity option... I did not see it in the xfwm4 documentation....
Also you are right about the xfce composite manage being a bit buggy. I've hard locked the system a couple of times (trying to run bmp-libvisual, and opening nedit), but I'm not worried because I'm running reiser4 and don't have to worry about data loss/coruption on hard locks. I'm in the process of upgrading to xfce4-4.2.3.2 to see if it will help any (dang, that's a lot of stuff to unmask)
Back to top
View user's profile Send private message
Erlend
Guru
Guru


Joined: 26 Dec 2004
Posts: 493

PostPosted: Sat Dec 24, 2005 4:45 pm    Post subject: Reply with quote

Yeah tell me if that helps please. I might upgrade if it does.

Look at this thread: https://forums.gentoo.org/viewtopic.php?p=2979774#2979774

Erlend
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Sat Dec 24, 2005 5:04 pm    Post subject: Reply with quote

No, the update to xfce4-4.2.3.2 did not solve the bugs. I still get the hard locks. I have disabled composite in xorg.conf for the time being (I use nedit a lot and can't afford to have my comp. hard lock every time I open it) and everything works fine. Maybe if I find a different graphical simple text editor to use I will try composite again. I will definitely try composite again when xfce4-4.4 comes out.
Back to top
View user's profile Send private message
Erlend
Guru
Guru


Joined: 26 Dec 2004
Posts: 493

PostPosted: Sat Dec 24, 2005 5:07 pm    Post subject: Reply with quote

AFAIK Kde 3.5 currently holds the crown for composite manager. It has some fancy feature where only the window in-focus has 100% opacity.
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Sat Jan 07, 2006 10:59 pm    Post subject: Reply with quote

*shameless bump*

I have still not found an answer to this issue. Can windows be started with a certain transparency setting? I have tried piping the output of the transset command to the application startup script and vice-versa.
Code:
transset .75 | rox

Code:
rox | transset .75
That did not work. The changes I have made since my original post and now is that I'm running e17 with the xfce4-panel now instead of XFCE. Also I am running xcompmgr now instead of XFCE's own composite manager (xcompmgr is far more stable). Still the issue remains the same. Any ideas?
Back to top
View user's profile Send private message
jettjunker
Apprentice
Apprentice


Joined: 10 Sep 2005
Posts: 267

PostPosted: Tue Jan 10, 2006 8:12 am    Post subject: Reply with quote

You can use devilspie to do this instead (and many other neat things).

Just emerge devilspie
create .devilspie.xml in your home directory
then just have devilspie start at startup (but after xcompmgr - though I am not sure if this is necessary)

Here is a working .devilspie.xml
Code:
<?xml version="1.0"?>
<!DOCTYPE devilspie SYSTEM "devilspie.dtd">

<!-- The root element is devilspie -->
<devilspie>

  <flurb>
    <matchers>
      <matcher name="DevilsPieMatcherWindowName">
        <property name="application_name" value="Firefox"/>
      </matcher>
    </matchers>
    <actions>
      <action name="DevilsPieActionOpacity">
        <property name="opacity" value="0.9"/>
      </action>
    </actions>
  </flurb>

  <flurb name="Print Window Names">
      <matchers>
         <matcher name="DevilsPieMatcherAlways"/>
      </matchers>
      <actions>
         <action name="DevilsPieActionDebug"/>
      </actions>
   </flurb>

</devilspie>


The first "flurb" sets the transparency for firefox to .9, and the latter will allow you to figure out the 'Application Name' of your favorate programs. Just run devilspie from a terminal and it will output the names of everything you have open, and whatever you open up while it is running. When you figure out all your applications that you want to have transparency just copy the Firefox "flurb" as many times as needed and replace "Firefox" with whatever you want, and change your opacity to whatever you want for that program.

names of programs I have set: Firefox ; File Manager ; gkrellm2 ; jason@localhost:~ ; XMMS ; Xmms ; Drawer ; thunderbird-bin ; SWT

SWT = azureus. XMMS = player, and Xmms = playlist.

Just a few general notes...
this still requires Composite (howto: http://gentoo-wiki.com/TIP_Xorg_X11_and_Transparency )
If you want transparent panels in gnome, I think you need to name them. go into configuration editor -> apps -> panel -> toplevel, then figure out which ones you are using and name them.
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Tue Jan 10, 2006 8:38 am    Post subject: Reply with quote

Well I emerged devilspie-0.10 and copied your xml file to my home directory. Unfortunately when I run devilspie from a terminal it doesn't print out anything. I have no experience writing xml files so I will google around to try to find a howto
Back to top
View user's profile Send private message
s0ulslack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2003
Posts: 134
Location: Idaho

PostPosted: Tue Jan 10, 2006 9:19 am    Post subject: setting auto trans Reply with quote

Actually, there is transd and trans-inactive for xfce. both utils wrote by an xfce dev, transd (a daemon running in the background) can set transparency defaults for open apps/matching new windows... this is much simpler then devilspie, you set the trans per WM_CLASS... takes 2 lines.

trans-inactive is just a deamon that sits in the background and sets all inactive windows to a user specified transparency. this is great, only focused windows have full display. xfce is great, watch out for 4.4 :)
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Tue Jan 10, 2006 9:41 am    Post subject: Re: setting auto trans Reply with quote

s0ulslack wrote:
Actually, there is transd and trans-inactive for xfce. both utils wrote by an xfce dev, transd (a daemon running in the background) can set transparency defaults for open apps/matching new windows... this is much simpler then devilspie, you set the trans per WM_CLASS... takes 2 lines.

trans-inactive is just a deamon that sits in the background and sets all inactive windows to a user specified transparency. this is great, only focused windows have full display. xfce is great, watch out for 4.4 :)
That would be great... if I was still using XFCE, but I'm not (though I'll give it another try when 4.4 comes out). I'm running e17 with the xfce4-panel (as stated a couple of posts ago). Thanks for the info. though :)
Back to top
View user's profile Send private message
jettjunker
Apprentice
Apprentice


Joined: 10 Sep 2005
Posts: 267

PostPosted: Wed Jan 11, 2006 4:31 am    Post subject: Reply with quote

sirdilznik wrote:
Well I emerged devilspie-0.10 and copied your xml file to my home directory. Unfortunately when I run devilspie from a terminal it doesn't print out anything. I have no experience writing xml files so I will google around to try to find a howto


Hmm... I am sorry if I forgot to mention anything that needs to be done -- I installed it a long time ago (but just started using it for trans yesterday)

Are you sure you have it running at all when you type it in terminal? If it is, do you even get Firefox to be transparent using that xml? (or if you don't use Firefox, try any/several of the programs I listed to see if you get them working. (note: My terminal transparency {jason@localhost:~} is very inconsistent, and I have not figured out why yet. So try other things.)

If the transparency is working then it is just a matter of figuring out the names of things, and I'm sure many people could help with that... though it is weird that you aren't getting the debug output, so I am guessing devilspie isn't even finding the xml.
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Wed Jan 11, 2006 5:27 am    Post subject: Reply with quote

I am pretty sure that devilspie is finding the xml because the first time I forgot to put the (.) in front of devilspie.xml and it threw out an error message. Once I corrected the problem it stopped showing the error message. Unfortunately I do not use Firefox, I use Firefox-bin (I am running 64-bit). I do not use any of the programs on your list. I'll look around and try to find out what's wrong when I have more time (this is not high on my list of priorities). Thanks for the help ! :D

EDIT: The more I look into devilspie the more it seems like it is made to be used with Gnome only. If I am wrong about this would someone please correct me?
Back to top
View user's profile Send private message
gravedigga_23
Apprentice
Apprentice


Joined: 11 Oct 2005
Posts: 166
Location: Oldenburg

PostPosted: Sun Jan 15, 2006 12:31 pm    Post subject: Reply with quote

Quote:

AFAIK Kde 3.5 currently holds the crown for composite manager. It has some fancy feature where only the window in-focus has 100% opacity.

i dont think so! the xfce composite manager is definitly the best! just google a little bit, there are nice source code hacks!
i have fade in fade out effekt and general transparency enabled, also nice window shadows, with good performance.
i tried kcompr but the performance was bad! it was simple configurable but slow
Back to top
View user's profile Send private message
jettjunker
Apprentice
Apprentice


Joined: 10 Sep 2005
Posts: 267

PostPosted: Wed Jan 18, 2006 3:54 am    Post subject: Reply with quote

sirdilznik wrote:
EDIT: The more I look into devilspie the more it seems like it is made to be used with Gnome only. If I am wrong about this would someone please correct me?


I can't be certain (because I happen to use gnome) but I did a search for "xfce devilspie" (without quotes) and found several threads that say you can use devilspie in xfce. Topics 405792, 215740, and 166582 for example.


On a related note: I havn't figured out precisely where the problem is (composite or devilspie using it), but my memory isn't being released properly; X ends up filling my mem and swap. The easiest way is to just turn on my screen saver (which cycles every minute) and in a 3 hours my mem and swap will be full, and X will be using most of it. I know it isn't devilspie alone because I have been using it for months for other reasons. However, if I don't have devilspie setting transparency then I do not have any memory issues... Just a word of warning, even though I havn't seen anyone else with this problem. It may just be me considering all of the things I have done to my computer recently.
Back to top
View user's profile Send private message
Erlend
Guru
Guru


Joined: 26 Dec 2004
Posts: 493

PostPosted: Wed Jan 18, 2006 12:29 pm    Post subject: Reply with quote

Quote:
i dont think so! the xfce composite manager is definitly the best! just google a little bit, there are nice source code hacks!
i have fade in fade out effekt and general transparency enabled, also nice window shadows, with good performance.
i tried kcompr but the performance was bad! it was simple configurable but slow

I've googled "xfce xcomposite" but all that comes up is how buggy the xfce composite manager is. Mainly from the ubuntu forums. Could you tell me what you searched please?

My flatmate is running kde 3.4 with nVidia Geforce 5200 FX and it's fantastic. It's a little unstable though - window resizing messes up a bit, but i think that's just an old version of xorg-x11.
Back to top
View user's profile Send private message
gravedigga_23
Apprentice
Apprentice


Joined: 11 Oct 2005
Posts: 166
Location: Oldenburg

PostPosted: Wed Jan 18, 2006 12:59 pm    Post subject: Reply with quote

yeah of course here is a little link list, if u need help just ask!
https://forums.gentoo.org/viewtopic-t-280639-postdays-0-postorder-asc-start-200.html
http://bugzilla.xfce.org/show_bug.cgi?id=666
http://bugzilla.xfce.org/show_bug.cgi?id=602
http://forum.xfce.org/index.php?topic=2089.0
http://bbs.archlinux.org/viewtopic.php?t=13779
Back to top
View user's profile Send private message
rhale314159
n00b
n00b


Joined: 14 Dec 2003
Posts: 41
Location: East US

PostPosted: Sat Jan 21, 2006 9:59 pm    Post subject: xfce transparent windows patch Reply with quote

Here is a quick and dirty hack to allow a user make a window transparent by double clicking on its' tittle bar:

Code:

diff -bBr -C 3 --exclude=Makefile xfwm4-4.2.3.2/mcs-plugin/xfwm4_plugin.c xfwm4-4.2.3.2.new/mcs-plugin/xfwm4_plugin.c
*** xfwm4-4.2.3.2/mcs-plugin/xfwm4_plugin.c   Tue Nov 15 11:58:23 2005
--- xfwm4-4.2.3.2.new/mcs-plugin/xfwm4_plugin.c   Sat Jan 21 20:34:13 2006
***************
*** 86,91 ****
--- 86,92 ----
      {N_("Shade window"), "shade"},
      {N_("Hide window"), "hide"},
      {N_("Maximize window"), "maximize"},
+     {N_("Toggle Transparent/Opaque window"), "transparent"},
      {N_("Nothing"), "none"},
      {NULL, NULL}
  };
***************
*** 1823,1829 ****
      gtk_box_pack_start (GTK_BOX (vbox3), frame, TRUE, TRUE, 0);
 
      xfce_framebox_add (XFCE_FRAMEBOX (frame),
!         create_option_menu_box (dbl_click_values, 4,
              _("Action to perform when double clicking on title bar :"), dbl_click_action, G_CALLBACK (cb_dblclick_action_value_changed), mcs_plugin));
 
      label = gtk_label_new (_("Advanced"));
--- 1825,1831 ----
      gtk_box_pack_start (GTK_BOX (vbox3), frame, TRUE, TRUE, 0);
 
      xfce_framebox_add (XFCE_FRAMEBOX (frame),
!         create_option_menu_box (dbl_click_values, 5,
              _("Action to perform when double clicking on title bar :"), dbl_click_action, G_CALLBACK (cb_dblclick_action_value_changed), mcs_plugin));
 
      label = gtk_label_new (_("Advanced"));
diff -bBr -C 3 --exclude=Makefile xfwm4-4.2.3.2/src/client.c xfwm4-4.2.3.2.new/src/client.c
*** xfwm4-4.2.3.2/src/client.c   Tue Nov 15 11:55:19 2005
--- xfwm4-4.2.3.2.new/src/client.c   Sat Jan 21 20:34:13 2006
***************
*** 1520,1525 ****
--- 1520,1526 ----
 
      /* Opacity for compositing manager */
      c->opacity = NET_WM_OPAQUE;
+     c->is_opaque = TRUE;
      getOpacity (display_info, c->window, &c->opacity);
 
      /* Timeout for blinking on urgency */
***************
*** 2345,2350 ****
--- 2346,2378 ----
      }
  }
 
+
+ void
+ clientToggleTransparent (Client * c)
+ {
+     ScreenInfo *screen_info = NULL;
+     DisplayInfo *display_info = NULL;
+
+     TRACE ("entering clientTransparent");
+
+     screen_info = c->screen_info;
+     display_info = screen_info->display_info;
+
+     if(c->is_opaque)
+     {
+         c->is_opaque = FALSE;
+ /*        compositorWindowSetOpacity (display_info, c->frame, (guint) (c->opacity * (double)0.5));*/
+         compositorWindowSetOpacity (display_info, c->frame, (guint) (c->opacity * (double) (screen_info->params->click_opacity / 100.0)));
+     }
+     else
+     {
+         c->is_opaque = TRUE;
+         compositorWindowSetOpacity (display_info, c->frame, c->opacity);
+     }
+ }
+
+
+
  void
  clientUnshade (Client * c)
  {
diff -bBr -C 3 --exclude=Makefile xfwm4-4.2.3.2/src/client.h xfwm4-4.2.3.2.new/src/client.h
*** xfwm4-4.2.3.2/src/client.h   Tue Nov 15 11:55:19 2005
--- xfwm4-4.2.3.2.new/src/client.h   Sat Jan 21 20:34:13 2006
***************
*** 252,257 ****
--- 252,258 ----
      ClientPixmapCache pm_cache;
      /* Opacity for the compositor */
      guint opacity;
+     int is_opaque;
 
  #ifdef HAVE_LIBSTARTUP_NOTIFICATION
      /* Startup notification */
***************
*** 299,304 ****
--- 300,306 ----
  void     clientShade (Client *);
  void     clientUnshade (Client *);
  void     clientToggleShaded (Client *);
+ void     clientToggleTransparent (Client *);
  void     clientStick (Client *, gboolean);
  void     clientUnstick (Client *, gboolean);
  void     clientToggleSticky (Client *, gboolean);
diff -bBr -C 3 --exclude=Makefile xfwm4-4.2.3.2/src/events.c xfwm4-4.2.3.2.new/src/events.c
*** xfwm4-4.2.3.2/src/events.c   Tue Nov 15 11:55:19 2005
--- xfwm4-4.2.3.2.new/src/events.c   Sat Jan 21 20:34:13 2006
***************
*** 712,717 ****
--- 712,720 ----
              case ACTION_SHADE:
                  clientToggleShaded (c);
                  break;
+             case ACTION_TRANSPARENT:
+                 clientToggleTransparent (c);
+       break;
              case ACTION_HIDE:
                  if (CLIENT_CAN_HIDE_WINDOW (c))
                  {
diff -bBr -C 3 --exclude=Makefile xfwm4-4.2.3.2/src/settings.c xfwm4-4.2.3.2.new/src/settings.c
*** xfwm4-4.2.3.2/src/settings.c   Tue Nov 15 11:55:19 2005
--- xfwm4-4.2.3.2.new/src/settings.c   Sat Jan 21 20:34:13 2006
***************
*** 1117,1122 ****
--- 1117,1123 ----
          {"margin_top", NULL, FALSE},
          {"move_opacity", NULL, TRUE},
          {"resize_opacity", NULL, TRUE},
+         {"click_opacity", NULL, TRUE},
          {"prevent_focus_stealing", NULL, TRUE},
          {"raise_delay", NULL, TRUE},
          {"raise_on_click", NULL, TRUE},
***************
*** 1261,1266 ****
--- 1262,1269 ----
          abs (TOINT (getValue ("move_opacity", rc)));
      screen_info->params->resize_opacity =
          abs (TOINT (getValue ("resize_opacity", rc)));
+     screen_info->params->click_opacity =
+         abs (TOINT (getValue ("click_opacity", rc)));
 
      screen_info->params->snap_to_border =
          !g_ascii_strcasecmp ("true", getValue ("snap_to_border", rc));
***************
*** 1285,1290 ****
--- 1288,1297 ----
      {
          screen_info->params->double_click_action = ACTION_MAXIMIZE;
      }
+     else if (!g_ascii_strcasecmp ("transparent", getValue ("double_click_action", rc)))
+     {
+         screen_info->params->double_click_action = ACTION_TRANSPARENT;
+     }
      else
      {
          screen_info->params->double_click_action = ACTION_NONE;
diff -bBr -C 3 --exclude=Makefile xfwm4-4.2.3.2/src/settings.h xfwm4-4.2.3.2.new/src/settings.h
*** xfwm4-4.2.3.2/src/settings.h   Tue Nov 15 11:55:19 2005
--- xfwm4-4.2.3.2.new/src/settings.h   Sat Jan 21 20:34:13 2006
***************
*** 127,132 ****
--- 127,133 ----
  #define ACTION_MAXIMIZE                 1
  #define ACTION_SHADE                    2
  #define ACTION_HIDE                     3
+ #define ACTION_TRANSPARENT              4
 
  struct _XfwmColor
  {
***************
*** 153,158 ****
--- 154,160 ----
      int double_click_action;
      int move_opacity;
      int resize_opacity;
+     int click_opacity;
      int raise_delay;
      int snap_width;
      int shadow_delta_x;


To apply this patch untar xfwm4-4.2.3.2,tar,gz then cd into xfwm4-4.2.3.2/
Copy the above diff code into a file, save as xfwm4.diff in current directory
Then do:
Code:
patch -p1 -b <xfwm4.diff


Now do ./configure --prefix=your prefix --enable-randr --enable-compositor, make, su and make install
To enable and set the transparency edit ~/.config/xfce4/xfwm4/xfwm4rc and add the line:
Code:
click_opacity=50


Restart xfce4, open up the settings manager->window manager->advanced tab->double click action->toggle transparent/opaque

Seems to work very well with Exa and is useful when looking for small windows obscured by a large window.
Back to top
View user's profile Send private message
gravedigga_23
Apprentice
Apprentice


Joined: 11 Oct 2005
Posts: 166
Location: Oldenburg

PostPosted: Sun Jan 22, 2006 12:18 pm    Post subject: Reply with quote

:D
this patch is great!
Back to top
View user's profile Send private message
mhornnt
n00b
n00b


Joined: 22 Dec 2005
Posts: 49

PostPosted: Wed Feb 08, 2006 9:49 pm    Post subject: Reply with quote

s0ulslack- where did you find those two daemons, transd and trans-inactive? that trans-inactive one sounds like jsut what i'm looking for
Back to top
View user's profile Send private message
mahdi
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2003
Posts: 128
Location: Dallas TX

PostPosted: Mon Feb 20, 2006 5:57 am    Post subject: Reply with quote

http://spuriousinterrupt.org/files/xfce4/trans-inactive.c

That's the code for it and in it tells how to compile it, I just tried this and am restarting xfce now to see if it works ;)

Works and doesn't need an xfce restart since it's an independant app running in the background, start it manually or put it in your startup.

The transparency is hard coded, to change it you need to change it in the code and recompile. (it's commented near the begining, easy to find)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum