SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#4926 2013-03-09 10:15:56

Gordon
#! CrunchBanger
From: Blackpool, Lancashire, UK
Registered: 2012-05-22
Posts: 238

Re: Conky v1.9 Thread

Hi Folks

well I have got rid of the warning

WARNING: gnome-keyring:: couldn't connect to: /home/gordon/.cache/keyring-f9X7

by coping an existing basic conky that comes with the distro but won't mark this as solved as I have no idea what caused it.

still no luck with the lua script though  sad  but I will keep trying  smile


Cheers smile smile
Gordon
Using Janice Testing at present also sid and systemd and  VSIDO
A7N8X delux motherboard, 1 GB ram, AMD ATHLON XP 2800+ ( 2255 Mhz ), Nvidia Geforce PNY 62000 graphics card

Offline

Help fund CrunchBang, donate to the project!

#4927 2013-03-09 10:32:01

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

<SCRIPT LANGUAGE="JavaScript">
var boltwood='1'
var icon
var bolttext 
if (boltwood == 0)
{icon = 'unknownsky.gif';bolttext='Unknown'}
else if (boltwood == 1)
{icon = 'clearsky.gif';bolttext='Clear'}
else if (boltwood == 2)
{icon = 'partcloudsky.gif';bolttext='Partly Cloudy'}
else if (boltwood == 3)
{icon = 'cloudsky.gif';bolttext='Very Cloudy'}
else if (boltwood == 4)
{icon = 'rainsky.gif';bolttext='Raining'}
document.write('<BR> <ALIGN=CENTER><IMG SRC=\"' + icon + '\" BORDER=0><BR>');
document.write('<ALIGN=CENTER><B><font color="yellow" face="Arial" size="2">' + bolttext + '</P></B>');
</SCRIPT>

Offline

#4928 2013-03-09 12:28:21

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

<SCRIPT LANGUAGE="JavaScript">
var boltwood='1'
var icon
var bolttext 
if (boltwood == 0)
{icon = 'unknownsky.gif';bolttext='Unknown'}
else if (boltwood == 1)
{icon = 'clearsky.gif';bolttext='Clear'}
else if (boltwood == 2)
{icon = 'partcloudsky.gif';bolttext='Partly Cloudy'}
else if (boltwood == 3)
{icon = 'cloudsky.gif';bolttext='Very Cloudy'}
else if (boltwood == 4)
{icon = 'rainsky.gif';bolttext='Raining'}
document.write('<BR> <ALIGN=CENTER><IMG SRC=\"' + icon + '\" BORDER=0><BR>');
document.write('<ALIGN=CENTER><B><font color="yellow" face="Arial" size="2">' + bolttext + '</P></B>');
</SCRIPT>

Offline

#4929 2013-03-09 13:10:15

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

-- ####################################
ptint ('hello world')
-- ####################################

Last edited by Sector11 (2013-03-09 13:10:57)

Offline

#4930 2013-03-09 14:26:18

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

Last edited by lionhead (2013-03-09 14:28:23)

Offline

#4931 2013-03-09 18:53:57

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: Conky v1.9 Thread

Offline

#4932 2013-03-09 18:55:41

VastOne
#! Ranger
From: V-Ger
Registered: 2011-04-26
Posts: 10,165
Website

Re: Conky v1.9 Thread

Very nice ansem_of_nexus!

Reminds me of an xBox controller...

Offline

#4933 2013-03-09 21:09:40

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

WARNING: gnome-keyring:: couldn't connect to: /home/gordon/.cache/keyring-f9X7tR/pkcs11: No such file or directory

Offline

#4934 2013-03-10 11:16:45

Gordon
#! CrunchBanger
From: Blackpool, Lancashire, UK
Registered: 2012-05-22
Posts: 238

Re: Conky v1.9 Thread

Hi Folks,

Thanks for your help

@ Sector11,

Thanks for that but just for once I had actuall spotted that typo

@ arclance,

Thanks for the info. Not sure that I understand what you are saying when you say windows manager. Do you mean slim and if so how do I add that command or is it in oopenbox that it has to go ?


Cheers smile smile
Gordon
Using Janice Testing at present also sid and systemd and  VSIDO
A7N8X delux motherboard, 1 GB ram, AMD ATHLON XP 2800+ ( 2255 Mhz ), Nvidia Geforce PNY 62000 graphics card

Offline

#4935 2013-03-10 14:08:29

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Last edited by Sector11 (2013-03-10 14:09:20)

Offline

#4936 2013-03-10 14:49:39

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

^ I believe that is correct for openbox but it needs to be

/usr/bin/gnome-keyring-daemon --start --components=pkcs11 &

if your window manager uses a startup script.

Offline

#4937 2013-03-10 15:54:10

Gordon
#! CrunchBanger
From: Blackpool, Lancashire, UK
Registered: 2012-05-22
Posts: 238

Re: Conky v1.9 Thread

Hi arclance,

Thanks for the quick reply.

I have just opened openbox autostart and that line is already inserted, still not to worry as it causes no problems I'll just ignore it in future.

Next question if I can tag it on Iget this

