You are not logged in.

#301 2012-07-21 13:07:02

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: dminiwm snapwm & bipolarbar

stlarch wrote:

It still doesn't get aligned all the way to the right. And the left part from monsterwm doesn't start up right away either now. As soon as I open a window, the left part comes up and stays. The mangling of the the first icon seems to be fixed. Here's what I have in my .xinitrc:

ff="/tmp/monsterwm.fifo"
[[ -p $ff ]] || mkfifo -m 600 "$ff"

ds=("web" "term" "foo" "misc")

ms=("T" "M" "B" "G" "F")

while read -t 60 -r wmout || true; do
    if [[ $wmout =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]]; then
        unset r
        read -ra desktops <<< "$wmout"
        for desktop in "${desktops[@]}"; do
            IFS=':' read -r d w m c u <<< "$desktop"
            ((c)) && fg="&3" i="${ms[$m]}" || fg="&2"
            ((u)) && w+='&9!'
            r+="$fg${ds[$d]} ${w/#0/&8-} &7:: "
        done
        r="${r%::*}"
        printf "%s\n" "$r&2[&3$i&2]"
    fi

done < "$ff" | splitter_bar &

conky | while read -r; do xsetroot -name "$REPLY"; done &

monsterwm > "$ff"

What about using a normal bash script like this.
It's pretty the same as c00kiemon5ter one, this one just returns the previous line if nothing happened in the wm in the past second smile (no, it won't hog the cpu)

Offline

#302 2012-07-21 21:00:25

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

@stlarch The monsterwm text did show up it just got cleared when the first conky text was written. Should be fixed now. I have conky setting the root windows' name at the top of .xinitrc, you having it after the bar was started exposed that bug.
I can't make the text not line up at the right here even when using your .xinitrc, can I see the conkyrc you use so I can try that here?

@TheLemonMan I think stlarch would like support for multiple fonts to be included in your bar since he does a great job of adding icons to fonts. He did ask for that in the bar thread wink and you really should add a license to your code just to cover your butt.

Cheers

Last edited by moetunes (2012-07-21 21:47:29)


You're just jealous because the voices only talk to me.

Offline

#303 2012-07-22 03:31:42

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

Sorry, I've been gone all day. Ok, it seems weird but I think I figured out what it is. When I use &1-4, everything is ok and aligned all the way to the right, but when I use &5-9, it seems to add spaces. I was using &8 for all my icons and just decided to start trying things. Everything else seems ok now. My conkyrc is pretty much the same as the one I use for snapwm.

out_to_x no
out_to_console yes
use_spacer left
update_interval 1

TEXT
&3 &2${cpu cpu0}%\
&2${downspeedf eth0}K/s &3\
&2${upspeedf eth0}K/s &3   \
&3&2${memfree} \
&3&2${hwmon temp 1}° \
&3 &2${mixer vol}% \
&3 &2${battery_percent BAT1}% \
&3 &2${time %I:%M}

@, thanks for the script, LemonMan, I'll try it out and maybe set up a simple bash status too with bar.

Last edited by stlarch (2012-07-22 03:32:21)

Offline

#304 2012-07-22 04:18:13

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

@stlarch, nice job finding that out, cheers for that. I copied and pasted stuff from snapwm, which uses less colours, at 3.30am while working 16hr days and I was using the same conkyrc from snapwm to test splitter_bar so there was bound to be silly errors on my part. Thanks for your patience, it should work better now with a git pull.

Cheers


You're just jealous because the voices only talk to me.

Offline

#305 2012-07-22 04:23:39

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

Wow, that was quick! I'll try it out. Thanks

edit: yep, it seems fine now.

Last edited by stlarch (2012-07-22 04:37:48)

Offline

#306 2012-07-24 15:10:25

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

Splitter_bar is working great with conky. I set up a simple status script and that works perfectly too. Is there any chance to get a center option (&C)? If it's too much trouble, dont worry about it. It's fine the way it is. Here's a acreenshot with the status script:
tZXVxNQ

edit: And possibly different background colors too? Something like &bg1 &fg2? That would be nice.

