Conky With Lua

Themes, icons, wallpapers, etc.
Message
Author
User avatar
solo
Posts: 389
Joined: Thu 14 Nov 2013, 20:33

#81 Post by solo »

Okay, I've downloaded the conkyclock widget pet from the Saluki repository, and installed it.
Using Pfind, I determined that a folder has been created called ~/.config/conky/clockwidget.
In there I've found a images folder, a themes folder, and 7 files. I also noticed an executable script called conkyclock in the ~/Startup folder.
Now, one of those 7 files in ~/.config/conky/clockwidget is called README. So I've opened it, and it tells me I should make one of the files called conkyclock executable (though, as far as I can tell, it already is), and then move that file to the ~/bin folder. So I did.
It also tells me to make the btnclockwdgt file executable, but this file already appears to be that way also.
So now I go to the Terminal and type conkyclock start, and ....it works.

Okay, so to summarize:
I have a folder called ~/.config/conky/clockwidget
Inside are 2 folders, images and themes
Inside the images folder are two files, bckgnd_plain.png and bckgnd.png
Inside the themes folder is a folder called clockwgt
Inside the clockwgt folder are three files, base.png, clicked.png and mouseover.png
There are 7 files inside the ~/.config/conky/clockwidget folder
They are called btnclockwdgt, clockswitch, conkyclock, conkyclock.lua, conkyclockwdgtrc, preview.jpg and README
I have copied the conkyclock file to the ~/bin folder
There is a file called conkyclock in the ~/Startup folder

What I am realizing now, is that there is a lua script in there. The last config I tried this on did not have the lua library installed and it didn't work. But this configuration has.
So it might be a good idea to go to the Puppy Package Manager and type in lua, and then in the results, pick and install the liblua5.1-0_5.1.4 package.

Good luck!

User avatar
killapup
Posts: 76
Joined: Wed 25 Apr 2012, 11:48
Location: Warwick, Qld, Australia

#82 Post by killapup »

Hey thanks again solo, for your suggestions,

I've just tried uninstalling and reinstalling it but to no avail, and I've checked all the files you listed, they are all there in the places that they should be. I must admit that I have never, in all the other installs, copied the conkyclock file to the ~/bin folder and they all work fine. (but did you mean the ~/bin or /bin?? I have no ~/bin folder??) I did copy it to /bin but it didn't make any difference :cry:

As you had found, I also found that all the relevant files are already executable, so no need to chmod there.

I already had installed the liblua5.1-0_5.1.4, so that shouldn't be the problem, but who knows. Everything seems to be in place.

Is there something that Precise handles slightly differently to the other Puppies?? The trouble is that I don't know what I'm looking for, I just guess and look to see what might be applicable to the situation, and of course I use Google to find stuff.

Anyway, I guess we'll find a solution somewhere, I'll keep looking, thanks again, :wink:

Ray

PS solo, you mentioned in an earlier response about /usr/bin/python, is that significant? As I have Python installed and it hasn't created a file there, do I need to do something about that?? Thanks again.
Slacko 6.3.2 on
Asus X54C 4Gb RAM
Also VectorLinux64 plus many others :D

User avatar
killapup
Posts: 76
Joined: Wed 25 Apr 2012, 11:48
Location: Warwick, Qld, Australia

Missing button...

#83 Post by killapup »

G'day again, solo, and anyone else who has been following my conky clock button saga.

I've managed to stumble on the solution... :D

