The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Fortune output in i3status

asked 2013-12-26 21:07:16 +0000

fabio gravatar image

I know it's stupid, but just to have fun... it is possible to display fortune outputs on my i3bar? :-) Inspired by man i3status i tried with this

statuscommand i3status --config .i3/i3barbottom | while :; do read line; fortune && echo " | $line" && sleep 5 || exit 1; done

in the bar block of my config file, but anything except my usual i3status has been displayed...

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-01-15 16:58:14 +0000

Ultrabug gravatar image

Disclaimer : I'm the dev of py3stauts, my view is biased

You could do this easily using py3status if you can get over writing a few lines of python ;) More info on the github.com/ultrabug/py3status wiki

edit flag offensive delete link more
0

answered 2013-12-27 23:51:36 +0000

joepd gravatar image

I am guessing here, but fortune terminates its string with a newline. Getting rid of that one somehow will fix this error.

edit flag offensive delete link more

Comments

Thanks for the reply! I tried substituting any newline with a space through tr status_command i3status --config ~/.i3/i3_barbottom | while :; do read line; fort une | tr '\n' ' ' && echo " | $line" && sleep 5 || exit 1; done but anything changed...

fabio gravatar imagefabio ( 2013-12-28 01:02:28 +0000 )edit

Question Tools

Stats

Asked: 2013-12-26 21:07:16 +0000

Seen: 240 times

Last updated: Jan 15 '14