Last edited by stlarch (2012-07-25 21:38:18)

Offline

#307 2012-07-27 19:39:06

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

I'd seen a couple of screenshots that had some_sorta_bar in them and none were using the center option, so when I hacked splitter_bar together I didn't think it'd be necessary to have it. Shouldn't be too hard to add it tho.

Changing the background should be easy enough. I'm thinking it might be best to have the nine existing colours usable as both text or background colours, or I can add another nine colours for the background, but then there would be 18 colours to select and fine tune which seems like a lot of work to me... Let me know which you think would be the most suitable way to go with.

Cheers


You're just jealous because the voices only talk to me.

Offline

#308 2012-07-27 19:41:38

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

Awesome. That's exactly what I was thinking. (using them for both the text and background)

Offline

#309 2012-07-29 00:38:17

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

Some splitter_bar news.

I've added changing the background colour for the piped in text and what's set with xsetroot -name.
The defines for the colours have changed a little bit. There's now ten colours available and all of them can be used for both background and text. Edit: colours 2-9 are the same.

// colours are for background and the text
#define colour0 "#003040"  // &0 Default Background colour
#define colour1 "#ffffff"   // &1 Default foreground colour
#define colour2 "#006080"  // &2
#define colour3 "#0080a0"
#define colour4 "#00ff00"
#define colour5 "#664422"
#define colour6 "#886644"
#define colour7 "#aa8866"
#define colour8 "#8888ff"
#define colour9 "#ff0000"  // &9

Marking the text for a colour change stays the same e.g. &3.
To mark the text for a background change use an ampersand, a capital B and the colour number.
e.g. &B3

The text from xsetroot -name defaults to the right of the piped in text and can be (or have parts of it) centered and/or on the right by marking the text in the appropriate spot with &C or &R, which can't be preceeded by a colour change.
Here's a pic with some ugly colours:
tZXdscA

Cheers

Last edited by moetunes (2012-07-29 00:39:22)


You're just jealous because the voices only talk to me.

Offline

#310 2012-07-29 05:48:41

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

Sweet. It took me a little finagling but I managed to come up with something pretty close to what I had in mind. I figured the background part might be tricky to get everything aligned right. I'm only using it for the desktops right now. The only thing I notice no matter what I do is that there is a white line to the far left of the bar about a pixel or two wide. And when I first fired it up, the status part was aligned to the left instead of the right. I added &C and &R to my status line and everything is fine. Thanks for all the work. Here's a couple screenshots (the relevant part of my .xinitrc is in the second pic):
tZXduaQ    tZXduaw

Offline

#311 2012-07-29 07:33:25

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

I could have explained it better ... the bar is written from left to right, the piped in stuff(e.g. monsterwm) is first on the left, then the text from xsetroot -name. There's three spots the xsetroot -name text can be in; left, centered and right aligned. Until there is a &C or &R, the text will be shown from the left next to monsterwm's stuff. Hope that's a bit clearer. wink

"pretty close to what I had in mind" - what's it doing/not doing that it shouldn't/should ? I'm happy to hear suggestions to improve it(they just might take a little while to turn into code ) smile
The background changes all happen where they should here, it works ok for you? You sounded like it might not be working right for you.

Try a git pull and the white line on the left should go away I think, I've never had that here but different resolutions could show up things and there was a line that could be the culprit... We'll see...

Cheers

Last edited by moetunes (2012-07-29 07:39:31)


You're just jealous because the voices only talk to me.

Offline

#312 2012-07-29 14:41:45

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

