You are not logged in.

#51 2018-06-28 08:50:58

ohnonot
...again
Registered: 2015-09-29
Posts: 3,198
Website

Re: fortune notifications?

i wonder why this thread has stalled.

anyhow, the bl-welcome script is in a usable state now.
i decided to change the text formattinmg a little so that it will work with other fortunes as well.

i chose nore's icon for good now, and removed the free clipart icon from the repo.
the icon needs to be specified with its full path on the command line; i think the debian package manintainer will take care of moving it to the correct location so that it can be specified with its shortname.

unless someone discovers a bug / has some improvement etc, it's all good now from my side.

Offline

#52 2018-06-28 09:55:38

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

ohnonot wrote:

i wonder why this thread has stalled.

I was doing other stuff, and thought I'd wait till things had settled down at your end.

it's all good now from my side.

Cool - I'll build a new deb soon - maybe tomorrow.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#53 2018-06-30 08:21:21

ohnonot
...again
Registered: 2015-09-29
Posts: 3,198
Website

Re: fortune notifications?

ok!

Offline

#54 2018-07-04 08:32:12

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

ohnonot wrote:

anyhow, the bl-welcome script is in a usable state now.
i decided to change the text formattinmg a little so that it will work with other fortunes as well.

i chose nore's icon for good now, and removed the free clipart icon from the repo.
the icon needs to be specified with its full path on the command line; i think the debian package manintainer will take care of moving it to the correct location so that it can be specified with its shortname.

unless someone discovers a bug / has some improvement etc, it's all good now from my side.

But where is all this stuff? I just went to your repo https://github.com/ohnonot/fortune-mod-cbbl , thinking to package up the next deb, and found only one commit, a month ago when you added grapefruit's quote.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#55 2018-07-04 09:09:10

ohnonot
...again
Registered: 2015-09-29
Posts: 3,198
Website

Re: fortune notifications?

^ c'mon johnraff, what are we discussing right this moment?
look at my signature.

also see posts #38 and #39.

Last edited by ohnonot (2018-07-04 09:11:44)

Offline

#56 2018-07-04 09:54:49

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

^Ah indeed!
Tomorrow...


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#57 2018-07-08 06:03:05

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

OK I incorporated your changes in the renamed source repo here: https://github.com/BunsenLabs/bunsen-fortune
The "master" branch is a clone of yours, "helium" also, but has an added "debian" directory holding all the packaging information. A bunsen-fortune .deb built from that is available in the (now generally unused) helium-dev repo:

deb https://kelaino.bunsenlabs.org/~johnraff/debian helium main

or you can just grab it here: https://www.dropbox.com/s/e6y9dzurfk9ew … l.deb?dl=1

Uncomment the line in openbox/autostart and it works perfectly. cool

I just have a couple of small questions about implementation:
1) Maybe comment out the printf lines - aren't they mostly for bugfixing? Left in, the output will just go into .xsession-errors anyway.
2) Since you went to the trouble of adding colons to all the fortunes, why not use that to delimit the header, instead of taking the first one or two words?


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#58 2018-07-08 08:36:28

ohnonot
...again
Registered: 2015-09-29
Posts: 3,198
Website

Re: fortune notifications?

johnraff wrote:

1) Maybe comment out the printf lines - aren't they mostly for bugfixing? Left in, the output will just go into .xsession-errors anyway.

ok, i made it an option now.
pushed it too.

2) Since you went to the trouble of adding colons to all the fortunes, why not use that to delimit the header, instead of taking the first one or two words?

becasue this breaks when using other fortunes.
i might evtl. add a test that goes back to colon-based separation if only cbbl cookies are used.

Offline

#59 2018-07-09 01:30:19

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

ohnonot wrote:
johnraff wrote:

1) Maybe comment out the printf lines - aren't they mostly for bugfixing? Left in, the output will just go into .xsession-errors anyway.

ok, i made it an option now.
pushed it too.

Thanks!
And... something I just noticed, if you want to use printf instead of echo, I think the safer way is considered to be to explicitly format all the arguments as strings with '%s'.
IE perhaps:

debugging() {
    [[ "$debug" == 1 ]] && printf '%s' "$@"
}

So every word in "$@" will be treated as a string.

2) Since you went to the trouble of adding colons to all the fortunes, why not use that to delimit the header, instead of taking the first one or two words?

becasue this breaks when using other fortunes.

Ah, understood.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#60 2018-07-09 13:30:59

ohnonot
...again
Registered: 2015-09-29
Posts: 3,198
Website

Re: fortune notifications?

johnraff wrote:

something I just noticed, if you want to use printf instead of echo, I think the safer way is considered to be to explicitly format all the arguments as strings with '%s'.
IE perhaps:

debugging() {
    [[ "$debug" == 1 ]] && printf '%s' "$@"
}

So every word in "$@" will be treated as a string.

thanks, i fixed this now.

Offline

