status

statusbar program for dwm
git clone anongit@rnpnr.xyz:status.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 50ea68722f668eab82fc7ace7464de7f4de5affe
Parent: e4a8f106d1ac06e3dcc4407eeb367035bb7a187c
Author: Randy Palamar
Date:   Sun,  4 Apr 2021 16:55:41 -0600

re-add buffer usage for trimming tag length and fix broken labels

Diffstat:
Mblocks/mpd.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/blocks/mpd.c b/blocks/mpd.c @@ -49,11 +49,13 @@ mpd_tag(struct Block *b) case MPD_STATE_PAUSE: case MPD_STATE_PLAY: song = mpd_run_current_song(conn); - str = mpd_song_get_tag(song, b->u.i, 0); + snprintf(buf, sizeof(buf), "%s", + mpd_song_get_tag(song, b->u.i, 0)); + str = buf; mpd_song_free(song); - break; case MPD_STATE_STOP: default: + break; } mpd_status_free(status); }