No, I didn't mean it's not working. I just anticipated my script to be problematic the way I had it. The way I have it now though, it seems to work really well. It's actually easy and I like it a lot. I haven't figured out a good way to show the open windows (that I'm happy with) but I'm going to try a few things out. Right now I just have the background colors to indicate which desktops have windows. I've grown accustomed to the dots in snapwm but I'm not sure how that would work with monster. I think I can live without that for now. It's really fast and light too. No delays. It almost seems to be using nothing. I'm still getting that white line but it's not a big deal at all. I almost always have a window open on the first desktop and my color scheme pretty much hides it, so I hardly ever even notice it. You can't even see it in the screenshots. I can't really think of anything else to improve it right now. I think it's good to go. Great work man.

Last edited by stlarch (2012-07-29 14:45:59)

Offline

#313 2012-07-29 18:47:33

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

That's great to hear, cheers.

Last edited by moetunes (2012-07-29 19:02:30)


You're just jealous because the voices only talk to me.

Offline

#314 2012-07-30 07:27:40

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

Some splitter_bar news.

Colour 9 wasn't working so I've fixed that and am trying another fix for the white line on the left so a git pull might help...

I have some free time this arvo so I've gone through lots of different checks to make sure everything is as it should be and it all seems fine. smile

Here's a pic with splitter_bar running at the bottom in snapwm. You can see in the terminal I'm piping date into splitter_bar and it is reading the xsetroot -name that was set in the .xinitrc that started snapwm. If you have a look at snapwm's bar you can see the &C at the beginning of the conky text it's showing and near the end there's the &R&B1 that shows my fuzzy time on the right with a different background.
tZXgzaA

Cheers


You're just jealous because the voices only talk to me.

Offline

#315 2012-07-30 10:08:03

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

Thanks! That fixed the line.

Offline

#316 2012-07-31 13:23:47

robstwd
Member
From: Brisbane
Registered: 2010-10-31
Posts: 32

Re: dminiwm snapwm & bipolarbar

@moetunes - I have started using splitter_bar over the last week or so inside of monsterwm and I just wanted to say thanks for the great work. It is a really fantastic addition to complement monsterwm; I'm lovin' it!!

@stlarch - also thanks to you for your many contributions above. I have pretty much tried all of your configs as you have posted them and I have settled on something that closely resembles your last screenshots above.

Offline

#317 2012-08-03 08:35:42

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

@stlarch, That's great to hear smile

@robstwd, I'm glad you like it smile

@casual observers and persons looking for light entertainment,
Since I have made splitter_bar I thought I would have dminiwm output some info to make use of it. I had done something similar ages ago but this time I just made it write to stdout. While at it I fixed a newish bug that crashed the wm sometimes and had a hack at the grid tiling mode. It's totally ott but the first column can be made wider/narrower and the second window can be made taller/shorter whatever column it is in, similar to what's available in the vertical and horizontal tiling modes. Unless I can do it with less code it's not something I'll be pushing to git.
Here's a pic:
tZXl3MQ

Cheers


You're just jealous because the voices only talk to me.

Offline

#318 2012-08-03 09:29:18

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

I changed splitter_bars' name to bipolarbar.
I think splitter_bar rated right up there with some_sorta_bar in the naming stakes...


You're just jealous because the voices only talk to me.

Offline

#319 2012-08-05 23:11:01

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

I've had a bit of a play with the horribly long grid mode function mentioned above+1 and now it is under 40 lines, which is less than it ever has been, and it does more!
ATM it's good for up to 25 windows in a 5x5 grid, the first column can be made wider/narrower with ALT+h/l and the second window can be made taller/shorter with ALT+p/o no matter the column it is in.
If someone wants to have a play with it I added it to snapwm and pushed it to git, there's still a couple of things to sort out in dminiwm before I update that. Anyways, here's a pic:
tZjAwag

Cheers


You're just jealous because the voices only talk to me.

Offline

#320 2012-08-07 21:27:25

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

I sorted out what I wanted to fix in dminiwm and pushed the updates to git.
I fixed up killing a window and quitting, added the option to config.h.def for outputting desktop info for use in bipolarbar or similar and added the ability to remember the order the windows were focused in.
The info output for each desktop is the desktop number, the number of windows opened, whether the desktop is the current one and at the end the mode for the current desktop. Here's the .xinitrc I use to start dminiwm with bipolarbar(it's similar to a monsterwm one but there are some differences).

starter="exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "

numlockx &
xsetroot -cursor_name left_ptr &
fbsetbg -l &
#turn of the caps lock key !!
xmodmap -e 'keycode 66 ='
#xterm &

