You are not logged in.

#1 2017-08-03 14:15:43

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

dwm status bar+mpd

I have been using conky-cli to pipe mpd 'now playing' info to my dwm statusbar.

As dwm is written in C I would like to use a C solution for this info, if possible. wink

Thus far I am using slstatus written in C.
https://github.com/drkhsh/slstatus

This gives me;
kernel version
ram
load
cpu
date

slstatus.png

I just need to add mpd 'now playing' info.

Looking around the interweb I have not found an 'easy' solution.

Any C experts in BunsenLabs?

An alternative to slstatus in C would be OK as long as the above info is displayed...

Last edited by mrneilypops (2017-08-03 14:16:42)

Offline

#2 2017-08-03 16:11:54

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,030

Re: dwm status bar+mpd

WOW!!!  a classic case of CNN*  Very nice!



= = =
* Conky Not Needed.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#3 2017-08-03 16:49:00

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,674

Re: dwm status bar+mpd

Have you looked through these?

One of the Helper Functions is for mpd - I don't know if a user can pipe two C functions to the dwm statusbar.

Have you checked the Arch forum "show off your dwm" thread?

They have also taken requests in the past; maybe ask them.


You must unlearn what you have learned.
    -- yoda

Offline

#4 2017-08-03 17:34:07

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: dwm status bar+mpd

@Sector11
Thanks! CNN= cool Just looking at alternatives to conky/bash... wink
@PackRat
Thanks...I will keep looking and update the thread with any solution found...

In the meantime, if a dwm/C Ninja is available?  wink ...

Offline

#5 2017-08-03 18:28:55

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,674

Re: dwm status bar+mpd

mrneilypops wrote:

In the meantime, if a dwm/C Ninja is available?  wink ...

unia use to hack on dwm - check out his git repo, he has a couple status bars in there, I think.

Last edited by PackRat (2017-08-03 18:29:16)


You must unlearn what you have learned.
    -- yoda

Offline

#6 2017-08-03 19:36:51

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: dwm status bar+mpd

@nobody
Hi..we just met on github...thanks for the support.
I am going to give your patched dwm another try... wink

Offline

#7 2017-08-03 20:03:19

beaker
Unverified Muppet
Registered: 2016-03-06
Posts: 198

Re: dwm status bar+mpd

I pipe mocp stuff straight to dwm status. Can you not just do the same with mpd (sorry, not familiar with mpd)?

[EDIT] forgot nobody had done that and didn't see his post initially. I guess that's what you are after. While you are rummaging through his github have a look at his dmenu-v wink. Thanks nobody btw, I use it.

Last edited by beaker (2017-08-03 21:36:35)

Offline

#8 2017-08-04 09:17:20

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: dwm status bar+mpd

didn't nobody have a fork of dwm that supports mpd?
...aah, i see s/he indirectly linked to it.

Offline

#9 2017-08-04 10:20:58

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: dwm status bar+mpd

slsatus run_command!

OK I call this partial interim success in that I am running CNN (Conky Not Needed!) wink

2017-08-04-120907_1920x1080_scrot.th.png

I missed the fact that slstatus has a run_command option  wink thanks to the dev Ali H.Fardan

I used an extract from the script found here (by Sigi);
https://bbs.archlinux.org/viewtopic.php?id=36530

while true
    do
           echo `mpc | sed -n '1,1p' | cut -c -70` @ `mpc volume | sed -e 's#volume: ##'` 
        sleep $timeout
    done 

Now I will give the nobody fork another try.
I had problems compiling earlier but had an issue with missing skippy-xd.
I might have been using the wrong branch - thanks for the info nobody...

more to come later...

Last edited by mrneilypops (2017-08-04 10:24:32)

Offline

#10 2017-08-04 11:13:30

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: dwm status bar+mpd

@earlybird
Thanks for the info.

Offline

#11 2017-08-06 14:30:38

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: dwm status bar+mpd

mpd song title only;

while true
       do
       echo `mpc --format \[%title%]\ | head -n 1` @ `mpc volume | sed -e 's#volume: ##'`
       sleep $timeout
       done 

Offline

Board footer

Powered by FluxBB