First of all, I had installed Python3_3.2.3 and thought that, surely, the higher (newer??) version would cover all python needs. Apparently not :(

Also, I had installed a python 2.7.2 thinking that it was the right one but having had another look, it is actually python-tk 2.7.2 which is apparently different. Anyway, I went looking and found python-2.7.2-i486, installed that, restarted X and, voila, there's my button :oops:

I feel a bit silly but, as I said, I often don't know what to look for and so I just stumble along. Anyway, thanks to solo and others for their patience, God bless, :D

Ray
Slacko 6.3.2 on
Asus X54C 4Gb RAM
Also VectorLinux64 plus many others :D

User avatar
killapup
Posts: 76
Joined: Wed 25 Apr 2012, 11:48
Location: Warwick, Qld, Australia

Missing button...

#84 Post by killapup »

G'day again, solo, and anyone else who has been following my conky clock button saga.

I've managed to stumble on the solution... :D

First of all, I had installed Python3_3.2.3 and thought that, surely, the higher (newer??) version would cover all python needs. Apparently not :(

Also, I had installed a python 2.7.2 thinking that it was the right one but having had another look, it is actually python-tk 2.7.2 which is apparently different. Anyway, I went looking and found python-2.7.2-i486, installed that, restarted X and, voila, there's my button :oops:

I feel a bit silly but, as I said, I often don't know what to look for and so I just stumble along. Anyway, thanks to solo and others for their patience, God bless, :D

Ray

Sorry again for the double post, :( my seamonkey isn't reloading the page properly when I click 'submit' and so I don't know whether it has sent the post or not :x it hangs for a long time. Anyway, that might be another issue???
Slacko 6.3.2 on
Asus X54C 4Gb RAM
Also VectorLinux64 plus many others :D

User avatar
solo
Posts: 389
Joined: Thu 14 Nov 2013, 20:33

#85 Post by solo »

Good to see you've got it running killapup.

I'd be miffed by that one as well.

User avatar
killapup
Posts: 76
Joined: Wed 25 Apr 2012, 11:48
Location: Warwick, Qld, Australia

#86 Post by killapup »

Yup, cheers solo
Slacko 6.3.2 on
Asus X54C 4Gb RAM
Also VectorLinux64 plus many others :D

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#87 Post by Moat »

@ battleshooter -

Thanks a bunch for your work on this stuff - been having a blast playing around with conky/lua/feh since discovering this thread last year!!

Just today, I managed to stumble upon and get working a Lua script for semi-transparent backgrounds of conky windows - really cool! Here's the post, from the Ubuntu forums - http://ubuntuforums.org/showthread.php? ... st10283374

I'm actually using the Pwidgets GUI to "manage" the conkies - running clusters, fair amount of config tweaking, etc - works out pretty well, placing the configs in /usr/local/pwidgets/widgets/configs directory.

The results - on Precise 5.7.1/OpenboxPlus/rox... 8)

Bob
Attachments
Lua_semi-transparent_conky_bkgrnd.jpg
With rounded corners, even!
(71.11 KiB) Downloaded 875 times

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#88 Post by Moat »

Playing around with applying Lua background to some of the standard Pwidgets configs - seems to work just dandy. Color/tint, degree of transparency (alpha) and corner radius are all easily changed in the Lua script's text...

Bob
Attachments
comparison.jpg
None applied, tan-gray, blue-ish w/smaller corner radius
(62.25 KiB) Downloaded 905 times

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#89 Post by Moat »

Sorry about the image sizes... seems the forum software increases their size, somehow...? :oops:

In case anybody wants to give it a play (back up your system!), attached are the scripts and a few configs - with paths set for use in Pwidgets. They should also work as regular conkies once paths are modified depending on how the user initiates 'em.

Copy the three included config files (A_pSystem, Sys_Activity and Weather_Station) into the /usr/local/pwidgets/widgets/configs directory (this will replace/overwrite the existing Weather_Station config... might want to save the original for a backup).

Next, copy the two lua scripts (draw_bg.lua and stev_bars2.lua) into the /usr/local/pwidgets/widgets directory.


For modifying an existing Pwidgets configuration file (in /usr/local/pwidgets/widgets/configs ), insert this code towards the bottom, just above the 'TEXT' section...

Code: Select all

lua_load /usr/local/pwidgets/widgets/draw_bg.lua
lua_draw_hook_pre draw_bg
... or if not using Pwidgets, modify the path and script (draw_bg.lua) location accordingly.

I'm on Precise 5.7.1 with OpenboxPlus/LxPanel, and had Pwidgets version 2.4.1 installed before installing battleshooter's four .pets from the first post - this actually sort of breaks Pwidgets, as it replaces the customized-for-Pwidgets conky - which I believe is modified to create background transparency that works on the unconventional rox desktop/pinboard. So now they'll either show the WM's full window border with titlebar, or flicker/disappear as they fight each other for transparency.

But with some tweaks of the Pwidgets' config (conky, really) files, it appears those issues resolve - allowing feh to do it's thing, as intended. So far, I've found the standard Pwidgets configs will work if the following lines are modified as follows -

Code: Select all

background yes
own_window yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_argb_visual no
I'm assuming the same settings will be useable running as regular conkies, as well.

Upsides - Looks cool - a lot nicer than solid background, IMO. Adds a bit of "elegance" to the regular ol' drawn-line-and-text/solid background conkies. Much easier to view/read than fully transparent conkies, and retains that viewing advantage across different wallpaper backgrounds/patterns/contrasts/etc.

Downsides are that it does bump CPU use a tiny bit (about 1% on my old dual-core laptop - no biggie) and - now that there's so much "stuff" being loaded at boot time - it seems they may occasionally clash as the desktop "builds", and won't completely load. I.E. - one missing conky window here, maybe have to click on the desktop once to bring up the taskbar another time, etc.

I might dig a bit and find how to add degrees of 'sleep' to some of those loading items - making it more sequential, so they stay out of each others' way (I've successfully done so on Mint).

FWIW - Just tinkering..... :)

