MPD i3status
Is there a way that I can put what song MPD is playing on i3status? If so can someone push in the right direction?
Is there a way that I can put what song MPD is playing on i3status? If so can someone push in the right direction?
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.
Thank you so much that worked! Is there a way I can make it show i3status and the script?
Sorry about that I am kind of new to this so I didn't know what to check. Thanks again!
There's a section called "EXTERNAL SCRIPTS/PROGRAMS WITH I3STATUS" in the man page for i3status. I think that should help you.
I'd recommend using i3pystatus, which has a module for this built in
I would use it but I am kind of new to this and its confusing for me so I decided not to.
You could use conky alternatively.
Asked: 2013-07-22 18:44:34 +0000
Seen: 3,248 times
Last updated: Jul 30 '13