You are not logged in.

#1126 2012-11-27 13:24:45

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

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:
tZ2d5OA

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

#1127 2012-11-27 15:03:52

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

Heh, this reminds me that I should switch to bar.
AFAIK dzen doesn't have any sort of multiple aligning on single instance so you need to spawn more of them which is bit of ugly.
Maybe this could be easily patched though.

Offline

#1128 2012-11-27 21:37:11

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: monsterwm! ~ yet another tiny wm

Playing around with c00kiemon5ter's mstatusbar
tZ2g1bg

I 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.. cool

Last edited by Shinryuu (2012-11-27 21:39:01)

Offline

#1129 2012-11-27 22:07:50

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

mpd should be fixed now tongue 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 smile

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 tongue
I don't really use those, but if anyone does tell me to do that and I'll do it asap wink

Last edited by c00kiemon5ter (2012-11-27 22:12:12)


.:[ git me! ] :.

Offline

#1130 2012-11-27 22:21:24

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: monsterwm! ~ yet another tiny wm

Hehe, that was fast, I don't really use them either but I'm just fiddling around with the configuration to test things out smile

Offline

#1131 2012-11-27 23:19:14

kuraku
Member
Registered: 2012-01-03
Posts: 202

Re: monsterwm! ~ yet another tiny wm

Shinryuu wrote:

Playing around with c00kiemon5ter's mstatusbar
http://ompldr.org/tZ2g1bg

I 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.. cool

Your configs... I want them smile

Offline

#1132 2012-11-28 00:37:42

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

alright, the layout indicator should be fixed now smile
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

#1133 2012-11-28 05:55:46

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: monsterwm! ~ yet another tiny wm

Thanks, it's working as it should smile 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:
tZ2hhYQ

kuraku wrote:

Your configs... I want them smile

Heh, like cookie wants his cookies? I'll be posting my configurations somewhere when I get them to fit my needs cool

Last edited by Shinryuu (2012-11-28 05:59:46)

Offline

#1134 2012-11-28 12:54:57

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

@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

#1135 2012-11-28 13:31:07

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

@bslackr, that's because mplayer advertises itself as "MPlayer", changing that would pick up the window wink

$ 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

#1136 2012-11-28 14:23:13

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: monsterwm! ~ yet another tiny wm

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 wink 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

#1137 2012-11-28 14:49:47

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

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

#1138 2012-11-28 14:57:37

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: monsterwm! ~ yet another tiny wm

Wow, it's just not my day tongue 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 big_smile

Offline

#1139 2012-11-29 01:21:57

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: monsterwm! ~ yet another tiny wm

@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

#1140 2012-11-29 02:20:24

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: monsterwm! ~ yet another tiny wm

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 hmm
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! tongue

Thanks,
Scott

Offline

#1141 2012-11-29 10:57:05

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: monsterwm! ~ yet another tiny wm

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 wink


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

#1142 2012-11-29 17:27:40

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

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)

Shinryuu wrote:

Thanks, it's working as it should smile 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

mhertz wrote:

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 smile

Unia wrote:

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 wink

thanks wink I may grab some ideas

firecat53 wrote:

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 hmm

will see what I can do with these. I must find the appropriate files or ioctls or what's needed to parse.

firecat53 wrote:

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?)

firecat53 wrote:

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 big_smile

firecat53 wrote:

5. Volume Muted notification and Volume %

that's also there

firecat53 wrote:

6. New mail notifier?

I don't think I can do that tongue

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

#1143 2012-11-29 18:06:09

Ypnose
Member
From: Jailed in the shell
Registered: 2011-04-21
Posts: 353
Website

Re: monsterwm! ~ yet another tiny wm

Maybe this is off-topic, but what about your new XCB WM, lad?


Github -- My terminal font Envypn

Offline

#1144 2012-11-29 19:34:38

Knusperkeks
Member
From: Germany
Registered: 2012-07-14
Posts: 26

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter, your work is so amazing! big_smile
Thank you!!!

Offline

#1145 2012-11-30 04:30:00

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: monsterwm! ~ yet another tiny wm

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

#1146 2012-12-03 01:02:06

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

@mherrz
dah, so that's why I couldn't find them under /usr/include/linux tongue
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

#1147 2012-12-03 01:42:37

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: monsterwm! ~ yet another tiny wm

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

#1148 2012-12-03 02:42:10

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

alright, should be fine now smile


.:[ git me! ] :.

Offline

#1149 2012-12-04 01:14:58

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: monsterwm! ~ yet another tiny wm

Yes, works fine now!

Thanks again, mate smile

Offline

#1150 2012-12-05 09:12:36

andmars
Member
Registered: 2012-03-13
Posts: 362

Re: monsterwm! ~ yet another tiny wm

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

Board footer

Powered by FluxBB