SEARCH

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

You are not logged in.

#3476 2012-10-24 20:02:30

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

jed wrote:

Ok, so here's my interpretation of 'mclovin's' Time & Calendar conky, using conkyforecast to pull the Sunrise/Sunset/Moon Phase script, and using his 'horical.sh' for the days of the week and the numbers displayed under them, and the 'night-day.template' to pull the sun/moon image and give the time till sunrise/sunset and also the moon phase. (wow, I hope that is the right way to say all that)

My dispaly is 1920x1080.  All mistakes are mine alone!  Creativity is not my strong suit.  If the code looks tattered, it's cause all I can do is 'CTRL-C' and 'CTRL-V'.  It took all my mental might to learn the aforementioned commands!  Thus there is no room left for creativity and I'm left 'borrowing' (cough-cough) every-one else's ideas and conkys.  I wish I could remember who started me down this conky path...  Thanks to who-ever it was, I can barely remember the last 2 months, and my wife is telling me "it's her or conky"!

So here is the SUN screenshot;
And here is the MOON screenshot;


Jed

That is more or less exactly correct. the day/night.template pulls in the info on the sunrise/sunset times, and the image displayed, is actually dependent on 2 things, during the day, it will actually show the current weather conditions, so if its cloudy out, the sun wont be shown, but the current conditions image is, and at night, it shows an image for the current moon phase. I decided to do the conditions image for day, as the sun isn't always out, so just having a generic image of the sun, just somehow seemed wrong to me, (not really sure why, maybe it's my OCD yikes ), but there are different images available for the moon phase, so that seemed to be the correct way to go in my mind.


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

Help fund CrunchBang, donate to the project!

#3477 2012-10-24 20:22:13

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

@MarioTheGandhi

