Page 3 of 4

Posted: Mon 23 Apr 2012, 10:44
by Argolance
Hello,
Example:
#!/bin/sh

export test="
<window>
<button image-position=\"2\" can-focus=\"no\" relief=\"2\">
<input file>/usr/local/lib/X11/pixmaps/home48.png</input>
<label>Filer</label>
<action>rox &</action>
</button>
</window>
"
gtkdialog --program=test --gtk-module=gtk2desklet --center
Console:
(gtkdialog:1301): Gtk-CRITICAL **: IA__gtk_widget_set_default_colormap: assertion `GDK_IS_COLORMAP (colormap)' failed
Please, what's wrong in this test script?

EDIT
While testing (Racy 5.3), I noticed:
  • - my wm is jwm and the script above finally works only after restarting jwm!
    - when translucency effects activated (kcompmgr), taskbar disappears and system freezes => restart X
Cordialement.

Posted: Mon 23 Apr 2012, 11:44
by vovchik
Dear Argolance,

Your script works with ICEWM except that it is always on top....

With kind regards,
vovchik

Posted: Mon 23 Apr 2012, 13:32
by Geoffrey
Argolance,

The script works fine after I changed rox to Thunar in Saluki xfce with true transparency, no errors when run from the terminal.

I'm sure this is what it should look like.

Geoffrey

Posted: Mon 23 Apr 2012, 17:51
by Argolance
Hello,
Thank you for testing/replying...
This is exactly what I was expecting for!
But my final script (build on the test script model above) has necessarily to work with jwm and x/kcompmgr... :cry:
This unfortunately seems not to be possible?

Cordialement.

Posted: Mon 02 Jul 2012, 18:54
by akash_rawal
Upgraded to version 3.1

Changelog:
  • Window searching code replaced by a crazy hack in GObject class structure.
  • Fixed broken compatibility with jwm

Posted: Sat 21 Jul 2012, 21:11
by brokenman
Is it possible to get the transparency even during the mouseover?

Posted: Sun 22 Jul 2012, 09:57
by akash_rawal
brokenman wrote:Is it possible to get the transparency even during the mouseover?
It's possible, but you have to do extra hardwork of writing gtkrc files and use them using DESKLET_GTKRC_FILES environment variable.
DESKLET_GTKRC_FILES
  • This variable can contain extra GTK resource files (many people call these
    theme files) without affecting any subprocesses. File names are separated
    by a pipe character '|'.
The trick is to use transparent images as widget background.

Posted: Sun 22 Jul 2012, 10:15
by Argolance
Hello,
Great!
- my wm is jwm and the script above finally works only after restarting jwm!
- when translucency effects activated (kcompmgr), taskbar disappears and system freezes => restart X
Now, this works without restarting jwm and system doesn't freeze anymore: scripts windows are just not displayed at all till translucency/shadow effects are deactivated.

I well understand that window full transparency cannot be "married" with translucency and shadow effects but perhaps this could be by-passed this way:
Create a little script called "gtk2desklet" and rename the original into gtkdesklet_ for example. gtk2desklet looks if x/kcompmgr is currently running or not, then calls gtkdesklet_ or not according to the result?

Don't know if this could work and be useful?

Cordialement.

Posted: Sun 22 Jul 2012, 10:58
by Argolance
Hello,
I well understand that window full transparency cannot be "married" with translucency and shadow effects but perhaps this could be by-passed this way:
Create a little script called "gtk2desklet" and rename the original into gtkdesklet_ for example. gtk2desklet looks if x/kcompmgr is currently running or not, then calls gtkdesklet_ or not according to the result?
I guess I didn't well understand :oops: ... Things are much more complex: gtk2desklet works even when x/kcompmgr is running but scripts window disappear as soon as a new window (application or rox filer window) is opened... on the same virtual desk... This doesn't happen if script is launched on an other empty one.
I was wondering if gtk2desklet could not get extra options (gtk2desklet -option) that could let user choose if script is visible or not inside the taskbar, if it is displayed at the top or bottom level of the screen and on all virtual desktops or not. So, your application could perhaps be used for something else than "desklets" too? I think for example of splash windows for applications, progress bars and so on...

Cordialement.

Posted: Sun 22 Jul 2012, 17:17
by akash_rawal
Maybe it will work with xcompmgr if you force use of pseudotransparency with xcompmgr by exporting variable DISABLE_RGBA_TRANS something like this:

Code: Select all

export DISABLE_RGBA_TRANS="1"
gtkdialog --program=test --gtk-module=gtk2desklet --center
With jwm you should ensure that rox-filer options > compatibility > Override window manager control of pinboard and panel is enabled.

Posted: Mon 23 Jul 2012, 12:45
by brokenman
Thanks. Looks like i was on the right track with a gtkrc file ... however i wasn't aware of the gtk2desklet variable. Will plug away at it.

Posted: Wed 25 Jul 2012, 01:49
by brokenman
Ok maybe i'm missing something or my mother dropped me on my head when i was little.

I managed to get gtk2desklet to use a gtkrc file by exporting the environment variable DESKLET_GTKRC_FILES. The following is the only combination of launching the app that worked and used the gtkrc file.

gtkdialog -p MAIN_SCREEN -c --gtk-module=gtk2desklet

Using gtkdialog-desklet -p MAINSCREEN --gtkrc-file=./gtkrc launched the app without error but did not honour the gtkrc file.

The problem is it won't use an image for the button background in the NORMAL or PRELIGHT state. It doesn't matter if the bg_pixmap file is transparent or not. Here is my gtkrc file.

Code: Select all

pixmap_path "/mnt/sda7/sandpit/gtkapps"
style "rescue_button" = "fedora-wider"
{
	#bg[NORMAL]   =  shade (1.02,@bg_color)
 	#bg[ACTIVE]   =  shade (0.85,@bg_color)
	#bg[PRELIGHT] ="./transparent.png"
	bg[PRELIGHT] =  mix(1.90, shade (1.35,@bg_color), @selected_bg_color)
	#bg_pixmap[NORMAL] = "bg.png"
}
widget_class "*GtkButton*" style "rescue_button"
The PRELIGHT shading line works fine. The bg_pixmap does not. Anyone have any ideas why this won't work?

EDIT: I should note that bg_pixmap[PRELIGHT] = "bg.png" also does not work for me.

Posted: Wed 25 Jul 2012, 15:11
by akash_rawal
You can use pixmap engine.

Posted: Wed 25 Jul 2012, 18:12
by brokenman
Thanks. This works for me.

Posted: Sun 25 Aug 2013, 16:25
by recobayu
Hi Akash, thank you for your gtk2desklet. I make a start metro like wdz8 and I use your gtk2desklet.
You can see the screenshot at here:
http://dl.dropboxusercontent.com/s/g38l ... kstart.png
and the script is in here:
http://murga-linux.com/puppy/viewtopic. ... 062#721062
I want to ask a question.
1. Can gtk2desklet do the transparent in vbox when i use scrollable="true"? how?
2. Can gtk2desklet do the blur transparent? so it's like unity in ubuntu.
Thank you.

Posted: Mon 26 Aug 2013, 17:16
by akash_rawal
recobayu wrote: 1. Can gtk2desklet do the transparent in vbox when i use scrollable="true"? how?
When you set scrollable=true, gtk creates a new X window for the contents of the vbox. This foils the transparency and I cannot think of any workaround.
recobayu wrote: 2. Can gtk2desklet do the blur transparent? so it's like unity in ubuntu.
I'm too lazy to do that :oops: , and even if I enable it, it isn't going to work with real transparency.

Posted: Sat 28 Sep 2013, 19:37
by mikeb
Well inspired by your drive icons for puppies 5+ I then find this little beauty so I played with my version of pmount and came up with a drive icons widget.... does the usual...yellow for 'locked' drives, play media buttons, hide empty optical, eject and no script polling....mut provides a binary backend so cpu usage is erm like nothing registered. (the original had 10% spikes every 2 seconds...)
Made for 4.12 to have one 4k script instead of ..well you know. Yet to try but should be ok for even older gtk2desklet permitting as its not using udev (bleeding stubborn that was)

so erm thanks for useful stuff.... :)

mike

a piccie..ignore the frame text..I only added the drive names to have something there :D

Posted: Sun 29 Sep 2013, 11:45
by mikeb
Ah.... a reread found those transparent buttons .... oh yes :)

A couple of questions.....
yad works but stays on top of other windows... not sure if you are familiar with it but I have the sources to play with.

I was testing on older pups ... they set the background using xsetroot so I added the _XSETROOT_ID variable to your source which detected the background pixmap but then gdk complains its only 1 bit depth and displays a highly skewed transparancy.
If I add Esetroot and imlib2 and set wallpaper with that all works correctly but its a bit of overkill and not so portable.

Oh and in transbuttons.rc...how do I change the button text colour...nothing I do seems to work...one has gtk mental blindness syndrome

regards

Mike

Posted: Sun 29 Sep 2013, 17:09
by mikeb
Ok in gtk 1 rox puppies it seems the wallpaper is stored as is...a binary copy of the jpg or whatever.... that is then displayed as wallpaper via gtk....performed by puppybackgroundsetter....xsetroot is similar. Such data is meaningless to such as gtk2desklet even if the needed variable giving the location of the image is set.. I found the wallpaper setter extracted from WindowMaker does the job nicely keeping the wallpaper and apps using gtk2desklet happy.
mike

Posted: Sun 29 Sep 2013, 19:12
by mikeb
Ah ha...thats better...now translucent backgrounds for the text on the now dummy buttons.....