Author |
Message |
Argolance

Joined: 06 Jan 2008 Posts: 3255 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Mon 23 Apr 2012, 06:44 Post subject:
|
|
Hello,
Example:
Quote: | #!/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:
Quote: | (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.
_________________

Last edited by Argolance on Mon 23 Apr 2012, 09:27; edited 1 time in total
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Mon 23 Apr 2012, 07:44 Post subject:
|
|
Dear Argolance,
Your script works with ICEWM except that it is always on top....
With kind regards,
vovchik
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 2346 Location: Queensland
|
Posted: Mon 23 Apr 2012, 09:32 Post subject:
|
|
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
Description |
|
Filesize |
28.83 KB |
Viewed |
1196 Time(s) |

|
Description |
|
Filesize |
24.51 KB |
Viewed |
1130 Time(s) |

|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 3255 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Mon 23 Apr 2012, 13:51 Post subject:
|
|
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...
This unfortunately seems not to be possible?
Cordialement.
_________________

|
Back to top
|
|
 |
akash_rawal
Joined: 25 Aug 2010 Posts: 232 Location: ISM Dhanbad, Jharkhand, India
|
Posted: Mon 02 Jul 2012, 14:54 Post subject:
|
|
Upgraded to version 3.1
Changelog:
- Window searching code replaced by a crazy hack in GObject class structure.
- Fixed broken compatibility with jwm
|
Back to top
|
|
 |
brokenman
Joined: 20 Oct 2011 Posts: 25
|
Posted: Sat 21 Jul 2012, 17:11 Post subject:
|
|
Is it possible to get the transparency even during the mouseover?
|
Back to top
|
|
 |
akash_rawal
Joined: 25 Aug 2010 Posts: 232 Location: ISM Dhanbad, Jharkhand, India
|
Posted: Sun 22 Jul 2012, 05:57 Post subject:
|
|
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.
Quote: |
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.
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 3255 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Sun 22 Jul 2012, 06:15 Post subject:
|
|
Hello,
Great! Quote: | - 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.
_________________

Last edited by Argolance on Sun 22 Jul 2012, 06:59; edited 1 time in total
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 3255 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Sun 22 Jul 2012, 06:58 Post subject:
|
|
Hello,
Quote: | 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 ... 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.
_________________

|
Back to top
|
|
 |
akash_rawal
Joined: 25 Aug 2010 Posts: 232 Location: ISM Dhanbad, Jharkhand, India
|
Posted: Sun 22 Jul 2012, 13:17 Post subject:
|
|
Maybe it will work with xcompmgr if you force use of pseudotransparency with xcompmgr by exporting variable DISABLE_RGBA_TRANS something like this:
Code: |
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.
|
Back to top
|
|
 |
brokenman
Joined: 20 Oct 2011 Posts: 25
|
Posted: Mon 23 Jul 2012, 08:45 Post subject:
|
|
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.
|
Back to top
|
|
 |
brokenman
Joined: 20 Oct 2011 Posts: 25
|
Posted: Tue 24 Jul 2012, 21:49 Post subject:
|
|
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: | 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.
|
Back to top
|
|
 |
akash_rawal
Joined: 25 Aug 2010 Posts: 232 Location: ISM Dhanbad, Jharkhand, India
|
Posted: Wed 25 Jul 2012, 11:11 Post subject:
|
|
You can use pixmap engine.
Description |
An example
|

Download |
Filename |
trans-buttons.tar.gz |
Filesize |
1.29 KB |
Downloaded |
634 Time(s) |
|
Back to top
|
|
 |
brokenman
Joined: 20 Oct 2011 Posts: 25
|
Posted: Wed 25 Jul 2012, 14:12 Post subject:
|
|
Thanks. This works for me.
|
Back to top
|
|
 |
recobayu

Joined: 15 Sep 2010 Posts: 293 Location: indonesia
|
Posted: Sun 25 Aug 2013, 12:25 Post subject:
|
|
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/g38l401kfu05ltp/mukstart.png
and the script is in here:
http://murga-linux.com/puppy/viewtopic.php?p=721062#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.
|
Back to top
|
|
 |
|