To be perfectly honest, conky isn't like other programs, where you download something you like, and just run it, there are configuration files that you have to take into account, and you have to look through them to make sure that things in them match your particular system.
This is a great place to look for help on how to do that, and anyone here I think will be more than happy to help you on your adventure to the dark side that is conky, (yea yea, I know, it's a really stupid corny line, leave me alone).

But I will say this, something you really have to do is to look around the web and start reading about how conky works, and how it interacts with your system, otherwise, you're just gonna be putting things on your screen, and have no idea how to fix anything that isn't right, or if, and this unlikely, someone was malicious enough to put harmful commands into a config that they upload for someone to run on their system, you really need to know what to look for.
Some good things to read, and a few great places to start are,

So, start reading, start experimenting, and you will learn faster than you thought you could. Good luck, and if you need any help, like I said, I'm sure everyone here would be more then happy to help you out, at least I would, cuz I really have no life, or anything else going on really lol.


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

#3478 2012-10-24 20:47:49

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

@Sector11
I am working on trying to make a template for the forecast, but due to the many ${voffset} and ${goto} variables, I'm finding it a bit difficult, so I think maybe I'm just gonna leave the current set-up as is, and on my next one, I'll work on changing it to a single execpi to a template, so all I'm gonna do for now I think, is remove the conky*.py scripts, and leave that to the user to install them on their own, and just add to the read-me that they need to install them, and what ones I have in the config, and that they can change them to suit their needs and system. So if you want, and when you find the time, you can just upload the current one as-is, or download the new one, with the conky*.py files removed, which has reduced the file sizy to only 709.6kb, here is the link to it,
http://db.tt/dU5O23fk


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

#3479 2012-10-24 21:19:29

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

Re: Conky v1.9 Thread

VastOne wrote:
MarioTheGandhi wrote:

If its any help, this is the one I want to install.

I downloaded that and got it to work, but the code is a mess and I had to change just about everything in it.  It does not format correctly and is missing fonts as well.

You might want to try a different one...

Clad you did that, I grabbed, it but didn't have time to look at it.  Grrrrrrrrrrr!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#3480 2012-10-24 21:23:49

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

Re: Conky v1.9 Thread

jed wrote:

I gotta say, between eating, and conky;  eating is highly over-rated!!!  Gotta start giving my wife equal time or she just 'might' resort to the 12-gauge!!!  tongue

Jed

I have been know to commit one of the cardinal sins of computing - and eat that the computer desk.  But I'll never tell you that.  big_smile

{looking down} hmmmmmmmm time to stop eating for a bit anyway. lol


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#3481 2012-10-24 21:26:46

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

Re: Conky v1.9 Thread

McLovin wrote:

So if you want, and when you find the time, you can just upload the current one as-is, or download the new one, with the conky*.py files removed, which has reduced the file sizy to only 709.6kb, here is the link to it,
http://db.tt/dU5O23fk

OK, I got it.  Tonight or first thing tomorrow morni... oh wait, gotta go out - tomorrow afternoon.  big_smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#3482 2012-10-24 23:33:39

lwfitz
#! Die Hard
From: Monrovia, CA
Registered: 2012-01-19
Posts: 886
Website

Re: Conky v1.9 Thread

Sector11 wrote:

I have been know to commit one of the cardinal sins of computing - and eat that the computer desk.  But I'll never tell you that.  big_smile

{looking down} hmmmmmmmm time to stop eating for a bit anyway. lol

Eating at the computer is a sin?........... *sigh*............ my therapist really has his work cut out for him cool

Offline

#3483 2012-10-25 02:38:45

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

lwfitz wrote:
Sector11 wrote:

I have been know to commit one of the cardinal sins of computing - and eat that the computer desk.  But I'll never tell you that.  big_smile

{looking down} hmmmmmmmm time to stop eating for a bit anyway. lol

Eating at the computer is a sin?........... *sigh*............ my therapist really has his work cut out for him cool

At least you still have one, mine killed himself sad


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

#3484 2012-10-25 03:54:55

omns
#! wanderer
From: ~/
Registered: 2008-11-25
Posts: 5,131

Re: Conky v1.9 Thread

eeek, that doesn't sound good McLovin yikes

Just noticed you active at the forums. It's good to have you here smile

Offline

#3485 2012-10-25 04:03:38

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

omns wrote:

eeek, that doesn't sound good McLovin yikes

Just noticed you active at the forums. It's good to have you here smile

So this is where you went, I was wondering what happened to you, how you been?


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

#3486 2012-10-25 04:16:16

omns
#! wanderer
From: ~/
Registered: 2008-11-25
Posts: 5,131

Re: Conky v1.9 Thread

^ Pretty good mate smile I check in on Mint now and then but don't follow it to closely. Are you still involved there?

Offline

#3487 2012-10-25 04:58:23

lwfitz
#! Die Hard
From: Monrovia, CA
Registered: 2012-01-19
Posts: 886
Website

Re: Conky v1.9 Thread

McLovin wrote:
lwfitz wrote:
Sector11 wrote:

I have been know to commit one of the cardinal sins of computing - and eat that the computer desk.  But I'll never tell you that.  big_smile

{looking down} hmmmmmmmm time to stop eating for a bit anyway. lol

Eating at the computer is a sin?........... *sigh*............ my therapist really has his work cut out for him cool

At least you still have one, mine killed himself sad




........ * awkward silence*................... Actually Im laughing but afraid to tell you in case its true hmm

Offline

#3488 2012-10-25 13:33:29

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

Re: Conky v1.9 Thread

lwfitz wrote:

........ * awkward silence*................... Actually Im laughing but afraid to tell you in case its true hmm

lol lol lol I'm going with: he was joking.

lol lol lol and that's from your statement.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#3489 2012-10-25 23:29:47

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

Re: Conky v1.9 Thread

@ McLovin

Your conky is up at Conky PitStop in the 2012 2 Gallery and in the Featured spot until the next one goes up.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#3490 2012-10-26 02:28:06

kura
New Member
Registered: 2012-10-21
Posts: 3

Re: Conky v1.9 Thread

Sector11 wrote:

Are you saying that your font changes when you change your 'locale' or keyboard layout?

<snip>

Quite possibly I'm going off in a different direction here, if so can you explain more?

sorry I didn't explain it correctly

here's my situation :
I can't display japanese letter with Terminus font, while IPAGothic font displays it correctly
but I want conky to use Terminus to display letter from a-Z 1-0 etc, and for displaying japanese letter, it will use IPAGothic instead.

here's my config :

update_interval 2
out_to_console yes
use_xft yes
xftfont Terminus:size=7
xftalpha 1

TEXT

${color 6767f7}MPD: ${color} ${mpd_artist} - ${mpd_title}

and here's the result :
bgaoo.png
as you can see the japanese font isn't displayed correctly (nnnn)
______________

and here's the result when I change the xftfont to IPAGothic :
pixgE.png
______________

here's the result I want to achieve (illustrated with gimp)
oasjl.png

any help would be appreciated big_smile

PS : if it is not possible, i am planning to use a bitmapped font with included japanese support, but i cant find any
do you know one?

Last edited by kura (2012-10-26 02:30:44)

Offline

#3491 2012-10-26 02:38:45

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

Re: Conky v1.9 Thread

^ I believe the only way to do that is to write a script that checks each character to see what language it is in and changes the font that is used when the language changes.
I know that can be done in Python but I don't know about Lua.

Edit:
It should be possible to do with string.byte() in Lua using the byte range for Japanese characters to detect when Japanese is being used.
I am not sure what that byte range is but is should be possible to look it up somewhere.

Last edited by arclance (2012-10-26 03:38:09)

Offline

#3492 2012-10-26 03:39:07

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

^^ to clarify further... the output from ${mpd_artist} might be in english OR japanese?
when its in english you want the artist name displayed with terminus and when its japanese you want it displayed with IPA gothic?

Offline

#3493 2012-10-26 07:20:51

McLovin
#! CrunchBanger
From: my computer chair
Registered: 2009-02-28
Posts: 105
Website

Re: Conky v1.9 Thread

Sector11 wrote:

@ McLovin

Your conky is up at Conky PitStop in the 2012 2 Gallery and in the Featured spot until the next one goes up.

WOW, thank you, now I have to start work on my next one, I think I might go with bars and graphs, or even bars and rings, we'll see what way I go.


8o Got /? | The first GUI, and "on-line" system was created in 1968 by Douglas Engelbart, the system included modern day innovations such as video conferencing, and on-line file sharing.

Offline

#3494 2012-10-26 14:44:25

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

Re: Conky v1.9 Thread

kura wrote:

any help would be appreciated big_smile

PS : if it is not possible, i am planning to use a bitmapped font with included japanese support, but i cant find any
do you know one?

Your best bet there would be johnraff.

As for "Japanese fonts" I just searched that in Synaptic - there are lots.

Some I have, two of which are:

fonts-droid

The Droid family of fonts consists of Droid Sans (Regular and Bold),
Droid Sans Mono (Regular) and Droid Serif (Regular, Bold, Italic and
BoldItalic).

Each contains extensive character set coverage including
Western Europe, Eastern/Central Europe, Baltic, Cyrillic, Greek and
Turkish support. The Droid Sans regular font also includes support for
Arabic, Simplified and Traditional Chinese, Hebrew, Japanese, Korean and
Thai.

Droid was designed by Ascender's Steve Matteson and hinted to provide
optimal quality for screen text.

do a search for "wqy" - while Chinese they have support for Japanese as well as Korean

Oh nice:  xfonts-mplus

M+ bitmap fonts were designed to be simple and highly readable.  It
includes ISO-8859-1,15 (6/10/12 dot) fonts and all Japanese jisx0208.1990
Kanji fonts (10/12 dot) as following:

- mplus-gothic: M+ Gothic fonts               (10/12dot, ISO-8859-1/Japanese)
- mplus-goth_p: it's similar to mplus-gothic, but its latin character part
                 is proportional fonts         (10/12dot, ISO-8859-1/Japanese)
- mplus-fxd: yet another "fixed" fonts        (10/12dot, ISO-8859-1/15)
- mplus-hlv: yet another "helvetica" fonts    (10/12dot, ISO-8859-1/15)
- mplus-hlvw: 1 dot wide fonts than mplus-hlv (   12dot, ISO-8859-1/15)
- mplus-sys: for window title/menu            (10dot,    ISO-8859-1/15)
- mplus-qub: 6 dot very small font            (6dot,     ISO-8859-1/15)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#3495 2012-10-26 14:51:23

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Re: Conky v1.9 Thread

CJK fonts, there's something about it in the wiki: http://crunchbanglinux.org/wiki/howto/e … s_and_mozc

+1 for xfonts-wqy


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#3496 2012-10-26 15:56:59

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

Re: Conky v1.9 Thread

machinebacon wrote:

CJK fonts, there's something about it in the wiki: http://crunchbanglinux.org/wiki/howto/e … s_and_mozc

+1 for xfonts-wqy

I don't do anything with Japanese but I do like the wqy fonts.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#3497 2012-10-26 16:58:15

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

Re: Conky v1.9 Thread

I think that what kura has going on is that he has some lines in his conky that are sometimes in English and sometimes in Japanese.
If I understand him correctly he wants to change the font used for each section of the text automatically when the language changes.
You can use string.byte() in Lua to check when a character falls in the CJK range (227-240) and change the font to the one you use for Japanese when that happens and change it back when it is outside that range.
This is a quick example of how you could do it, though I have not tested it so I don't know if it works or not.

--# input = {"conky_command", "English_font", "Asian_Font"}
function conky_langcheck(input)
    local data = conky_parse(tostring(input[1]))
    local output = nil
    local currentLang = nil
    if ((data:byte(1) >= 227) and (data:byte(1) <= 240)) then
        output = "${font "..input[3].."}"..data:sub(1)
        currentLang = 2
    else
        output = "${font "..input[2]].."}"..data:sub(1)
        currentLang = 1
    end --# if ((data:byte(1) >= 227) and (data:byte(1) <= 240)) then
    for i = 2, #data do
        local dataByte = data:byte(i)
        if ((dataByte >= 227) and (dataByte <= 240) and (currentLang == 1)) then
            output = output.."${font "..input[3].."}"..data:sub(i)
            currentLang = 2
        elseif (currentLang == 2) then
            output = output.."${font "..input[2].."}"..data:sub(i)
            currentLang = 1
        else
            output = output..data:sub(i)
        end --# if ((dataByte >= 227) and (dataByte <= 240) and (currentLang == 1)) then
    end --# for i = 2, #data do
    return output
end --# function conky_langcheck(input)

Offline

#3498 2012-10-27 04:53:51

kura
New Member
Registered: 2012-10-21
Posts: 3

Re: Conky v1.9 Thread

mrpeachy wrote:

^^ to clarify further... the output from ${mpd_artist} might be in english OR japanese?

yes, it might be in english or japanese
because some of my songs have it in english some in japanese

mrpeachy wrote:

when its in english you want the artist name displayed with terminus and when its japanese you want it displayed with IPA gothic?

yes, big_smile

Sector11 wrote:
kura wrote:

any help would be appreciated big_smile

PS : if it is not possible, i am planning to use a bitmapped font with included japanese support, but i cant find any
do you know one?

Your best bet there would be johnraff.

umm.. what is johnraff?

and thanks for the fonts.. gotta look it up later

arclance wrote:

I think that what kura has going on is that he has some lines in his conky that are sometimes in English and sometimes in Japanese.
If I understand him correctly he wants to change the font used for each section of the text automatically when the language changes.
You can use string.byte() in Lua to check when a character falls in the CJK range (227-240) and change the font to the one you use for Japanese when that happens and change it back when it is outside that range.
This is a quick example of how you could do it, though I have not tested it so I don't know if it works or not.

--# input = {"conky_command", "English_font", "Asian_Font"}
function conky_langcheck(input)
    local data = conky_parse(tostring(input[1]))
    local output = nil
    local currentLang = nil
    if ((data:byte(1) >= 227) and (data:byte(1) <= 240)) then
        output = "${font "..input[3].."}"..data:sub(1)
        currentLang = 2
    else
        output = "${font "..input[2]].."}"..data:sub(1)
        currentLang = 1
    end --# if ((data:byte(1) >= 227) and (data:byte(1) <= 240)) then
    for i = 2, #data do
        local dataByte = data:byte(i)
        if ((dataByte >= 227) and (dataByte <= 240) and (currentLang == 1)) then
            output = output.."${font "..input[3].."}"..data:sub(i)
            currentLang = 2
        elseif (currentLang == 2) then
            output = output.."${font "..input[2].."}"..data:sub(i)
            currentLang = 1
        else
            output = output..data:sub(i)
        end --# if ((dataByte >= 227) and (dataByte <= 240) and (currentLang == 1)) then
    end --# for i = 2, #data do
    return output
end --# function conky_langcheck(input)

wow it seems hard
but it looks like what I've been looking for

--

anyway, thanks for the help guys.. guess I'll just bookmark these posts first
then tinker with conky later if I have free time big_smile

Last edited by kura (2012-10-27 04:54:33)

Offline

#3499 2012-10-27 17:13:21

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Conky v1.9 Thread

kura wrote:
mrpeachy wrote:

when its in english you want the artist name displayed with terminus and when its japanese you want it displayed with IPA gothic?

yes, big_smile

Sector11 wrote:
kura wrote:

any help would be appreciated big_smile

PS : if it is not possible, i am planning to use a bitmapped font with included japanese support, but i cant find any
do you know one?

Your best bet there would be johnraff.

umm.. what is johnraff?

Me.

Sector11 flatters me if he suggests I have the answer to all things related to Japanese support. I don't generally use bitmap fonts much, but it just happens that machinebacon recommended the Chinese bitmap font xfonts-wqy a couple of days ago, and it includes "kana" so might display Japanese OK.

I wonder why you need two different fonts for English and Japanese? Japanese fonts usually include all the English characters too. For example, on my system I use VLP Gothic for everything, and it looks pretty nice.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

Be excellent to each other!

#3500 2012-10-28 04:18:35

stolid
#! CrunchBanger
Registered: 2012-09-06
Posts: 206

Re: Conky v1.9 Thread

Is there a way to have centered text with a hr on both sides? Kind of like: --- Text ---

My guess is that this is impossible, but I'd love to be proven wrong...


Registered Linux User #555399
crunchbox:     Phenom II X6 1055T | 8GB RAM | OCZ Vertex 4 128GB | Radeon 7870XT | Win7 / #! 11 (i3 WM)
lambdacore:     4x Opteron 8431 | 16GB RAM | 2x1TB mirrored (ZFSoL) | Debian 7 (headless)
crunchtop:     Acer Aspire 1410 11.6" | 2GB RAM | Crucial M4 128GB | #! 11 (i3 WM)

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: acrobat

Debian Logo