Page 1 of 1

Husse

Posted: Sun May 08, 2011 7:11 pm
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.

Re: Husse

Posted: Mon May 09, 2011 5:19 am
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.

Re: Husse

Posted: Mon May 09, 2011 11:26 am
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 1570 times

Re: Husse

Posted: Mon May 09, 2011 11:34 am
by Fandangio
That is one cool looking setup you have there.
Excellent work :)