conky -c ~/build/status_conky.ssb | while read -r; do xsetroot -name "$REPLY"; done &


ff="/tmp/dminiwm.fifo.$DISPLAY"
[[ -p $ff ]] || mkfifo -m 600 "$ff"

ds=(" Ë" " ¾" " ´" " ©" " Ê" " à")

ms=("" "" "" "" "")

while read -r wmout || true; do
    if [[ $wmout == [[:digit:]]:[[:digit:]]:[[:digit:]]* ]]; then
        unset r
        read -ra desktops <<< "$wmout"
        for desktop in "${desktops[@]}"; do
            IFS=':' read -r d n c <<< "$desktop"
            fg="&B0&5" # Unfocused desktop with no opened windows back & foreground
            [[ $n -gt 0 ]] && fg="&B2&6" # Unfocused desktop with opened windows back & foreground
            # Focused desktop back & foreground and num opened windows
            [[ $c -gt 0 ]] && fg="&B3&9" && num=" &1:&5$n"
            # Check for end of desktops
            [[ "$c" != "" ]] && r+="$fg${ds[$d]} &5&B0\u19"
        done
        # $desktop is now the mode so check it is fullscreen or don't show the num opened windows
        [[ "$desktop" = "1" ]] || num=""
        mode="${ms[$desktop]}"
        printf "$r&B0$num &1$mode \n"
    fi

done < $ff | ~/progs/c.files/bipolarbar/bipolarbar &

$starter ~/build/dminiwm-0.4.1/src/dminiwm > $ff

It only shows the number of opened windows in fullscreen mode and shows it between the desktops and the glyph I use to represent the mode.
Here's a pic:
tZjB2bw

Edit: I just found that the piped in text for bipolarbar didn't clear properly sometimes so that's fixed now.

Cheers

Last edited by moetunes (2012-08-08 03:39:41)


You're just jealous because the voices only talk to me.

Offline

#321 2012-08-09 08:49:24

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

I've been having another play with dminiwm and now in vertical or horizontal tiling mode windows can be added/removed to/from the master area with keyboard shortcuts.

    {  MOD1|ShiftMask,   XK_m,  more_master,  {.i = 1}}, // add window to master area
    {  MOD1|ShiftMask,   XK_l,  more_master,  {.i = -1}}, // remove window from master area

Here's a pic:
tZjFpbA

Cheers


You're just jealous because the voices only talk to me.

Offline

#322 2012-08-09 20:49:39

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

If anyone had a play with dminiwm I hadn't reduced the number of windows in the master area, if necessary, when a window is removed, so there would have been suprises wink A git pull should fix it.

Cheers


You're just jealous because the voices only talk to me.

Offline

#323 2012-08-10 02:39:19

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

I've updated snapwm with the ability to add/remove windows to/from the master area with keyboard shortcuts. Seems to be working fairly smoothly so far. smile

Edit: Forgot the pic wink
tZjF2cw

Cheers

Last edited by moetunes (2012-08-10 02:45:34)


You're just jealous because the voices only talk to me.

Offline

#324 2012-08-10 05:54:03

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

Nice! I was going to ask if it would go into snapwm, but I figured it would. Thank you.

Offline

#325 2012-08-11 16:59:32

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: dminiwm snapwm & bipolarbar

I've been playing with dminiwm too again and I made a PKGBUILD for it. It's in the AUR. (dminiwm-git) I did get a warning when building it:

dminiwm.c: In function ‘add_window’:
dminiwm.c:192:12: warning: ‘c’ may be used uninitialized in this function [-Wuninitialized]

But it builds and seems to work fine AFAICT. I'm not getting any warnings for snapwm-git now btw. I also noticed that the executables are a different size for snapwm and dminiwm when using make and makepkg? But they both seem to work fine either way here. I don't notice any difference when using them. So, anyway, maybe you can figure it out or someone else can help. Again, I'm not a programmer, so I'm a little lost still. Cheers

Offline

Board footer

Powered by FluxBB