|
Post by SunBurnt on Jul 20, 2014 18:42:14 GMT 1
Hi micko; I saw your post on the Puppy site and I had exactly the same thought.
It should be a snap to rewrite your C code in BaCon.
Vovchik, Alex, or BigBass ( Joe ) should have no problem with it.
|
|
|
Post by vovchik on Jul 20, 2014 22:22:55 GMT 1
Dear micko, It is very nice and I think we can port it pretty easily, as Terry says. We can also incorporate nice cairo bits such as gradients and rounded corders to make it look very sexy (at least as good as my svg thing). I had a problem with the make file, since I think am using a rather newer version of gcc and linker (Mint 16) and did this instead: gcc cairo-msg.c -o cairo-msg -I/usr/include `pkg-config --cflags cairo` -L /usr/lib -lX11 `pkg-config --libs cairo`
just go be quick. It worked. I will be looking at it - and thanks for writing and posting this little gem. With kind regards, vovchik
|
|
|
Post by vovchik on Aug 1, 2014 19:44:21 GMT 1
Dear all and especially micko, Here is my Baconized version of micko's little utility. I modded it considerably to include rounded boxes (with adjustable opacity), user-defined icons, and pango for text rendering, so that there is multiline capability and many text display options. To compile, you NEED the newest BaCon (v. 3.0.1), since I use OPTION PARSE OFF, which is absent from all previous versions except the latest beta prior to release of v. 3.0.1. I have included a 32-bit binary compiled in Mint-16. Please let me know how it works for you. Since I am using Cinnamon, I have alpha compositing and would be interested in seeing how it runs, for example, on Puppy or Mint with Sage. Also included are bash scripts that show off the features. Have fun.... With kind regards, vovchik PS. No gtk or gdk in this at all. PPS. UPDATED - Thanks Peter! Added PRAGMA INCLUDE pango/pangocairo.h at the top, because Peter got a compile error without it. PPPS. UPDATED - Added some weather scripts that show off bcm nicely. See next post for screenshot. PPPS. UPDATED 4 Aug = Used Joe's TYPE void* everywhere possible and got rid of four unsuded vars, plus other minor changes. Also updated weather script to get rid of some long and ugly lines. PPPPS. UPDATED - Included Guadalajara and added a diskfree script. PPPPPS. UPDATED - Included Micko's fix for the window border. Much better. And weather in Coolangatta. Thanks. PPPPPS. UPDATED - Included WorldTime scripts and a fix option in the source for older cairo versions. Thanks basica. PPPPPPS. UPDATED - Included stripes scripts (sample and worldtime). PPPPPPPS. UPDATED - Included micko's nice version check to facilitate compilation with different versions of cairo. Thanks PPPPPPPPS. UPDATED - Included revised cairo check that seems to work at compile and runtimes on various platforms. Thanks basica. PPPPPPPPPS. UPDATED - added DiskHog, CpuHog, MemHog, Dirlist, FreeMem and OS_Bits scripts. PPPPPPPPPPS. UPDATED - did what micko asked for - no terminal output unless invoked as 'bcm -h'. PPPPPPPPPPPS. UPDATED - added an alignment flag (-a 0, 1 or 2) that aligns text left, center or right. Left is default. Attachments:bcm_src.tar.gz (55.17 KB)
|
|
|
Post by vovchik on Aug 3, 2014 12:33:56 GMT 1
Dear all, Please have a look at the updated post. I added some simple weather scripts that show what bcm can do. It looks good and is easy to use. With kind regards, vovchik Attachments:
|
|
|
Post by bigbass on Aug 4, 2014 4:20:40 GMT 1
Hey vovchik
Your app works on mint 17
nice job with the porting and the mods!
I noticed something that we fight with the TYPES
and most of the time we can just use void * to get around some difficult lines to compile
look here this will compile and work in your code and frees the mind knowing that we don't depend on anything at the low levels there may be some exceptions though
before
after
LOCAL c TYPE void * LOCAL pat TYPE void * LOCAL pc TYPE void * LOCAL pl TYPE void * LOCAL desc TYPE void *
|
|
|
Post by vovchik on Aug 4, 2014 10:09:43 GMT 1
Dear Joe,
Glad to hear it works, and thanks for the TYPE stuff. I also have some of them in the DISPLAY SUB, which calls X11 functions, and some at the top under INITIALIZATION. Will now try modding those, too, just for consistency's sake.
With kind regards, vovchik
|
|
|
Post by vovchik on Aug 4, 2014 12:53:35 GMT 1
Dear All,
Did a little update to the source - thanks to Joe for TYPE void* - and fixed up the weather script to get rid of some rather ugly long lines. The updated archive is a few messages above.
With kind regards, vovchik
|
|
|
Post by bigbass on Aug 4, 2014 17:33:20 GMT 1
Hey vovchik Working perfectly here's a test A great app! People use GDL short for Guadalajara but the airport code name for is MMGL so we need to look up the codes From far away in another part of the world Joe
|
|
|
Post by vovchik on Aug 4, 2014 18:02:47 GMT 1
Dear Joe, I am glad you like it - I have added it (Guadalajara) to my weather scripts, too. Here is another little example script that might be useful (diskfree): Can you think of any more? If so, please post. With kind regards, vovchik PS. Your weather icon isn't showing because you might be running from another dir. If so, just adjust the icon var in the weather script to point directly to the icon image location (full filespec).
|
|
|
Post by 01micko on Aug 5, 2014 12:50:48 GMT 1
Hello vovchik and Joe, Haha! Brilliant stuff. All demos working for me and local weather too! Want another bone to chew on? pmck (poor man's clock)It is in very early development. So far tested working in rox, KDE, XFCE and cinnamon (with caveat, see the readme). I can see a full blown bacon-widget program coming out of this with the quality of KDE plasma widgets at a fraction of the cost, available for any desktop. All the best!
|
|
|
Post by vovchik on Aug 5, 2014 14:33:48 GMT 1
Dear micko, Thanks, but it would not have been possible without your prototype. Yep, I think great widgets - agnostic ones - could be made that would run anywhere. We have to think about that. As for pmck, I found your proggie here: codeI'm looking at that now. With kind regards, vovchik
|
|
|
Post by 01micko on Aug 5, 2014 23:23:41 GMT 1
Hello vovchik fixed the link to pmck! One very minor bug in bcm is that border is set to 1, leaving a 1 px square border around our beautiful radius corners. was win = XCreateWindow(dpy, rootwin, 0, 0, 1, 1, 1, mydepth, InputOutput, myvisual, CW, &attr) I propose win = XCreateWindow(dpy, rootwin, 0, 0, 1, 1, 0, mydepth, InputOutput, myvisual, CW, &attr) Cheers EDIT: screenshot attached. Attachments:
|
|
|
Post by vovchik on Aug 5, 2014 23:59:03 GMT 1
Dear micko, Thanks for the border fix - much better! I am certain there are a few other bits that could be improved, so, please, have at it. I am updating the archive above with the fix. As for pmck, I can't get the clock to show on Mint Cinnamon, which has compositing. I tried getting the root ID, but when I launch that way, I get. e.g.: xwininfo: Window id: 0x2600007 "Desktop" ... ./pmck-0.1 has started xwin is 0x2600007 X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 1 (X_CreateWindow) Serial number of failed request: 7 Current serial number in output stream: 11
So I am still fiddling around trying to get the right root win ID. I once did a clock together with Alex using cairo and svg, so I will look at that stuff, too. I know that we can get the clock and hands to look great using cairo patterns and then filling strokes and objects. This could also be a nice world time widget, showing a few times zones defined in an rc file. Cheers, vovchik
|
|
|
Post by 01micko on Aug 6, 2014 0:17:23 GMT 1
I have cinnamon-2.0.14 installed in slackware-14.1. I didn't need to set the the window as it displayed fine (clarify; almost fine) with out. Just running pmck was enough. Of course, there could be differences in build that matter. There was some slight problem with the XWindow though as it didn't blend perfectly into the background. This can be overcome with XShapeCombineMask(), but I haven't figured it out yet; jamesbond has suggestions here. The windowid was necessary for Xfce, and also rox in FatDog. KDE seemed to always show the clock on top, ignoring the XLowerWindow() request. Perhaps the way to go is to use the NET_ atoms instead, part of the EHWM spec. Of course the layer is always going to be a problem given the vast number of DE's/WM's in the *nix world. But that's programming!
|
|
|
Post by vovchik on Aug 6, 2014 0:20:58 GMT 1
Dear micko and all, I also came across this thing but haven't got it to compile properly - yet. It takes an svg as input and will generate c code for cairo - without the need for any svg lib such as gdk-pixbuf-loader or librsvg. Would be great for our purposes. With kind regards, vovchik Attachments:svg2cairo-master.tar.gz (350.25 KB)
|
|