Conky: llua_load: /home/gordon/lua/GordonsScripts/hello:5: '=' expected near 'yes'

I have nothing in the script that has a yes near it what is that about please ?


Cheers smile smile
Gordon
Using Janice Testing at present also sid and systemd and  VSIDO
A7N8X delux motherboard, 1 GB ram, AMD ATHLON XP 2800+ ( 2255 Mhz ), Nvidia Geforce PNY 62000 graphics card

Offline

#4938 2013-03-10 22:56:33

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

Conky: llua_load: /home/gordon/lua/GordonsScripts/hello:5: '=' expected near 'yes'

Offline

#4939 2013-03-10 23:27:18

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: Conky v1.9 Thread

Last edited by Naik (2013-03-10 23:31:35)


*kaum macht man es richtig, funktioniert es sofort*

Offline

#4940 2013-03-11 01:50:03

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: Conky v1.9 Thread


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#4941 2013-03-11 21:14:27

Gordon
#! CrunchBanger
From: Blackpool, Lancashire, UK
Registered: 2012-05-22
Posts: 238

Re: Conky v1.9 Thread

Hi arclance,

Sorry about the long delays in posting but I am not around a lot at the moment, rather busy with other things.  neutral

Here is my autostart menu, I have done nothing to this at all.

(\
nitrogen --restore && \
cb-compositor --start && \
sleep 2s && \
conky -q && \
tint2 \
) &

## Enable hot corners
cb-hotcorners --daemon &

## FIXME: volumeicons requires an extra-long sleep,
## else it fails to start?!
(sleep 30s && volumeicon) &

## Enable power management
xfce4-power-manager &

## Start Thunar Daemon
thunar --daemon &

## Detect and configure touchpad. See 'man synclient' for more info.
if egrep -iq 'touchpad' /proc/bus/input/devices; then
    synclient VertEdgeScroll=1 &
    synclient TapButton1=1 &
fi

## Start xscreensaver
xscreensaver -no-splash &

## Start Clipboard manager
(sleep 3s && parcellite) &

## The following command runs hacks and fixes for #! LiveCD sessions.
## Safe to delete after installation.
cb-cowpowers &

## cb-welcome - post-installation script, will not run in a live session and
## only runs once. Safe to remove.
(sleep 10s && cb-welcome --firstrun) &

## cb-fortune - have Statler say a little adage
#(sleep 120s && cb-fortune) &

## GNOME PolicyKit and Keyring
(\
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 && \
/usr/bin/gnome-keyring-daemon --start --components=ssh && \
/usr/bin/gnome-keyring-daemon --start --components=secrets && \
/usr/bin/gnome-keyring-daemon --start --components=pkcs11 && \
/usr/bin/gnome-keyring-daemon --start --components=gpg \
) &

and here is my lua script

-- this is a lua script for use in conky

require 'cairo'

background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit celsius

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 100
gap_y 100
minimum_size 260 700
-- maximum_width 190
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment top left

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

override_utf8_locale yes
use_xft yes
xftfont Comic Sans MS:size=8
xftalpha 0.5
uppercase no

default_color FFFFFF
color1 888888
color2 AAAAAA
color3 DDDDDD
color4 CC3333
color5 F09000

-- start of main function

function conky_main()  

	if conky_window==nil then return end

	local cs=cairo_xlib_surface_create(conky_window.display,
		conky_window.drawable, 
		conky_window.visual, conky_window.width, conky_window.height)
	local cr=cairo_create(cs)

	if updates(conky_parse('${updates}'))>5 then
		-- ####################################
		text1='hello world'
        print (text1)
        -- ####################################
	end  --if updates

	cairo_destroy(cr)
	cairo_surface_destroy(cs)
	cr = nil
	
end  -- main function

I have tried it with just "print 'hello world'" as well as the way you see it now with the same result


Cheers smile smile
Gordon
Using Janice Testing at present also sid and systemd and  VSIDO
A7N8X delux motherboard, 1 GB ram, AMD ATHLON XP 2800+ ( 2255 Mhz ), Nvidia Geforce PNY 62000 graphics card

Offline

#4942 2013-03-12 01:06:41

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

## GNOME PolicyKit and Keyring
(\
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 && \
/usr/bin/gnome-keyring-daemon --start --components=ssh && \
/usr/bin/gnome-keyring-daemon --start --components=secrets && \
/usr/bin/gnome-keyring-daemon --start --components=pkcs11 && \
/usr/bin/gnome-keyring-daemon --start --components=gpg \
) &

Offline

#4943 2013-03-12 18:06:34

Gordon
#! CrunchBanger
From: Blackpool, Lancashire, UK
Registered: 2012-05-22
Posts: 238

Re: Conky v1.9 Thread

Hi arclance

Thanks for that. I will try all that out later, poss tomorrow, going out now for the night with the ball and chain for a meal etc.
will let you know how it all goes later on  smile


Cheers smile smile
Gordon
Using Janice Testing at present also sid and systemd and  VSIDO
A7N8X delux motherboard, 1 GB ram, AMD ATHLON XP 2800+ ( 2255 Mhz ), Nvidia Geforce PNY 62000 graphics card

