Husse

Chat about anything related to Linux Mint
Post Reply
User avatar
Superewza
Level 4
Level 4
Posts: 205
Joined: Sun Oct 25, 2009 4:44 pm
Location: Newcastle upon Tyne, England, Europe, Earth, ZZ9 Plural Z Alpha, Milky Way, Universe, Multiverse

Husse

Post by Superewza »

Well i've since moved on to far more stupid things (Arch) i've been missing the Husse quotes fortunes. Plan is to put them in Conky using shuf, i was wondering if there's a .list file with all of them in somewhere? Or even just a list, i'm quite competent with copying and pasting.

While i'm at it, being a bit of a conky newbie i'm using this line:

Code: Select all

{exec shuf -n 1 ~/.conky/[file name].list}
Which works, but it goes through one every second, which is rather fast. Is it possible to set a time variable? Also, is it possible to tell it to use more than one line? Or choose from two seperate .list files?

Thanks for the help, and most of all thanks to Husse, Requiescat in Pace.
User avatar
pluraldave
Level 5
Level 5
Posts: 705
Joined: Mon Sep 01, 2008 8:05 am

Re: Husse

Post by pluraldave »

The Husse fortune quotes can be found (from a Mint installation) in /usr/share/games/fortune/

You should use execi instead of exec if you want a custom interval, specified in seconds as

Code: Select all

${execi interval command}
For instance if you had fortune installed you could just use

Code: Select all

${execi 60 /usr/games/fortune}
which would take care of the multiple lists (inserted into /usr/share/games/fortune/).

You can add the fold command to wrap lines (see man fold) so the command becomes

Code: Select all

${execi 60 /usr/games/fortune | fold -sw20}
s specifies to break only at spaces.
w specifies the number of characters to break after (20 in example).

Or using your command:

Code: Select all

${execi 60 shuf -n 1 ~/.conky/[file name].list | fold -sw20}
For a new quote every 60 seconds and a 20 character width.
User avatar
Superewza
Level 4
Level 4
Posts: 205
Joined: Sun Oct 25, 2009 4:44 pm
Location: Newcastle upon Tyne, England, Europe, Earth, ZZ9 Plural Z Alpha, Milky Way, Universe, Multiverse

Re: Husse

Post by Superewza »

That worked brilliantly, cheers. I took the text files from my old Min 9 Live CD, copied them into /usr/share/fortune (games doesn't seem to exist in Arch), along with a few others then ran 'sudo strfile [filename] [filename].dat. After ironing out a few problems with conky cutting text off:
Screenshot.jpg
Screenshot.jpg (755.44 KiB) Viewed 1571 times
User avatar
Fandangio
Level 4
Level 4
Posts: 368
Joined: Fri Dec 10, 2010 2:20 am
Location: Manchester, UK

Re: Husse

Post by Fandangio »

That is one cool looking setup you have there.
Excellent work :)
AMD Phenom (tm) II x4 965 | 4GB DDR3 | NVIDIA GTS 450 4GB DDR3 | ASUS M4A88T-M
Post Reply

Return to “Chat about Linux Mint”