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

custom dzen2 statusbar notification shell script reports "status_command exited unexpectedly"

asked Oct 23 '15

toogley gravatar image

updated Oct 23 '15

Hello.

I use a shell script to display the date and such things in my statusbar. I cut out irrelevant parts of both the i3 config file and the shellscript. When i3 is started, the statusbar displays "Error: status_command exited unexpectedly (exit 0)" along with the dzen2 bar. How can i fix that?

My i3 config contains:

bar {
        status_command sh ~/.i3/statusbar.sh
}

statusbar.sh:

#!/bin/sh

DZEN_FG="#A0A0A0"
DZEN_BG="#1f1f1f"
HEIGHT=20
WIDTH=300
X=1300
Y=2000
DZEN="dzen2 -x $X -y $Y -w $WIDTH -h $HEIGHT -ta right -bg $DZEN_BG -fg $DZEN_FG"

while true
do
    echo "`date`"
done | $DZEN &

1 answer

Sort by » oldest newest most voted
0

answered Oct 23 '15

Airblader gravatar image

Remove the bar block from your i3 config entirely and instead add

exec --no-startup-id ~/.i3/statusbar.sh

Dzen is a complete status bar, you don't want to feed its output into i3bar but actually just start it.

Comments

i actualy like the rest of my Statusbar (mainly the displaying of the windows). I assume, i can get that equally with dzen2, but a little search hasn't answered the problem. ==> Is this the only option and if so, could you give me a hint how to display the windows like the default i3bar in dzen2?

toogley gravatar imagetoogley (Oct 23 '15)edit

You can only do that by providing all that information to dzen using the i3 IPC. That's a bit of work, I'm sure solutions exist out there already, though. But I don't know them, you'll have to search for them. Why exactly do you want to use dzen? What do you want to do that i3bar can't do?

Airblader gravatar imageAirblader (Oct 23 '15)edit

Hey, I wanted to have more control over my statusbar (like different colors for time and date), and for that i didn't liked i3status. I'm using now conky for that, it solves my problems much better as dzen2. => solved, thanks

toogley gravatar imagetoogley (Oct 24 '15)edit

You're confusing very different things here. i3bar is a bar, i3status only a data tool. Dzen is a bar, conky is a data tool (in this context). So Dzen and conky are entirely different things and not "alternatives".Anyway, I usually recommend using i3blocks with i3bar, but conky and i3bar is fine too

Airblader gravatar imageAirblader (Oct 24 '15)edit

Thanks for the clarification :)

toogley gravatar imagetoogley (Oct 30 '15)edit

Question Tools

1 follower

Stats

Asked: Oct 23 '15

Seen: 550 times

Last updated: Oct 23