Offline

#4944 2013-03-13 18:39:37

Gordon
#! CrunchBanger
From: Blackpool, Lancashire, UK
Registered: 2012-05-22
Posts: 238

Re: Conky v1.9 Thread

Hi arclance,

Well I have got there in the end. It is now working. I managed to find a couple of mistakes that I had made

The first one was I had pointed lua_draw_hook_pre to the wrong place / item ( main_box instead of conky_main ) in .conkyrc

The second one was a complete mess up of ' if updates ' which I had jumbled up with ' local updates '. All put ito one line of nothingness

Anyway thanks for all your time and efforts to sort me out without which I doubt that I would have got anywhere at all  big_smile

THANK YOU


Cheers smile smile
Gordon
Using Janice Testing at present also sid and systemd and  VSIDO
A7N8X delux motherboard, 1 GB ram, AMD ATHLON XP 2800+ ( 2255 Mhz ), Nvidia Geforce PNY 62000 graphics card

Offline

#4945 2013-03-14 10:57:46

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: Conky v1.9 Thread

Last edited by Naik (2013-03-15 10:33:35)


*kaum macht man es richtig, funktioniert es sofort*

Offline

#4946 2013-03-14 11:22:04

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

i made a function that displays several variables in conky and adds automatically custom endings.

the most variables that shows the unit 'percent' have the word 'perc' or 'percent within the name of the variable, for example

memperc

the variable 'cpu' also displays the unit % the problem is that this word doesn't use the word 'perc'. but there are also other variables that contain the word 'cpu' within, for example cpugauge

when i use this then it wont work

string.find(conky_variable, "cpu")~= nil

do u have an idea how i fix this?

Offline

#4947 2013-03-14 16:15:33

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: Conky v1.9 Thread

Offline

#4948 2013-03-14 22:12:45

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

memperc

Offline

#4949 2013-03-15 02:06:12

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: Conky v1.9 Thread

@ansem_of_nexus:
I tryed to, but recently i can`t get it to work...

edit: as for my last post: is there by any means a chance to wrap the output of the conky to the surface of the tablet? maybe with lua?

Last edited by Naik (2013-03-15 10:35:38)


*kaum macht man es richtig, funktioniert es sofort*

Offline

Help fund CrunchBang, donate to the project!

#4950 2013-03-15 17:22:44

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

i hope that this works for all conky-variables:

function conky(cd)
-----------------------------
local conky_order=nil
local variable=nil
local device=nil
local del=nil
local cs = nil
local ms = nil
-----------------------------
variable=cd.variable
device=(cd.device or '')
del=(cd.del or '.')
-----------------------------
conky_order=conky_parse("${"..variable..' '..device.."}")

local value = conky_order:gsub(" ","") 

	---- short_units no ------------------------
	if ((string.find(value, "iB") == nil) and (string.find(value, "B") ~= nil)) then
		ms=(value:gsub("B",""))..' byte'	
	elseif string.find(value, 'KiB') ~= nil then
		ms=(value:gsub("KiB",""))..' kb'
	elseif string.find(value, 'MiB') ~= nil then
		ms=(value:gsub("MiB",""))..' mb'
	elseif string.find(value, 'GiB') ~= nil then
		ms=(value:gsub("GiB",""))..' gb'
	elseif string.find(value, "TiB") ~= nil then
		ms=(value:gsub("TiB","")).." tb"	
	elseif ((string.find(variable, "perc") ~= nil) or (string.find(variable, "percent") ~= nil)) then
		ms=conky_order.." %"
	elseif ((string.find(variable,"freq") ~= nil) and (string.find(variable,"_g") == nil)) then
		ms=conky_order.." Mhz"
	elseif ((string.find(variable,"downspeedf") ~= nil) or (string.find(variable,"upspeedf") ~= nil)) then
		ms=value:gsub(" ","").." kb/s"
	elseif string.find(variable,"time") ~= nil then
		ms=conky_order:gsub(" ","")
	elseif string.find(variable,"cpu") ~= nil then
		ms=conky_order.." %"
	---- short_units yes -----------------------
	elseif ((string.find(value, "iB") == nil) and (string.find(value, "B") ~= nil)) then
		ms=(value:gsub("B",""))..' byte'
	elseif string.find(value, "K") ~= nil then
		ms=(value:gsub("K",""))..' kb'
	elseif string.find(value, "M") ~= nil then
		ms=(value:gsub("M",""))..' mb'
	elseif string.find(value, "G") ~= nil then
		ms=(value:gsub("G",""))..' gb'
	elseif string.find(value, "T") ~= nil then
		ms=(value:gsub("T",""))..' tb'
	------------------------------------------------------
	else ms=value:gsub(" ","") end
	------------------------------------------------------
	cs=string.gsub(tostring(ms),"%.",del)
	
	return cs
end -- of function

if u see something to optimize then please pm me smile

edit: i still have problems when this code is behind the first line:

	elseif ((string.find(variable,"upspeed") ~= nil) and (string.find(variable,"f") == nil)) then
		ms=value:gsub(" ","")

Last edited by lionhead (2013-03-15 20:38:24)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo