You are not logged in.
Ok, that worked I THOught I had gone through that particular iteration yesterday, but I guess not. Well, anyway....using dmplex for this is apparently a bad idea unless I'm missing something. The status info gets combined fine at first (well, formatting is also an issue) but as soon as you start opening windows and switching workspaces, the status bar goes completely fubar (info moves around, prints on top of one another, freezes for short times). I tried using the dzen ^p and ^pa commands to fix the positions, but that didn't seem to work.
No big deal...it just seemed cleaner and more efficient at first than having 2 separate bars! But the 2 bars work great...no issues! I've moved to monsterwm now from dwm and have a totally usable system. Only minor glitches now to figure out.
Thanks for the help!
Scott
Offline
dmplex would be nice if dzen allowed to align text with some special sequence like ^al() , ^ar() for "align right/left", but unfortunatelly that's only possible with a switch (dzen2 -ta [lr]).
.:[ git me! ] :.
Offline
I've added alignment options to some_sorta_bar with monsterwm's type of output in mind.
&L some left text &C some center text &R text on the right
edit:
I forgot to mention that the numbers for the colours now go from 2 - 9, it was 0 - 7.
Here's a pic:
Last edited by moetunes (2012-03-13 20:32:45)
You're just jealous because the voices only talk to me.
Offline
Great work moetunes, once again
Just pushed a fix that would cause monsterwm to freeze or crash when only one client was present and one tried to go to the previous (non-existing) window.
Also XKeycodeToKeysym is now deprecated, and replaced by XkbKeycodeToKeysym.
Fixed this, so no warnings will be seen when compiling.
Last edited by c00kiemon5ter (2012-03-13 20:03:22)
.:[ git me! ] :.
Offline
What's the impact of that for us mere mortals?
Offline
I've been playing with some_sorta_bar and monsterwm. I got the output to work (I think) but I can't seem to figure out how to run conky through the same bar. Here's my startup script:
#!/bin/bash
: "${wm:=monsterwm}"
: "${ff:="/tmp/${wm}.fifo"}"
some_sorta_bar &
[[ -p $ff ]] || mkfifo -m 600 "$ff"
while read -r; do
[[ $REPLY =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]] && read -ra desktops <<< "$REPLY" || continue
for desktop in "${desktops[@]}"; do
IFS=':' read -r d w m c u <<< "$desktop"
case $d in
0) d="web" s="" ;;
1) d="term" s=":" ;;
2) d="foo" s=":" ;;
3) d="misc" s=":" ;;
esac
((c)) && f="&3" && case $m in
0) i="[T]" ;;
1) i="[M]" ;;
2) i="[b]" ;;
3) i="[G]" ;;
esac || f="&2"
((u)) && f="&9"
((w)) && r+="&2$s $f$d $w " || r+="&2$s $f$d "
done
printf "&L%s%s\n" "$r" "&2$i" && unset r
done < "$ff" | while read -r; do xsetroot -name "$REPLY"; done &
while :; do "$wm" || break; done | tee -a "$ff"
If you see anything else wrong let me know too, thanks.
Offline
Offline
some_sorta_bar &
monsterwm | while read -t 30 -r wmout; do
if [[ $wmout =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]]; then
read -ra desktops <<< "$wmout" && unset r
...
fi
datetime="$(date +"%D %R")"
xsetroot -name "&L $r $i $R $datetime"
done
note that the the previous [[ $REPLY =~ ..pattern.. ]] is now a true 'if' statement
also the 'unset r' has been moved, to only unset r, when new data come in.
datetime, can ofcourse be anything you want. It's just an example there, of how to get stuff in the other end too.
You can even have more stuff in the center with &C
Last edited by c00kiemon5ter (2012-03-14 01:55:47)
.:[ git me! ] :.
Offline
@stlarch
Have monsterwm write to your temp file and use conky's tail function to display it.
You're just jealous because the voices only talk to me.
Offline
@moetunes some_sorta_bar seems great so far
the only thing that doesn't seem to work correctly is the font
I have
static const char *fontbarname = "-misc-terminusmod.icons-medium-r-normal--12-120-72-72-c-60-*-*";
I know this is correct, but I've tried with stars(*) in the fields etc, but the font seems to be wrong
actually it seems I'm getting a small electricity socket icon next to the expected icon.
I have no idea what it is :S
.:[ git me! ] :.
Offline
@ c00kiemon5ter
What it is is the next icon in terminusmod.icons after the expected one showing up. It seems the icons aren't the same width as the rest of the text so anomalies pop up. I spent ages with the icons in my conky trying to get the widths right, I'd adjust it for one scenario and it would be wrong for the next. So I've set it up to be right with standard text and have found that a space at the front of the text will fix it up when the icon widths play up with the spacing. Sound feasible?
I am guessing that you have at least a couple of icons showing before the one that gets the extra, if not it's something new and I'd like to know where it happens in the text and how many icons there are before it so I can check things out.
I've been trying to come up with a way to handle different width fonts but haven't found anything suitable yet.
You're just jealous because the voices only talk to me.
Offline
here's a shot (wtf, weird thumb?!)
an idea is to look at dmenu's code, as it does handle different fonts. Maybe that'd help.
I actually, don't really mind, so look into it only when you have time. Don't get into trouble for me.
Another thing I noticed, is that if I hover window above the bar, the contents are erased, like the window is a rubber/erase tool in paint apps If I switch to a tty/console and back then the bar is empty. Ofcourse when xsetroot is called again, the contents come back.
I'll try getting some spaces there thanks
I really like that you can arrange text that way,
I had looked to find something like that, but failed.
some_sorta_bar is some sorta bar for sure x)
edit: tried adding space(s) before and after the text, but it doesn't fix it
Last edited by c00kiemon5ter (2012-03-14 13:03:41)
.:[ git me! ] :.
Offline
You have two icons showing everywhere in that shot, that's not good. I get nothing like that so I'm guessing you have a different method for getting the icons into the text. I'm using conky and doing ${execi 1800 printf '\xCE'}, what are you using to have the icons show? printf "%b" ?
I'll have to set up watching for expose events so the text will be drawn when it gets uncovered.
Last edited by moetunes (2012-03-14 13:45:49)
You're just jealous because the voices only talk to me.
Offline
I'll look into it moetunes, once I have more free time.
fyi, I use a bash script that gathers data, and does a printf "%s\n" ..
For the moment I pushed the fix for _NET_ACTIVE_WINDOW so now xdotool and other such tools that use that property to focus/select new windows, should now work correctly
I think the next thing I'll push is nmaster but later this week cause I have to make a living x)
Last edited by c00kiemon5ter (2012-03-14 15:31:06)
.:[ git me! ] :.
Offline
I don't know what other people think, but I love the uselessgaps patch. However, when I have 1 window, I prefer to not have the gaps...just the fullscreen window. So I undid the uselessgap changes in the monocle function and it now works the way I prefer. Here's the patch (well, it really just goes back to the way it is in the master branch, so I accomplished nothing dramatic ).
Scott
diff --git a/monsterwm.c b/monsterwm.c
index e301d09..1dad295 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -539,8 +539,7 @@ void mousemotion(const Arg *arg) {
/* each window should cover all the available screen space */
void monocle(int hh, int cy) {
- for (client *c=head; c; c=c->next) if (!ISFFT(c))
- XMoveResizeWindow(dis, c->win, USELESSGAP, cy + USELESSGAP, ww - 2*USELESSGAP, hh - 2*USELESSGAP);
+ for (client *c=head; c; c=c->next) if (!ISFFT(c)) XMoveResizeWindow(dis, c->win, 0, cy, ww, hh);
}
/* move the current client, to current->next
Offline
@c00kiemon5ter
You have a new line in a one line output? The fonts work fine in some_sorta_bar but I think you have to call them differently then you're used to. Here's an example that has them drawn fine.
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 ='
#dbus-launch thunar --daemon &
#conky -c ~/build/status_conky | while read -r; do xsetroot -name "$REPLY"; done &
# $starter ~/build/snapwm-0.4.1/snapwm
~/progs/c.files/some_sorta_bar/some_sorta_bar &
# conky -c ~/build/status_conky.ssb | while read -r; do xsetroot -name "$REPLY"; done &
while true; do
mem=`free -m | grep \+ | awk '{print \$3 }'`
temp=`/home/pnewm/.bin/sensors_out`
fuzzytime=`/home/pnewm/progs/c.files/fuzzyctime`
xsetroot -name "$( printf "&L&4\xCE memory &2$mem mB &C&4\xB1&3temp $temp &R&4\xB9 $fuzzytime \xEA" )"
sleep 2
done &
$starter ~/build/dminiwm-0.3.5/src/dminiwm
# $starter startfluxbox
The first icon is drawn in the printf with \xCE , that's all it needs. HTH.
You're just jealous because the voices only talk to me.
Offline
Sorry to disappear. I had a little emergency right after I posted (dog bite to the hand!). Doooh. It hurts like nobody's business. He tried to take it with him. ( He must have thought it was a cookie!) It messed me up pretty bad. I'm starting to come around now. I kinda forgot what I was doing, but I'll give it another try. Thanks for the help guys.
Last edited by stlarch (2012-03-15 16:42:11)
Offline
Thanks alot moetunes for the new direction feature of your bar, much appreciated!
However, I have some problems with it so that I unfortunetly have to stick with dzen2 still...
I've used the example posted by c00kiemon5ter here: https://gist.github.com/1905427#file_st … _sorta_bar, and i've just changed the desktops from 3 to 4 i.e. just added an extra one, and then also added some more bash commands to the $datetime var, i.e. for listing battery and vol and that's it.
Then when starting the wm, I get first the bar shown correctly with the 4 desktops, but then after about 2 secs, I get the same desktops listed again, and the same after 2 secs again?
Also, when I change to other desktops, then it's fine when going from 1 to 2 and then to 3, but when going to 4, then the bar disappears and never comes back again?
Thanks in advance!
Btw, the $datetime var shows correcty to the right...
Ohh, here's the shot of course:
Also @c00kiemon5ter: In your gist example, then the $datetime var isn't updated right? I mean it's not a "finished" example, and needs to be changed so as the date and time actually progresses, right? Or is this also only an issue on my end here ?
Thanks in advance!
Last edited by mhertz (2012-03-15 14:55:48)
Offline
when starting the wm, I get first the bar shown correctly with the 4 desktops, but then after about 2 secs, I get the same desktops listed again, and the same after 2 secs again?
Sorry, the multiple output of desktops is my fault
fixed in the gist, check it, I forgot to unset r
read -ra desktops <<< "$wmout" && unset r
Also, when I change to other desktops, then it's fine when going from 1 to 2 and then to 3, but when going to 4, then the bar disappears and never comes back again?
dont know about that, it could be crashing because of too many copies to display? don't know, check if the fixed gist script fixed that.
Also @c00kiemon5ter: In your gist example, then the $datetime var isn't updated right? I mean it's not a "finished" example, and needs to be changed so as the date and time actually progresses, right? Or is this also only an issue on my end here ?
on the while loop, there is a timeout, -t xxx
monsterwm | while read -t 30 -r wmout; do
set 30 to wheter value of seconds you want, the "datetime" command to update
the script updates either when the timeout is over
or when mosterwm outputs some text
Last edited by c00kiemon5ter (2012-03-15 15:05:21)
.:[ git me! ] :.
Offline
I'm getting some of the same issues described by mhertz. I'm struggling a little here trying to cobble something together. I really need to get with the program and learn some scripting. I've been procrastinating.
Offline
edited the post above, please check that, and tell me
edit: oh, also another issue, the while loop should be
monsterwm | while read -t 30 -r wmout || true; do
otherwise it will break when the timeout is over, that could cause the crashing of the bar.
fixed in gist
Last edited by c00kiemon5ter (2012-03-15 15:08:28)
.:[ git me! ] :.
Offline
The new one in gist seems to be working for me now. I think I had part of it right before but I couldn't put it together. I modified it a little. Does it look ok?
#!/bin/bash
: "${wm:=monsterwm}"
: "${ff:="$HOME/tmp/${wm}.fifo"}"
some_sorta_bar &
[[ -p $ff ]] || mkfifo -m 600 "$ff"
while read -t 30 -r wmout || true; do
if [[ $wmout =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]]; then
read -ra desktops <<< "$wmout" && unset r
for desktop in "${desktops[@]}"; do
IFS=':' read -r d w m c u <<< "$desktop"
case $d in
0) d="web" s="" ;;
1) d="term" s=":" ;;
2) d="foo" s=":" ;;
3) d="misc" s=":" ;;
esac
((c)) && f="&3" && case $m in
0) i="T" ;;
1) i="M" ;;
2) i="B" ;;
3) i="G" ;;
esac || f="&2"
((u)) && f="&9"
((w)) && r+="&2$s $f$d $w " || r+="&2$s $f$d "
done
fi
datetime="$(date +"%D %R")"
xsetroot -name "&L$r &2[&3$i&2] &R$datetime"
done < "$ff" &
$wm | tee -a "$ff"
Offline
seems good to me. I think not having the pipe, would get mosterwm hanging on quit.
So I think I'll change it to that, in the gist.
Also I use tee to get the output to stdout on console too.
If you don't want that, then just redirect the output
monsterwm > "$ff"
Last edited by c00kiemon5ter (2012-03-15 16:25:53)
.:[ git me! ] :.
Offline