#61 2018-07-10 02:17:09

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

^Note that will glob every word of "$@" together with no intervening spaces. It won't affect bl-fortune because you've already formatted the strings as one argument before passing it to debugging().

As I'm sure you already know, printf can do amazing things.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#62 2018-07-10 10:46:37

ohnonot
...again
Registered: 2015-09-29
Posts: 3,198
Website

Re: fortune notifications?

oh, i see.
guess i'm better off using echo then...
changed & pushed.

Last edited by ohnonot (2018-07-10 10:48:06)

Offline

#63 2018-07-11 07:16:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

I think for outputting debug messages either echo or printf are OK.
Printf can be useful if you want more control.

john@helium-dev:~$ t(){ printf '%s' "$@";}
john@helium-dev:~$ t one two
onetwojohn@helium-dev:~$ 

john@helium-dev:~$ t(){ printf '%s ' "$@";}
john@helium-dev:~$ t one two
one two john@helium-dev:~$

john@helium-dev:~$ t(){ printf '%s\n' "$@";}
john@helium-dev:~$ t one two
one
two

john@helium-dev:~$ Format(){ printf '%-30s %-12s %-12s\n\n' 'Package' 'apt version' 'git version';printf '%-30s %-12s %-12s\n\n' "$1" "$2" "$3";  }
john@helium-dev:~$ Format 'some-package' '1.1' '1.2'
Package                        apt version  git version 

some-package                   1.1          1.2         

And see http://wiki.bash-hackers.org/commands/builtin/printf


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#64 2018-07-12 07:40:41

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

Updated bunsen-fortune 9.1.1-1 now in helium-dev repo and here: https://www.dropbox.com/s/nmah93d440g2h … l.deb?dl=1
@ohnonot if you could quickly check that out, if it's OK we can get it in the regular repos.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#65 2018-07-12 12:34:42

sleekmason
Member
Registered: 2018-05-22
Posts: 142

Re: fortune notifications?

Excellent!

I've been using fortunes with conky for a while now. Everything is good using cbbl there. smile

$alignr${execi 600 fortune -s cbbl | fold -s -w25}

"Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." - Calvin Coolidge

Offline

#66 2018-07-13 05:36:22

ohnonot
...again
Registered: 2015-09-29
Posts: 3,198
Website

Re: fortune notifications?

cool!
a quick test, everything seems to be working as advertised.
cbbl.png

Offline

#67 2018-07-13 06:09:19

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,118
Website

Re: fortune notifications?

@sloth, as an American... Well played, sir, well played.

@ohnonot, cheers! Great choice to use Bunsen-flame Beaker.

Offline

#68 2018-07-13 06:15:32

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,118
Website

Re: fortune notifications?

@johnraff, by "available in the helium-dev repo", you mean our github repo? When this hits our helium repo as a deb package, let's update the OP with a link.

Offline

#69 2018-07-13 06:27:32

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,118
Website

Re: fortune notifications?

@ohnonot, what line or lines should I edit if I want the notification duration to match my other ones (30 seconds)?

Offline

#70 2018-07-13 07:45:16

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

hhh wrote:

@johnraff, by "available in the helium-dev repo", you mean our github repo? When this hits our helium repo as a deb package, let's update the OP with a link.

It's in GitHub, but the "helium-dev" repo is what we were using before the official release. It still exists, but there's nothing there now except a couple of experimental packages, like this.

deb https://kelaino.bunsenlabs.org/~johnraff/debian helium main

Agreed, when it's in helium proper we can update the OP and announce somewhere.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#71 2018-07-13 08:49:39

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,118
Website

Re: fortune notifications?

hhh wrote:

@ohnonot, what line or lines should I edit if I want the notification duration to match my other ones (30 seconds)?

My mistake, I was trying to edit the script in /usr/bin, but that's not necessary. man bl-fortune FTW, I've made my adjustments in ~/.config/openbox/autostart...

## bl-fortune - have the system come up with a little adage (not yet enabled)
(sleep 3; bl-fortune -t 30000) &

Alles gut.

Offline

#72 2018-07-31 07:59:21

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,677
Website

Re: fortune notifications?

bunsen-fortune is now available in the "helium" repository.

Install, uncomment the line in openbox/autostart, and enjoy!


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#73 2018-07-31 08:37:52

ohnonot
...again
Registered: 2015-09-29
Posts: 3,198
Website

Re: fortune notifications?

added:

glittersloth wrote:

Because "perfect for hot summer afternoon" could mean different things to different people. Some folk like stuff with field recordings of a rainforest full of drunk frogs and horny cicadas, in order to drown in their own sweat. Others like cooler wintery sounds with the drone of an a/c compressor unit in the background to help offset the heat, or bask in denial at the very least.

-- and pushed.

Offline

#74 2018-07-31 23:42:19

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,118
Website

Re: fortune notifications?

An instant classic, thanks!

Offline

Board footer

Powered by FluxBB