You are not logged in.

#1 2010-05-29 21:32:04

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

[solved] dwm + conky + mpd

I have the following .conkyrc:

background no
out_to_console yes
update_interval 2
total_run_times 0
use_spacer none

TEXT
$if_mpd_playing ^i(/home/hithere/.dwm/dzen/xbm8x8/note.xbm) ${mpd_smart}$endif • ^i(/home/hithere/.dwm/dzen/xbm8x8/cpu.xbm) ${cpu}% • ^i(/home/hithere/.dwm/dzen/xbm8x8/mem.xbm) ${memperc}% • ^i(/home/hithere/.dwm/dzen/xbm8x8/fs_01.xbm) /sda1: ${fs_used_perc /}% | /sda2: ${fs_used_perc /home}% • ^i(/home/hithere/.dwm/dzen/xbm8x8/net_down_03.xbm) ${downspeedf eth0} ^i(/home/hithere/.dwm/dzen/xbm8x8/net_up_03.xbm) ${upspeedf eth0} • ^fg(\#696969)${time %H:%M}^fg()

When I play a music file via ncmpc++, the conky display gets shifted to the right, thus hiding my download/upload speeds, clock, etc. Is there a way to anchor my conky display information and have mpd fill the music file information to the left?

Last edited by ntness (2010-05-30 06:13:38)


transcend to the fifth abode

Offline

#2 2010-05-29 22:49:39

schen
Member
Registered: 2009-06-06
Posts: 468

Re: [solved] dwm + conky + mpd

Are you piping conky to the dwm statusbar? Also, try putting in out_to_x no.

Last edited by schen (2010-05-29 22:52:12)

Offline

#3 2010-05-30 01:44:05

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: [solved] dwm + conky + mpd

Adding "out_to_x no" didn't solve the issue. I'm not piping conky to the dwm status bar. I'm starting it with x as so (.xinitrc):

(sleep 2s && conky | dzen2 -x '948' -e '' -fg '#696969' -bg '#fffef6' -w '490' -h '14' -ta r -fn '-*-fixed-medium-r-*-*-12-*-*-*-*-*-iso8859-*' -p ) &

Most of the code is a rehash of other works so I'm not fully aware of all the functions. I tinker until I get a working solution. Anyway, thanks for the suggestions.


transcend to the fifth abode

Offline

#4 2010-05-30 01:53:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] dwm + conky + mpd

You can try changing the -x  and -w values for dzen, to give it more room to expand when mpd is playing...

Last edited by jasonwryan (2010-05-30 01:54:14)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2010-05-30 03:05:27

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: [solved] dwm + conky + mpd

Ok, played with -x and -w a bit. Increasing -w truncates the clock/up and down speed/drive information (apparently shifting things off the screen to the right). Decreasing -w truncates almost everything and shifts the code towards the center of the screen. The same holds for increasing and decreasing the value of -x; increasing shifts everything to the right (off screen) and decreasing shifts everything towards the center (albeit, with no truncation). Now I'm positive this would all work out merrily if I had my cpu information in the top left and so could put the mpd code at the end of my file smile


transcend to the fifth abode

Offline

#6 2010-05-30 03:31:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] dwm + conky + mpd

-w is the total width of dzen. -x is it's absolute position. Between the two you should be able to find a workable solution...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2010-05-30 03:35:33

pseup
Member
Registered: 2008-06-06
Posts: 103

Re: [solved] dwm + conky + mpd

You can change ${mpd_smart} to supply the max length eg ${mpd_smart 50}.  That way long songs will get truncated and not mess up the rest of the bar.

Offline

#8 2010-05-30 04:16:33

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: [solved] dwm + conky + mpd

Right, so you would think increasing the width would allow the song information to fit but it doesn't. My clock and all other info is always truncated (I've ramped up -w from 490 to 700, 1000, 1440). Changing ${mpd_smart} to 50 (or 10 for that matter) truncates everything as well...dzen is still shifted into the abyss of offscreen land. hmm


transcend to the fifth abode

Offline

#9 2010-05-30 06:13:19

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: [solved] dwm + conky + mpd

yikes
Forgive my obstinance...it seems jr was right. After fiddling with -x and -w for a while I found a value that worked for my longest filenames (e.g. Andante Spianato et Grande Polonaise Brillante Op.22 in E flat major). So, -x '585' and -w '848' was the magical combination. Thank you all for the help.

Last edited by ntness (2010-05-30 06:23:07)


transcend to the fifth abode

Offline

Board footer

Powered by FluxBB