You are not logged in.
Hey all, I just pushed a C parser for monsterwm's output plus some info collection commands.
I call this mstatusbar, in lack of a better name.
see monsterbar.sh to see how you can use it to replace the bash/sh scripts.
the default config is formatted in such a way so that the output is good for 'bar'.
one can alter the definitions in config.h to output to 'dzen2' etc (btw if anyone does that, I'd gladly add that config too to the repo)
all the magic is done in 'funcs' array in config.h .
decide which of the commands (listed on top of config.h) you want to run, in what order and
they will be run appending the <cmd>_PRE and <cmd>_SUF strings for you.
if you are running the 'xinerama-*' branches, then compile with
make XINERAMA=1
else just skip setting XINERAMA
look into my personal branch to get what I'm having (ie on the screenshot above - you need stlarch font for 'bar')
by default result is this:
PS: some code borrowed from Cloudef's monsterstatus. Thanks!
PPS: need to write a readme .. garf
Last edited by c00kiemon5ter (2012-11-27 13:31:55)
.:[ git me! ] :.
Offline
Offline
Offline
mpd should be fixed now It needs more error checking in more areas tbh
I also added global MUSIC_{PRE,SUF} vars
I'm not sure what could be wrong with the layout mode not showing up
I will look into it
btw, nice shot
some things to note:
the cpu func only looks into the first core
the mem func should be altered to show what one would want to see, and not the static text I've put there
I don't really use those, but if anyone does tell me to do that and I'll do it asap
Last edited by c00kiemon5ter (2012-11-27 22:12:12)
.:[ git me! ] :.
Offline
Hehe, that was fast, I don't really use them either but I'm just fiddling around with the configuration to test things out
Offline
Playing around with c00kiemon5ter's mstatusbar
http://ompldr.org/tZ2g1bgI also noticed if your playlist/whole music ends with mpd, mstatusbar crashes and goes back to tty world. For some odd reason I can't see layout modes at all, I tried to fiddle with different colors etc..
Your configs... I want them
Offline
alright, the layout indicator should be fixed now
I will add some more stuff, like state icons (ie for the music - paused, stopped, playing etc)
if you have any ideas just tell me what you'd like to see.
.:[ git me! ] :.
Offline
Thanks, it's working as it should Well I'm really bad with feature requests and ideas, especially with panels because usually I use clock, volume and music notifications. Oh right that reminds me.. I wonder how hard it is to make a music notification for DeadBeeF?
Here's what I've been working on:
Your configs... I want them
Heh, like cookie wants his cookies? I'll be posting my configurations somewhere when I get them to fit my needs
Last edited by Shinryuu (2012-11-28 05:59:46)
Offline
@bslackr
here is a diff: http://sprunge.us/iWOO
get that go into monsterwm's dir
and do:$ git co origin/xinerama-init $ patch -p1 < the_diff $ make # make install
and you should be set.
I've noticed one thing about the patch, the initial values for the monitors aren't working. I have mplayer set to open on monitor 1 and desktop 1, but instead it opens on the current monitor and current desktop. The initial values for monitor 0 works though, I have gimp set to open on monitor 0 and desktop 4 and it works correctly.
static const AppRule rules[] = { \
/* class monitor desktop follow float */
{ "mplayer", 1, 1, True, False },
{ "Gimp", 0, 4, False, True },
};
Last edited by bslackr (2012-11-28 12:55:53)
Offline
@bslackr, that's because mplayer advertises itself as "MPlayer", changing that would pick up the window
$ xprop WM_CLASS # select the mplayer window
WM_CLASS(STRING) = "xv", "MPlayer"
Last edited by c00kiemon5ter (2012-11-28 13:32:29)
.:[ git me! ] :.
Offline
I forgot to mention that I changed it to "mplayer" after it stopped working the first time to see if that did anything, which naturally it didn't. I changed it back to MPlayer and it is still not working. It also isn't working for setting the default tiling modes on the second monitor, but I'm not too worried about that.
[edit] Woops, I forgot that I installed mplayer2 Let me go recompile and see if mplayer2 works
[edit 2] Yep, all is well. The default tiling mode still doesn't work, but that's okay because I don't use it for the 2nd monitor. Thanks for showing me xprop.
Last edited by bslackr (2012-11-28 14:34:41)
Offline
it should work and does work here. ie
static const struct ml init[] = { \
/* monitor desktop mode masz sbar */
/* first monitor */
{ 0, 0, { TILE, 50, True } },
{ 0, 1, { BSTACK, 50, True } },
{ 0, 2, { GRID, 50, True } },
/* second monitor */
{ 1, 0, { GRID, 0, False } },
{ 1, 1, { TILE, 0, False } },
{ 1, 2, { MONOCLE, 0, False } },
};
works as expected for both monitors
.:[ git me! ] :.
Offline
Wow, it's just not my day It was an off by one error, I was looking at the wrong desktop. No more questions for me today, clearly I'm not thinking straight
Offline
@cookie
Thanks for the C parser! For me, then the most important thing to display, besides desktop/state, is battery time left.
Do you have any plans regarding that possibly?
Offline
I almost hate asking for new features....<nooooo not bloat!!> but since you asked....
1. Network up/down speed and status. Maybe just a different color/symbol for slow/medium/fast instead of actual numbers? I highlight mine if the network is down.
2. RAM usage. I like to have it only displayed (and highlighted) if the usage is over a certain %.
3. Drive usage %. Again, only displayed (and highlighted) if over a certain %. I have a nasty habit of filling up /var when I'm mucking around too much with mysql queries
4. Battery % and charge/discharge status. I highlight the % when discharging and it turns red under 10%.
5. Volume Muted notification and Volume %
6. New mail notifier?
Just ideas ... I'm not trying to get you to rewrite conky!
Thanks,
Scott
Offline
Perhaps see my dwm-status for ideas? https://github.com/Unia/dwm-status
I just copied c00kie's volume functions, so I thought I'd share my code back
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
I made some quick updates to mstatusbar. You'd need to check config.def.h for changes.
If you are bored to, don't do it, as there will probably be more changes soon.
options are turned on with OPTION=1 and off with OPTION=0
available options are: XINERAMA MPD DDBF (for deadbeef) and BATT (for battery)
Thanks, it's working as it should Well I'm really bad with feature requests and ideas, especially with panels because usually I use clock, volume and music notifications. Oh right that reminds me.. I wonder how hard it is to make a music notification for DeadBeeF?
deadbeef doesn't have an API, as it's not really a deamon
but I'm capturing the output of `deadbeef --nowplaying DDBF_FMT`
hope that's good. if you know of a way to get playing/paused/etc states tell me
the most important thing to display, besides desktop/state, is battery time left.
Do you have any plans regarding that possibly?
I got battery info in - batt_state and batt_perc (percentage)
but I have _no_ idea if it works (:P) as I do not have a laptop to test
feel free to test it and report back
Perhaps see my dwm-status for ideas? https://github.com/Unia/dwm-status
I just copied c00kie's volume functions, so I thought I'd share my code back
thanks I may grab some ideas
1. Network up/down speed and status. Maybe just a different color/symbol for slow/medium/fast instead of actual numbers? I highlight mine if the network is down.
3. Drive usage %. Again, only displayed (and highlighted) if over a certain %. I have a nasty habit of filling up /var when I'm mucking around too much with mysql queries
will see what I can do with these. I must find the appropriate files or ioctls or what's needed to parse.
2. RAM usage. I like to have it only displayed (and highlighted) if the usage is over a certain %.
ram usage is there. total and free separately.
"free" is actually the unused part, ie it is what htop shows you.
I do not count the Cache and Buffers (do you want me to?)
4. Battery % and charge/discharge status. I highlight the % when discharging and it turns red under 10%.
battery is there, state and %, I just dont know if they work correctly
5. Volume Muted notification and Volume %
that's also there
6. New mail notifier?
I don't think I can do that
I think I can do highlighting easily as well as printing only if above some value too
I would also like to have different text for pause/stopped/playing state of mpd
more to come,
I also need to get back to the new wm
.:[ git me! ] :.
Offline
c00kiemon5ter, your work is so amazing!
Thank you!!!
Offline
Thanks alot cookie!
Unfortunetly I cannot test it because it wont build as I dont have any acpiio.h file? When searching the net, it seems to be a freebsd file?
Offline
@mherrz
dah, so that's why I couldn't find them under /usr/include/linux
I just pushed a fix, using files under /sys/class/power_supply/<battery>/..
check if <battery> matches BAT0 and change to the appropriate on config.h
@Ypnose
It's on my mind and working on it slowlly, because I've been distracted by other things
(namely mstatusbar, a bash bot and a girl :-P)
but I'll be looking in it this week hopefully.
.:[ git me! ] :.
Offline
Thanks cookie!
Now I get a questionmark for battery...
martin@arch ~ % cat /sys/class/power_supply/BAT0/status
Discharging
martin@arch ~ % cat /sys/class/power_supply/BAT0/charge_full
3766000
martin@arch ~ % cat /sys/class/power_supply/BAT0/charge_now
452000
Offline
Yes, works fine now!
Thanks again, mate
Offline
good morning...I really love using monsterwm but I have an issue with bar and the script you have on your website. I've either put it in my .xinitrc file or as a single monster.sh file and made it executable. I always get:
[andreas@andreas-pc ~]$ sh monster.sh
monster.sh: Line 11: Syntaxerror in unexpected Word `('
monster.sh: Line 11: ` if [[ $wmout =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]]; then'
the same holds true for the some_sorta_bar script. I'm not so much into bash-scripting yet, though I'm learning it atm, so maybe you guys can help me out here.
Thanks
Andreas
EDIT: your mstatusbar works great though and it's really easy to make adjustements even if you don't know C (like me :-)
Last edited by andmars (2012-12-05 09:29:53)
Offline