Bob
Attachments
Trans_Lua.tar.gz
Semi-transparent Lua background script examples
(3.4 KiB) Downloaded 493 times

User avatar
battleshooter
Posts: 1378
Joined: Wed 14 May 2008, 05:10
Location: Australia

#90 Post by battleshooter »

Moat wrote:@ battleshooter -

Thanks a bunch for your work on this stuff - been having a blast playing around with conky/lua/feh since discovering this thread last year!!
Wow, I haven't seen this thread in a long time. Nice to see someone fiddling with it. I hope to one day come back to this and get a more modular system going.
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=94580]LMMS 1.0.2[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94593]Ardour 3.5.389[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94629]Kdenlive 0.9.8[/url]

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#91 Post by Moat »

battleshooter wrote:Wow, I haven't seen this thread in a long time.
Another one of those great threads that gets lost in the shuffle... :(
battleshooter wrote: I hope to one day come back to this and get a more modular system going.
In tinkering and thinking about this...

Turns out Pwidgets works quite well as a conky "manager" - for invoking/placing and saving conkies around the desktop. As far as I understand, the Pwidgets' devs have had to modify it's included conky, so as to allow "pseudo"-transparent conky backgrounds on the rox desktop.

With your approach (using feh) - that's no longer necessary. In fact, by including the Lua script I stumbled across - we can now have true transparency, opacity, and everything in between (semi-transparency)! I imagine not having to modify conky may make Pwidgets easier to maintain as Puppy evolves...?

I envision (ha! the easy part...) a complete .pet package that combines all of those elements into one - your four packages, the semi-transparent Lua script above, and Pwidgets (with it's included widget configs tweaked for these feh and Lua mods). Throw in some cool, complete conkies... sort of a "Pwidgets Pro". 8)

Ideally, an included script to automagically modify .xinitrc and set_bg would be wonderous... but I know just enough to realize that may be difficult/impossible, or likely dangerous.

It'd probably be fairly large, too (like between 1-2Mb?). But, ooooh... so cool! :shock:

Bob
Attachments
image-11.jpg
Pwidgets running two "conventional" conkies...
(68.95 KiB) Downloaded 1792 times
Last edited by Moat on Thu 19 Feb 2015, 09:53, edited 1 time in total.

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#92 Post by Moat »

Doh... dumb mistake...

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#93 Post by Moat »

Moat wrote:Downsides... now that there's so much "stuff" being loaded at boot time - it seems they may occasionally clash as the desktop "builds", and won't completely load. I.E. - one missing conky window here, maybe have to click on the desktop once to bring up the taskbar another time, etc.
Resolved this ^^ issue by moving the feh command 'feh --bg-scale /root/.background' to an earlier spot in .xinitrc - from about line 130 to 113 (as per pic attached). Now the desktop loads perfectly, 100% of the time.

Bob
Attachments
feh_code_placement.jpg
revised feh command placement in .xinitrc
(33.77 KiB) Downloaded 1667 times

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#94 Post by Moat »

Also been searching a while for - and not finding - a simple screen pixel ruler, that wouldn't pull in a ton of dependencies. But with 'feh' now installed it was very easy to make my own - simply using feh to display a border-less ruler image.

Pet attached (my first... please go easy on me... :oops: :) ). Alt+left-click to drag it around the screen, right-click pops up a wee feh menu with options to rotate to vertical, exit and a few other things...

Bob
Attachments
pixel_ruler1.jpg
Pixel ruler in action...
(56.39 KiB) Downloaded 1641 times
PixelRuler-1.0.pet
Pixel ruler - requires feh to be installed
(8.28 KiB) Downloaded 520 times

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

Conky on Tahrpup64.

#95 Post by drunkjedi »

So I installed Conky, liblua, libiconv, and feh from PPM and conky switcher pet from here.
I also made changes in both files you showed in op.

Well conky runs and switches themes nicely.
What I am not getting is transparent Background.

Any hint what I could do.

Thanks.

Edit: Conky "appears" transparent after I switch wallpaper.
I say "appears" because it mismatches with background. It's slightly off.
It seems due to my dual monitor setup.

Edit2: The slight mismatch is gone after changing "own_window_type desktop" to "own_window_type override" in conkyrc.
But it has a delay.


Any way to have true Transparency?

User avatar
solo
Posts: 389
Joined: Thu 14 Nov 2013, 20:33

#96 Post by solo »

Perhaps this link may be of some help:

http://conky.pitstop.free.fr/wiki/index ... y_%28en%29

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#97 Post by drunkjedi »

Thanks for the link.
I tried making sense of it.
But I am quit new to Linux.

What I came up is,
It uses composite Managers like xcompmgr or compton or compiz.
I don't know if they work with JWM I have and even if I install them how to make them work.

On other note, on very third line it says "it's good as long as you don't use LUA or IMLIB".
But all my conky use lua.
So I am not sure.

But I am just a novice.

User avatar
solo
Posts: 389
Joined: Thu 14 Nov 2013, 20:33

#98 Post by solo »

No I think you've summed it up pretty well.

What I think you can distill out of it is that either you ditch JWM as a window manager and run OpenBox instead, so you can then run one of those composite managers,....orrr, you use the normal transparancy calls in Conky, but then you have to NOT run Lua.

The only other option for transparancy is the one you already have and do not want.

So I suppose you'll have to decide where to go from here. What do you use Lua for in Conky? Might there be a way to achieve the same effect in Conky without it? How important is JWM for you as a window manager? Questions.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#99 Post by drunkjedi »

solo wrote:The only other option for transparancy is the one you already have and do not want.
Nah I can live with this. The only thing that was hindering me was my own ignorance and impatience.
After I used "own_window_type override" in conkyrc the thing is nicely transparent, also the slight delay is only at conky start and when changing wallpaper.
Thanks for your help.
solo wrote:What do you use Lua for in Conky? Might there be a way to achieve the same effect in Conky without it?
The Lua is used for the rings of clock and other things. I will look if any other way is there to do that.
here is how my desktop looks
Image
solo wrote:How important is JWM for you as a window manager?
Actually it's not that important, but I have Fatdog so I won't change my wm here but will do experiments in Fatdog.

Thanks friend.

User avatar
solo
Posts: 389
Joined: Thu 14 Nov 2013, 20:33

#100 Post by solo »

Yeah I think those rings are very much a Lua thing.

You have one slick looking desktop though I tell ya.

I would agree that a slight delay in appearance at startup should not be the reason to turn your whole config on its head.

In Conky, sometimes stuff like that may be caused by the loading order of elements in the conkyrc. I don't know how much room there is to experiment with that, but it's something to keep in mind.

Post Reply