gtk2desklet 3.1
akash_rawal,
Very nice update and thanks especially for the examples section.
I tried an upgrade to Gtk2.16 on pup431 to see if the
type-hint="7" would work then, but it failed there as well.
Since a similar window behaviour can be made by using the <window decorated="false"> tag, is there a way to change
gtkdialog-desklet to allow a window tag?
Thanks again and the operation seems much faster now.
Regards,
s
Very nice update and thanks especially for the examples section.
I tried an upgrade to Gtk2.16 on pup431 to see if the
type-hint="7" would work then, but it failed there as well.
Since a similar window behaviour can be made by using the <window decorated="false"> tag, is there a way to change
gtkdialog-desklet to allow a window tag?
Thanks again and the operation seems much faster now.
Regards,
s
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
Upgraded to version 1.1
Upgraded to version 1.1
Changelog:
Still this is not working to my expectations. Apps appear only on one desktop, raise over other windows when clicked and can be dragged by [Alt] + Drag.
I am purposefully not allowing <window> tag as this can interfere with transparency if gtkdialog is restarted, if user provides option window_position=2 to bring the app under mouse. An alternative is given in the help file as well as in examples.
Anyways Lucid Puppy 511 that I use uses GTK 2.20.
Changelog:
- Added a few workarounds for older puppies (still not perfect)
- Added ability to stretch given background image
- Added ability to restart gtkdialog
- Added facility to refresh GTK theme and transparency
- added optimisation workaround for apps that resize very often
- Transparency is now enabled for XFCE (Please test)
Now I am using:seaside wrote: I tried an upgrade to Gtk2.16 on pup431 to see if the
type-hint="7" would work then, but it failed there as well.
Since a similar window behaviour can be made by using the <window decorated="false"> tag, is there a way to change
gtkdialog-desklet to allow a window tag?
Code: Select all
<window type-hint="7" decorated="false" skip-taskbar-hint="true" skip-pager-hint="true">
I am purposefully not allowing <window> tag as this can interfere with transparency if gtkdialog is restarted, if user provides option window_position=2 to bring the app under mouse. An alternative is given in the help file as well as in examples.
Anyways Lucid Puppy 511 that I use uses GTK 2.20.
Hi akash_rawal
I updated to your gtkdialog-desklet-1.1 but I have a problem with wallpaper-server apparent in v-1.0 too. This occurs in Lupu-528-004 and Slacko-5.3.1.(more info down the page and in screen shot)
I updated my ram desklet to detect if free -m can be used and if not default to just free. This overcomes your little issue of earlier and makes the desklet backward compatible. I also added screen positioning capability, but I did not write a "help" for it as it's designed to be called from a script. The default position is "R" wich is 280px from right of screen Passed params include "L" for 30px from left, any integer within your screen height which is the Y axis, or X(any integer inside your screen width) for custom X axis placement. It's very simple code from a simple coder!
The problem is that transparency is lost if the X dimension exceeds approxiamately three quarters of screen width. I tried on different resolutions (different machines) and the ratio is different on 1024x768 it is exactly 0.7451171875 every time (763px) and on 1280x1024 it is exactly 0.79609375 (1019px). I don't know if these measurements will be of any help in debugging.
There is also an error message:(see screeny)
Any ideas?
Thanks
New ramGTK code:
This code is not great as even doing ctrl-c it still runs
I updated to your gtkdialog-desklet-1.1 but I have a problem with wallpaper-server apparent in v-1.0 too. This occurs in Lupu-528-004 and Slacko-5.3.1.(more info down the page and in screen shot)
I updated my ram desklet to detect if free -m can be used and if not default to just free. This overcomes your little issue of earlier and makes the desklet backward compatible. I also added screen positioning capability, but I did not write a "help" for it as it's designed to be called from a script. The default position is "R" wich is 280px from right of screen Passed params include "L" for 30px from left, any integer within your screen height which is the Y axis, or X(any integer inside your screen width) for custom X axis placement. It's very simple code from a simple coder!
The problem is that transparency is lost if the X dimension exceeds approxiamately three quarters of screen width. I tried on different resolutions (different machines) and the ratio is different on 1024x768 it is exactly 0.7451171875 every time (763px) and on 1280x1024 it is exactly 0.79609375 (1019px). I don't know if these measurements will be of any help in debugging.
There is also an error message:
Code: Select all
(wallpaper-server:11193): GdkPixbuf-CRITICAL **: gdk_pixbuf_new_subpixbuf: assertion `src_x >= 0 && src_x + width <= src_pixbuf=>width' failed
Any ideas?
Thanks
New ramGTK code:
Code: Select all
#!/bin/sh
#named "ramGTK"
#set -x
WIDGETNAME=`basename $0`
#geometry is a passed parram
X=R
Y=100
while [ $# != 0 ];do
I=1
while [ $I -lt `echo $# | wc -c` ]; do
case $1 in
L) X=L ;;
R) X=R ;;
[0-9]*[0-9]) Y=$1 ;;
X*[0-9]) X=`echo $1|tr -d 'X'` ;;
esac
shift
I=$(($I+1))
done
done
#screensize
SCREEN=`xwininfo -root | grep ' \-geometry ' | tr -s ' ' | cut -f 3 -d ' ' | cut -f 1 -d '+' | tr 'x' ' '`
HEIGHT=`echo -n "$SCREEN" | cut -f 2 -d ' '`
WIDTH=`echo -n "$SCREEN" | cut -f 1 -d ' '`
case $X in
L) XDIM=30 ;;
R) XDIM=$(( $WIDTH - 220 )) ;;
*) XDIM=$X ;;
esac
YDIM=$Y
echo "$XDIM $YDIM"
#hack for older "free"
free -m >/dev/null 2>&1
[ $? = 0 ] && export FREE="free -m" U=M || export FREE="free" U=K
#calc free ram
export TOTRAM=`$FREE|grep -w Mem|awk '{print $2}'`
freeramfunc(){
while [ 1 ]; do
USEDRAM=`$FREE|grep -w Mem|awk '{print $3}'`
FREERAM=`$FREE|grep -w Mem|awk '{print $4}'`
echo $(( $USEDRAM * 100 / $TOTRAM ))
echo "RAM $FREERAM $U"
sleep 1
continue
done
}
export -f freeramfunc
#gui
export ramwidget="<hbox>
<progressbar width-request=\"140\" height-request=\"14\" tooltip-text=\"showing free RAM of total $TOTRAM $U\">
<input>freeramfunc</input>
</progressbar>
</hbox>"
eval $(gtkdialog-desklet -p ramwidget --geometry=+${XDIM}+${YDIM})
- Attachments
-
- desklet.png
- (53.05 KiB) Downloaded 1871 times
Puppy Linux Blog - contact me for access
Re: gtkdialog-desklet
i'm sorry, can someone give me the mirror?akash_rawal wrote: Download gtkdialog-desklet-1.1 (34 KB)
i can't download that link
i think this gtkdialog-desklet very nice
myblog: [url]http://muktyas.blogspot.com[/url]
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
Upgraded to version 1.2
Upgraded to version 1.2
Changelog:
Now I am using my own program create-bg which uses X11 to fetch background image portion for a given window. How to use that is given in gtkdialog-desklet help file, in Hidden features section.
Changelog:
- Now using X11 library to determine wallpaper, transparency is supported for many DEs.
- Fixed communication problems by simply removing wallpaper-server
(wallpaper-server existed for performance reasons, but now wallpaper can be fetched from X server without performance issues.) - Fixed window geometry when desklet is near bottom-right corner or partially offscreen. (Thanks 01micko)
- Fixed the problem that gtkdialog-desklet was not exiting by Ctrl+c
I traced the problem to xwininfo which gives negative values for geometry when a window is close to bottom right corner.01micko wrote: The problem is that transparency is lost if the X dimension exceeds approxiamately three quarters of screen width.
Now I am using my own program create-bg which uses X11 to fetch background image portion for a given window. How to use that is given in gtkdialog-desklet help file, in Hidden features section.
I tried this with the new Saluki XFCE version, the examples only capture top left of screen, not where the gtkdialog-desklet version 1.2 appears.
Edit: I tried version 1.1 that seems to work ok.
If I click mouse anywhere on the desktop the desklet vanishes.
Geoffrey
Edit: I tried version 1.1 that seems to work ok.
If I click mouse anywhere on the desktop the desklet vanishes.
Geoffrey
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
Upgraded to version 2.0
Changelog:
Changelog:
- Fixed window types for xfwm (Thanks Geoffrey)
- Now entire transparency work is done inside GTK module, improving performance slightly
- Added facility to specify gtkdialog executable (commandline option -g, --gtkdialog=command)
- Fixed a small bug in option processing
Sorry, couldn't get your problem .. could you please clarify it?Geoffrey wrote: I tried this with the new Saluki XFCE version, the examples only capture top left of screen, not where the gtkdialog-desklet version 1.2 appears.
akash_rawal,akash_rawal wrote:Upgraded to version 2.0
Changelog:_____________________________________________________
- Fixed window types for xfwm (Thanks Geoffrey)
- Now entire transparency work is done inside GTK module, improving performance slightly
- Added facility to specify gtkdialog executable (commandline option -g, --gtkdialog=command)
- Fixed a small bug in option processing
Sorry, couldn't get your problem .. could you please clarify it?Geoffrey wrote: I tried this with the new Saluki XFCE version, the examples only capture top left of screen, not where the gtkdialog-desklet version 1.2 appears.
Version 2.0 is working ok with xfwm, including option -g, but it doesn't show option -b the fancy background.
Geoffrey
- Attachments
-
- desklet1.jpg
- (15.21 KiB) Downloaded 1540 times
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
Well, I don't observe such problem. Does it show error messages in terminal?Geoffrey wrote: Version 2.0 is working ok with xfwm, including option -g, but it doesn't show option -b the fancy background.
The example should run like this:
- Attachments
-
- desklet_bg.jpg
- (15.5 KiB) Downloaded 1362 times
if I click on the script and run it, it shows as my previous picture shows, but if I run it from the terminal it shows it as a transparency and not the background image, strangeakash_rawal wrote:Well, I don't observe such problem. Does it show error messages in terminal?Geoffrey wrote: Version 2.0 is working ok with xfwm, including option -g, but it doesn't show option -b the fancy background.
The example should run like this:
- Attachments
-
- desklet.jpg
- (21.53 KiB) Downloaded 1599 times
akash_rawal,
I tried copying desklet_background.png to /root, then I don't get the error but the image still doesn't show, I've tried running it from the xfce terminal as well as rxvt with the same result, is there anything else I should check, I am running in Saluki with GTK version 2.24.8
while I'm here command in terminal to get gtk version is pkg-config --modversion gtk+-2.0
I just tried from a fresh usb install of Saluki, still don't work
Geoffrey
edit: I just noticed that yours is transparent, mine will not show as transparent for inactive windows and what version of XFCE are you using, Saluki is running version 4.8, could that be the difference, I can't think of what else to tell you, that about covers it all.
I tried copying desklet_background.png to /root, then I don't get the error but the image still doesn't show, I've tried running it from the xfce terminal as well as rxvt with the same result, is there anything else I should check, I am running in Saluki with GTK version 2.24.8
while I'm here command in terminal to get gtk version is pkg-config --modversion gtk+-2.0
I just tried from a fresh usb install of Saluki, still don't work
Geoffrey
edit: I just noticed that yours is transparent, mine will not show as transparent for inactive windows and what version of XFCE are you using, Saluki is running version 4.8, could that be the difference, I can't think of what else to tell you, that about covers it all.
Well you can disregard all the info I posted, I have installed the latest release of Saluki 007, I think this has a different revision of XFCE.
The command for gtk version doesn't work either, anyway the desklet_background.png now shows but there is no transparency, on any of the widgets,
if you can get it working for this version I think it should be safe in the sense that this should be the final build of XFWM for Saluki,
I hope this hasn't caused you any hair tearing moments, thank you for the time you have spent on getting this working, it is a nice feature to have.
regards
Geoffrey
The command for gtk version doesn't work either, anyway the desklet_background.png now shows but there is no transparency, on any of the widgets,
if you can get it working for this version I think it should be safe in the sense that this should be the final build of XFWM for Saluki,
I hope this hasn't caused you any hair tearing moments, thank you for the time you have spent on getting this working, it is a nice feature to have.
regards
Geoffrey
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
Upgraded to version 2.1
Changelog:
Changelog:
- Now wallpaper change is handled almost instantly via GdkEvent.
- Fixed crashes after changing wallpaper when using xfdesktop as pinboard/desktop (Not an actual fix, only the X error is trapped and printed to terminal)
- Automatically refresh transparency when gtkdialog window is resized (again handled via GdkEvent).
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
Code: Select all
WARNING: Couldn't load background image "desklet_background.png"
The solution is to correct present working directory:
Code: Select all
cd /usr/share/doc/gtkdialog-desklet/examples
./2_advanced_options
I use XFCE 4.6.2 along with compiz as WM and rox to manage desktop, but that shouldn't matter.
Sad to say no joy, I guess this is the error message sent to the terminal "Warning: x_get_root_pixmap_by_property failed",akash_rawal wrote:This warning means that gtkdialog-desklet couldn't find desklet_background.png in current working directory, not a big problem.Code: Select all
WARNING: Couldn't load background image "desklet_background.png"
The solution is to correct present working directory:or mentioning full path to the image.Code: Select all
cd /usr/share/doc/gtkdialog-desklet/examples ./2_advanced_options
I use XFCE 4.6.2 along with compiz as WM and rox to manage desktop, but that shouldn't matter.
still the same result, no transparency, but the fancy picture shows ok, oh and now when I add -g command, the command is run but the desklet never appears
Ive tried a few different things to see if I can get it to function the way it should, I can get the desklet to run with no transparency then the command to run
but not with the -g, I'm wondering in what way, when it was working correctly, the -g differs from the examples below, the result is the same.
Code: Select all
#!/bin/sh
#!/bin/bash
export desklet="
<vbox>
<text><label>The first example app</label></text>
<text><label>Hello World!</label></text>
<button ok></button>
</vbox>
"
gtkdialog-desklet -p desklet && command
Code: Select all
#!/bin/sh
#!/bin/bash
export desklet="
<vbox>
<text><label>The first example app</label></text>
<text><label>Hello World!</label></text>
<button ok></button>
</vbox>
"
gtkdialog-desklet -p desklet
command
Regards
Geoffrey
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
-g option is meant to select gtkdialog executable.Geoffrey wrote: still the same result, no transparency, but the fancy picture shows ok, oh and now when I add -g command, the command is run but the desklet never appears
e.g. if you have both gtkdialog4 and gtkdialog3, gtkdialog-desklet selects gtkdialog4. To make it use gtkdialog3 instead, you can pass option -g gtkdialog3
Transparency is not yet supported with background image. I will add support for alpha channel in background image someday, but I have no plans to do it soon.
-
- Posts: 229
- Joined: Wed 25 Aug 2010, 15:38
- Location: ISM Dhanbad, Jharkhand, India
Dear akash_rawal,
Compiles in and works really nicely in Lucid. Very clever programming, I must say. Thanks. I think we should have a section on the forum devoted to gtkdialog-desklets. I can't wait to write some myself. I can see conky being replaced by such a desklet, and heaps of other nice desktop apps.
With kind regards,
vovchik
Compiles in and works really nicely in Lucid. Very clever programming, I must say. Thanks. I think we should have a section on the forum devoted to gtkdialog-desklets. I can't wait to write some myself. I can see conky being replaced by such a desklet, and heaps of other nice desktop apps.
With kind regards,
vovchik
Seems to work fine - on Akita (pup420/wary51x mongrel), using a special gtkdialog4 from techno, built without glade deps, if that matters...akash_rawal wrote:Upgraded to version 2.3
Will be great to see what widgets come out of this!
Good work akash_rawal.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]