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

MPD i3status

asked 2013-07-22 18:44:34 +0000

mainlygreen gravatar image

updated 2013-07-24 09:17:29 +0000

Is there a way that I can put what song MPD is playing on i3status? If so can someone push in the right direction?

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2013-07-23 18:06:33 +0000

updated 2013-07-27 15:59:02 +0000

If you use ncmpcpp as a client, you could save it in eg. ~/.i3status.sh:

i3status --config ~/.i3status.conf | while :
do
        playing=$(ncmpcpp --now-playing)
        echo "$playing" || exit 1
done

In i3 config, you can point to that script in the bar { } section:

status_command /home/user/.i3status.sh

EDIT/UPDATE: To combine i3status output with ncmpcpp:

i3status --config ~/.i3status.conf | while :
do
        read line
        playing=$(ncmpcpp --now-playing)
        echo "$playing | $line" || exit 1
done

As Michael pointed out below, unless you keep your .i3config.conf in a different folder from the default (~/) or your i3config file has a custom file name, the "--config ~/.i3status.conf" part is unnecessary.

edit flag offensive delete link more

Comments

Thank you so much that worked! Is there a way I can make it show i3status and the script?

mainlygreen gravatar imagemainlygreen ( 2013-07-24 02:45:51 +0000 )edit

See my update above.

sycamorex gravatar imagesycamorex ( 2013-07-24 17:16:11 +0000 )edit

I tried that but it only showed the ncmpcpp output

mainlygreen gravatar imagemainlygreen ( 2013-07-24 19:39:54 +0000 )edit

Obviously, you need to modify the path to your i3status config file and make sure the relevant entries in that file are uncommented.

sycamorex gravatar imagesycamorex ( 2013-07-24 20:02:45 +0000 )edit

Sorry about that I am kind of new to this so I didn't know what to check. Thanks again!

mainlygreen gravatar imagemainlygreen ( 2013-07-24 20:22:53 +0000 )edit
0

answered 2013-07-23 10:48:55 +0000

sur5r gravatar image

There's a section called "EXTERNAL SCRIPTS/PROGRAMS WITH I3STATUS" in the man page for i3status. I think that should help you.

edit flag offensive delete link more
0

answered 2013-07-30 00:53:21 +0000

enkore gravatar image

I'd recommend using i3pystatus, which has a module for this built in

edit flag offensive delete link more

Comments

I would use it but I am kind of new to this and its confusing for me so I decided not to.

mainlygreen gravatar imagemainlygreen ( 2013-07-30 01:05:32 +0000 )edit
0

answered 2013-07-25 00:44:12 +0000

You could use conky alternatively.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-07-22 18:44:34 +0000

Seen: 3,248 times

Last updated: Jul 30 '13