Announcement

Collapse
No announcement yet.

Yet Another Conky Thread

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Don B. Cilly
    replied
    Well, the reason I use uppercase is because it is fixed length, whereas lowercase, with that font, varies.
    I could change font, but | tr a-z A-Z (which does work very well without brackets and all) does it, so...

    I just mentioned that for me it also improves legibility, but only in the sense that the font is small and greenish - I like it that way.

    Click image for larger version

Name:	addr.png
Views:	1
Size:	11.8 KB
ID:	644478

    Leave a comment:


  • jlittle
    replied
    Originally posted by Don B. Cilly View Post
    You mean you find
    2a01:c50f:9a94:6800:1851:3513:1471:ef18
    more legible than
    2A01:C50F:9A94:6800:1851:3513:1471:EF18
    ?
    Definitely. Consider these pairs of addresses:
    Code:
    2a01:c50f:9a94:6800:1851:3513:1471:ef18
    2a01:c50f:9a94:6b00:1b51:3513:1471:ef1b
    
    2A01:C50F:9A94:6800:1851:3513:1471:EF18
    2A01:C50F:9A94:6B00:1B51:3513:1471:EF1B
    IMO it's really hard to tell the second pair apart. But, I'll attempt some objectivity...

    With Conky you're economizing on screen space, so lets say you're using 10 point, say Ubuntu Mono Regular. Using Spectacle on my 1080p display, Imagemagick convert image1 image2 -compose Difference -composite -colorspace gray -format '%[fx:mean*100]' info: says the lower-case forms are 14.8% different, but the upper-case ones are 0.7% different. Note I know little about quantifying image differences, I just googled and noticed a method using Imagemagick, which I've found very useful in the past for several purposes.

    Leave a comment:


  • Don B. Cilly
    replied
    You mean you find
    2a01:c50f:9a94:6800:1851:3513:1471:ef18
    more legible than
    2A01:C50F:9A94:6800:1851:3513:1471:EF18
    ?

    Leave a comment:


  • jlittle
    replied
    😉 (in case your browser font doesn't do recent Unicode, that's trying to be a large winking face )
    Originally posted by Don B. Cilly View Post
    Printing them all in uppercase ...
    This also improves readability.
    Never. Upper-case letters together are horrible, especially with sans serif fonts. Use of such has demonstrably cost lives on highways. I have hated their use since my first job; there, those who used them a lot tended to have, to varying degrees, incompetence, stupidity, meanness, and dishonesty (cruelly so to me in one case). Lower-case is the unixy and internet way; upper-case reeks of DOS and Windows.

    Anyway, RFC 5952, section 4.3, says
    The characters "a", "b", "c", "d", "e", and "f" in an IPv6 address must be represented in lowercase.
    'E' is not far from 'F', and 'D' is easily mistaken for '0' or 'B', which is easily confused as '8'. (Came across that one a couple of weeks ago.)

    By the way, a digression for the scripting nerd: tr '[a-z]' '[A-Z]' has redundant square brackets; it happens to work because the square brackets map onto each other. The square brackets were an ancient SystemV unix usage, POSIX (and thus Gnu tr and thus Linux) went with the BSD tr. One can use tr '[:lower:]' '[:upper:]', but tr a-z A-Z works just as well, which isn't in fact very well. If you were, say, the Prime Minister of Vietnam, tr will upper-case your name to NGUYễN XUâN PHúC. Gnu awk does a better job:
    Code:
    $ sudo apt install gawk
    $ echo Nguyễn Xuân Phúc | awk '{print toupper($0)}'
    [size=3]NGUYỄN XUÂN PHÚC[/size]

    Leave a comment:


  • Don B. Cilly
    replied
    Yet another (un)interesting factlet:
    Not only does the V6 address change at every boot, but its string changes length.

    This is due to two things:
    - Leading zeros are not printed, so some hextets have only three characters - or less. It doesn't seem to happen very often.
    - Letters in the HEX groups are lowercase. which also varies the length.

    Printing them all in uppercase is really easy:
    curl -s http://icanhazip.com | tr '[a-z]' '[A-Z]'
    This also improves readability.

    Replacing leading blanks for zeros would be a bit more difficult. Not very, but at the moment I don't actually need a fixed-length string all that much.
    Now, of course V4 addresses change length all the time, but they're short enough. V6 ones are longer than telephone wires ;·) and take up all possible horizontal space, so having them behave in an unruly way... messes up my lovely conky a bit :·)

    And uppercase improves readability.

    Leave a comment:


  • Don B. Cilly
    replied
    Another (un)interesting factlet:
    Whereas my IPV4 address remains the same through router reboots, the V6 one changes every time.
    The first four hextets remain the same, the last four change. :·)

    [Correction] A computer reboot will quite suffice for it to change.
    Last edited by Don B. Cilly; Dec 26, 2019, 02:56 AM.

    Leave a comment:


  • Don B. Cilly
    replied
    Interesting factlet for conky buffs:
    Since last night icanhazip.com returns the IPV6 address. To get the V4 one you can use checkip.amazonaws.com

    Code:
    $ curl -s http://icanhazip.com
    2a01:c50f:9a94:6800:91f3:652e:8e64:569e
    
    $ curl -s http://checkip.amazonaws.com
    92.56.100.55
    (actual addresses abridged) >:·)

    Leave a comment:


  • kubicle
    replied
    Nah, I'm just waiting for those black holes to evaporate, kind of a slow process taking roughly 10^70 years (give or take a few zeroes), but it should give me some time to read all the books I have planned to read.

    Leave a comment:


  • TWPonKubuntu
    replied
    Just planning to be around for the collision of the Milky Way and Andromeda galaxies. Fireworks are expected. If you miss it by a factor of 1000, no problem, it will last a while.

    Remember that computers may evolve beyond 64 bit resolution, maybe even go to quantum computing in our lifetimes.

    Leave a comment:


  • kubicle
    replied
    Originally posted by jlittle View Post
    (Ignoring the advice in the OP's handle.)

    my calculator says 60 * 60 * 24 * 365.2425 * 1 trillion is 3.1556952e+19 (assuming the "short scale" braindamage). Finding power to keep the computer going that long might be difficult; I've assumed it will have been moved to a "better" place than the earth, which will be too hot in a few hundred million years.

    Slightly less ridiculously, trying to specify a number of seconds that overflows a 64 bit signed integer, about 9.2e18, might be problematic.

    As you are all probably aware, I didn't suggest it seriously, it wouldn't really be practical...or sane. Was fairly sure that someone would count it, though
    (If it's not a server, making the interval a year [or a few months] would probably suffice to never update it...again with no practical benefits except that fuzzy feeling you get from needless optimizing).

    Leave a comment:


  • TWPonKubuntu
    replied
    Ah, I had too many digits in 1 Trillion, high by a factor of 1000. Guess I'm too old...

    Leave a comment:


  • jlittle
    replied
    (Ignoring the advice in the OP's handle.)
    Originally posted by TWPonKubuntu View Post
    1.893456e+21 seconds
    my calculator says 60 * 60 * 24 * 365.2425 * 1 trillion is 3.1556952e+19 (assuming the "short scale" braindamage). Finding power to keep the computer going that long might be difficult; I've assumed it will have been moved to a "better" place than the earth, which will be too hot in a few hundred million years.

    Slightly less ridiculously, trying to specify a number of seconds that overflows a 64 bit signed integer, about 9.2e18, might be problematic.

    Leave a comment:


  • TWPonKubuntu
    replied
    1.893456e+21 seconds
    Don't worry about it, your retirement funds will be cut off long before then.

    Leave a comment:


  • Don B. Cilly
    replied
    I could, but working out what the trillion years come to in seconds is too resource-intensive... for me

    Leave a comment:


  • kubicle
    replied
    Originally posted by Don B. Cilly View Post
    The way I understand it though - and I may be wrong but it looks like it - is, exec keeps executing at every cicle (1 sec by my update_interval), execi at defined intervals.
    So I put 100 minutes as if to say, don't bother. ;·)
    Good answer

    You're right, of course, it's been a good while since I toyed with conky configs (and checked the man page)...still, you could only update after a few trillion years (not that it is really that resource intensive).

    Leave a comment:

Working...
X