You are not logged in.

#1076 2012-10-21 02:35:31

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: monsterwm! ~ yet another tiny wm

@moetunes: based on the description of warpcursor, I don't think that'd solve my gripes.

@c00kiemon5ter: Thanks for the swap focus patch, it's exactly what I wanted. wink About the bars, I think I should have worded it better; I was wondering if it's possible to use a bar at the top and bottom simultaneously.
Regarding the chromium and related issues, I've made some headway. I've narrowed it down to my monsterwm-to-bar script. With an unpatched monsterwm and my script, there's only a problem when a second chromium window is closed. If only one is open and it's closed there isn't an issue. Similarly, GtkPerf is able to finish its test, but closing the window causes monsterwm to exit. But, with my patched monsterwm and the example monsterwm2bar script there isn't a problem. So, I'm guessing it has something to do with how I'm parsing or otherwise using the window title. Below is my script (which is definitely a work-in-progress):

#!/usr/bin/env bash

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

# desktop names
tags=("web" "dev" "foo" "null")

# layout names
layouts=("T" "M" "B" "G" "F")

while read -r wmout || true; do
    desktops=($(cut -d "|" -f 1 <<< "$wmout" | tr " " "\n"))
    title=$(cut -d "|" -f 2- <<< "$wmout")
    unset tmp
    for desktop in "${desktops[@]}"; do
        IFS=':' read -r tag clients layout focus urgent <<< "$desktop"
        ((focus)) && fg="1" bg="7" ul="r" lo="${layouts[$layout]}" || fg="1" bg="r" ul="r"
        ((focus)) && ((clients)) && fg="1" bg="7" ul="9"
        ((clients)) && ((! focus)) && fg="1" bg="r" ul="9"
        ((urgent)) && fg="1" bg="5" ul="8" clients+="!"
        tmp+="\f$fg\b$bg\u$ul${tags[$tag]}\ur\br\fr \f$bg${clients/#0/\f1-} "
    done
    echo "\l$tmp\f1[\f9$lo\f1]" "\c\f1$title" "\r\f1$(date +"%F %R")"
done < "$ff" | bar &

# pass output to fifo
while true; do monsterwm > "$ff" || break; done
#monsterwm > "$ff"

I use linux and I dont understand nothing in this post.

Offline

#1077 2012-10-21 10:14:08

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

Re: monsterwm! ~ yet another tiny wm

aha! I see the mistake in the gist too. will fix in a bit.
here's your script with (imo) simplified logic

#!/usr/bin/env bash

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

# desktop names
tags=("web" "dev" "foo" "null")

# layout names
layouts=("T" "M" "B" "G" "F")

while read -t 60 -r wmout || true; do
    desktops=( $(cut -d"|" -f1 <<< "$wmout") )
    title="$(cut -d"|" -f2- <<< "$wmout")"
    if [[ "${desktops[@]}" =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+$ ]]; then
        unset tmp lo
        for desktop in "${desktops[@]}"; do
            IFS=':' read -r tag clients layout focus urgent <<< "$desktop"
            fg="1"
            ((focus  )) && bg="7" || bg="r"
            ((clients)) && ul="9" || ul="r"
            ((urgent )) && bg="5" ul="8" clients+="!"
            tmp+="\f$fg\b$bg\u$ul${tags[$tag]}\ur\br\fr \f$bg${clients/#0/\f1-} "
        done
    fi
    datetime="$(date +"%F %R")"
    echo "\l$tmp\f1[\f9$lo\f1]" "\c\f1$title" "\r\f1$datetime)"
done < "$ff" | bar &

# pass output to fifo
while true; do monsterwm > "$ff" || break; done

.:[ git me! ] :.

Offline

#1078 2012-10-21 21:50:26

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: monsterwm! ~ yet another tiny wm

It works! Thanks, and sorry if I put you on a wild goose chase. wink
One more thing, Skype's window title isn't picked up by monsterwm, I'm assuming because of the ™ character in the window name. Is there any way to fix this?


I use linux and I dont understand nothing in this post.

Offline

#1079 2012-10-21 22:01:13

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

Re: monsterwm! ~ yet another tiny wm

can you run

 xprop _NET_WM_NAME WM_NAME 

onto the skype window and paste the result ?


.:[ git me! ] :.

Offline

#1080 2012-10-22 00:20:21

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: monsterwm! ~ yet another tiny wm

@c00kiemon5ter:

_NET_WM_NAME(UTF8_STRING) = "myusername - Skype™"
WM_NAME(COMPOUND_TEXT) = "myusername - Skype™"

I use linux and I dont understand nothing in this post.

Offline

#1081 2012-10-31 21:11:22

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

Re: monsterwm! ~ yet another tiny wm

Hey! I'm fiddling around with cookieboy's wmrun.sh and statusinfo.sh but I can't seem to figure out how to make it to work well just with one monitor. I do have two monitors but the other one is for gaming Wii etc. I had statusinfo.sh in the past that worked with single monitor setups. Also I prefer wmrun/statusinfo combo because it can be configured on the fly smile I'm pretty sure I have to remove and fiddle with m/n values but I'm a bit lost.

Here's a pic how it looks, check the left side of the panel
tZzNqNA

...and here's the code

#!/usr/bin/env sh
# expects a line from monsterwm's output as argument ("$1")
# prints formatted output to be used as input for bar
# reference: bar by LemonBoy -- https://github.com/LemonBoy/bar

# desktop status
for desk; do
    m="${desk%%:*}" desk="${desk#*:}" # monitor id
    n="${desk%%:*}" desk="${desk#*:}" # is current monitor
    d="${desk%%:*}" desk="${desk#*:}" # desktop id
    w="${desk%%:*}" desk="${desk#*:}" # window count
    l="${desk%%:*}" desk="${desk#*:}" # layout mode
    c="${desk%%:*}" desk="${desk#*:}" # is current desktop
    u="$desk"                         # has urgent hint

    # desktop id
    case "$d" in
        0) d=" term" ;; 1) d=" web" ;;
        2) d=" img" ;; 3) d="" ;;
    esac

    # current desktop on active monitor
    if [ $n -ne 0 -a $c -ne 0 ]
    then bg="\b2" un="\u2"
        case "$l" in
            0) s="Classic Tiling Mode" ;; 1) s="Monocle Mode" ;; 2) s="Bstack Mode" ;;
            3) s="Grid Mode" ;; 4) s="Bloat Mode" ;;
        esac && s="\u2\b2 $s \br\ur"
    # current desktop on inactive monitor
    elif [ $c -ne 0 ]
    then bg="\b4" un="\u4"
    fi

    # has urgent hint or no windows
    [ $u -ne 0 ] && un="\u3"
    [ $w -eq 0 ] && w="\f0-"

    if [ "$m" -eq 0 ]
    then mr="$mr$bg$fg$un $d $w \ur\br\fr"
    elif [ "$m" -eq 1 ]
	then ml="$ml$bg$fg$un $d $w \ur\br\fr"
    fi

    unset bg fg un
done

# music status
music="$(mpc current -f "[%title%|%file%] #\f9by#\fr %artist%")"
if [ -z "$music" ]; then music="nothing to see here" mstat=""
else
    mstat="$(mpc | sed -rn '2s/\[([[:alpha:]]+)].*/\1/p')"
    [ "$mstat" == "paused" ] && mstat="" || mstat=""
fi

# volume status
if [ "$(amixer get Master | sed -nr '$ s:.*\[(.+)]$:\1:p')" == "off" ]
then vol="[m]" vstat=""
else
    vol="$(amixer get PCM | sed -nr '$ s:.*\[(.+%)].*:\1:p')"
    if   [ "${vol%\%}" -le 10 ]; then vstat=""
    elif [ "${vol%\%}" -le 20 ]; then vstat=""; else vstat=""; fi
fi

# date and time
date="$(date +"%a %d/%m %R")" dstat=""

printf '%s %s %s' "$ml$mr" "$s" "\r"
printf ' \\u2\\b2 %s \\br\\ur %s' "$mstat" "$music" "$vstat" "$vol" "$dstat" "$date "
printf '\n'

Last edited by Shinryuu (2012-10-31 21:12:18)

Offline

#1082 2012-10-31 21:16:51

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

Re: monsterwm! ~ yet another tiny wm

try this, I haven't tested, but I guess it should work

#!/usr/bin/env sh
# expects a line from monsterwm's output as argument ("$1")
# prints formatted output to be used as input for bar
# reference: bar by LemonBoy -- https://github.com/LemonBoy/bar

# desktop status
for desk; do
    d="${desk%%:*}" desk="${desk#*:}" # desktop id
    w="${desk%%:*}" desk="${desk#*:}" # window count
    l="${desk%%:*}" desk="${desk#*:}" # layout mode
    c="${desk%%:*}" desk="${desk#*:}" # is current desktop
    u="$desk"                         # has urgent hint

    # desktop id
    case "$d" in
        0) d=" term" ;; 1) d=" web" ;;
        2) d=" img" ;; 3) d="" ;;
    esac

    # current desktop on active monitor
    if [ $c -ne 0 ]
    then bg="\b2" un="\u2"
        case "$l" in
            0) s="Classic Tiling Mode" ;; 1) s="Monocle Mode" ;; 2) s="Bstack Mode" ;;
            3) s="Grid Mode" ;; 4) s="Bloat Mode" ;;
        esac && s="\u2\b2 $s \br\ur"
    fi

    # has urgent hint or no windows
    [ $u -ne 0 ] && un="\u3"
    [ $w -eq 0 ] && w="\f0-"

    deskinfo="$deskinfo$bg$fg$un $d $w \ur\br\fr"
    unset bg fg un
done

# ... other commands like: date and time
date="$(date +"%a %d/%m %R")" dstat=""

printf '%s %s %s' "$deskinfo" "$s" "\r"
printf ' \\u2\\b2 %s \\br\\ur %s' "$dstat" "$date "
printf '\n'

screen crosspost big_smile

Last edited by c00kiemon5ter (2012-10-31 21:48:19)


.:[ git me! ] :.

Offline

#1083 2012-10-31 21:27:39

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

Re: monsterwm! ~ yet another tiny wm

Jesus that was fast... also nice shot cool
Heh, _almost works_

/home/shn/bin/statusinfo.sh: line 34: syntax error near unexpected token `done'
/home/shn/bin/statusinfo.sh: line 34: `done'

Offline

#1084 2012-10-31 21:29:03

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

Re: monsterwm! ~ yet another tiny wm

oh, a 'fi' is missing tongue

     # current desktop on active monitor
    if [ $c -ne 0 ]
    then bg="\b2" un="\u2"
        case "$l" in
            0) s="Classic Tiling Mode" ;; 1) s="Monocle Mode" ;; 2) s="Bstack Mode" ;;
            3) s="Grid Mode" ;; 4) s="Bloat Mode" ;;
        esac && s="\u2\b2 $s \br\ur"
    fi  # <--- this here 

Last edited by c00kiemon5ter (2012-10-31 21:29:41)


.:[ git me! ] :.

Offline

#1085 2012-10-31 21:30:38

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

Re: monsterwm! ~ yet another tiny wm

Hey c00kie ... did you ever get a chance to experiment with adding a 2nd screen on-the-fly? You had mentioned several pages back you might have some ideas for doing that. I'm still just restarting the WM when I attach my external monitor.

Thanks!
Scott

Offline

#1086 2012-10-31 21:35:50

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

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

oh, a 'fi' is missing tongue

     # current desktop on active monitor
    if [ $c -ne 0 ]
    then bg="\b2" un="\u2"
        case "$l" in
            0) s="Classic Tiling Mode" ;; 1) s="Monocle Mode" ;; 2) s="Bstack Mode" ;;
            3) s="Grid Mode" ;; 4) s="Bloat Mode" ;;
        esac && s="\u2\b2 $s \br\ur"
    fi  # <--- this here 

That helped a bit smile Now I just need to figure out how to get desktop information around!
Demonstration:
tZzNqbw

Offline

#1087 2012-10-31 21:41:59

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

Re: monsterwm! ~ yet another tiny wm

oh oh tongue I know tongue change

printf '%s %s %s' "$ml$mr" "$s" "\r"
# to
printf '%s %s %s' "$deskinfo" "$s" "\r"

also fixed on the original post

Last edited by c00kiemon5ter (2012-10-31 21:48:42)


.:[ git me! ] :.

Offline

#1088 2012-10-31 21:44:16

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

Re: monsterwm! ~ yet another tiny wm

Oh god.. that was so obvious!

Offline

#1089 2012-10-31 21:45:31

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

Re: monsterwm! ~ yet another tiny wm

firecat53 wrote:

Hey c00kie ... did you ever get a chance to experiment with adding a 2nd screen on-the-fly? You had mentioned several pages back you might have some ideas for doing that. I'm still just restarting the WM when I attach my external monitor.

Thanks!
Scott

not much tbh, but will get to it. I am building an xcb wm and I'm looking into many things again.
It can already do single-border and single-uselessgap grid and nmaster (both nv-stack and nh-stack)

about the new plugging of a monitor and stuff, things are moving over to randr.
xcb does have an API to randr extension, I'm not sure what's going on on xlib yet.

I'm having an exam in the end of the month and after that, I'll get the changes back into monsterwm
and probably release that ^ wm

Last edited by c00kiemon5ter (2012-10-31 21:51:16)


.:[ git me! ] :.

Offline

#1090 2012-10-31 21:50:13

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

Re: monsterwm! ~ yet another tiny wm

Gotta spam once more before you leave me all alone! Everything is working but panel feels slow/heavy and is sluggish, I have had this behaviour with some scripts in the past. I wonder if there are any room for optimizations.

wmrun.sh

#!/usr/bin/env sh

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

# spawn a statusbar
while read -t 60 -r line || true; do
    echo "$line" | grep -qEx "(([[:digit:]]+:){4,6}[[:digit:]]+ ?)+" && prev="$line" || line=
    statusinfo.sh ${line:-$prev}
done < "$ff" | bar &

# spawn a pager
#mopag < "$ff" &

"$wm" > "$ff"

statusinfo.sh

#!/usr/bin/env sh
# expects a line from monsterwm's output as argument ("$1")
# prints formatted output to be used as input for bar
# reference: bar by LemonBoy -- https://github.com/LemonBoy/bar

# desktop status
for desk; do
    d="${desk%%:*}" desk="${desk#*:}" # desktop id
    w="${desk%%:*}" desk="${desk#*:}" # window count
    l="${desk%%:*}" desk="${desk#*:}" # layout mode
    c="${desk%%:*}" desk="${desk#*:}" # is current desktop
    u="$desk"                         # has urgent hint

    # desktop id
    case "$d" in
        0) d=" term" ;; 1) d=" web" ;;
        2) d=" img" ;; 3) d="" ;;
    esac

    # current deskto
    if [ $c -ne  0 ]
    then bg="\b2" un="\u2"
        case "$l" in
            0) s="Classic Tiling Mode" ;; 1) s="Monocle Mode" ;; 2) s="Bstack Mode" ;;
            3) s="Grid Mode" ;; 4) s="Bloat Mode" ;;
        esac && s="\u2\b2 $s \br\ur"
    fi

    # has urgent hint or no windows
    [ $u -ne 0 ] && un="\u3"
    [ $w -eq 0 ] && w="\f0-"

    deskinfo="$deskinfo$bg$fg$un $d $w \ur\br\fr"
    unset bg fg un
done

# music status
music="$(mpc current -f "[%title%|%file%] #\f9by#\fr %artist%")"
if [ -z "$music" ]; then music="nothing to see here" mstat=""
else
    mstat="$(mpc | sed -rn '2s/\[([[:alpha:]]+)].*/\1/p')"
    [ "$mstat" == "paused" ] && mstat="" || mstat=""
fi

# volume status
if [ "$(amixer get Master | sed -nr '$ s:.*\[(.+)]$:\1:p')" == "off" ]
then vol="[m]" vstat=""
else
    vol="$(amixer get PCM | sed -nr '$ s:.*\[(.+%)].*:\1:p')"
    if   [ "${vol%\%}" -le 10 ]; then vstat=""
    elif [ "${vol%\%}" -le 20 ]; then vstat=""; else vstat=""; fi
fi

# date and time
date="$(date +"%a %d %R")" dstat=""

printf '%s %s %s' "$deskinfo" "$s" "\r"
printf ' \\u2\\b2 %s \\br\\ur %s' "$mstat" "$music" "$vstat" "$vol" "$dstat" "$date "
printf '\n'

Last edited by Shinryuu (2012-10-31 21:51:41)

Offline

#1091 2012-10-31 22:09:16

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

Re: monsterwm! ~ yet another tiny wm

things responsible for this would be

- the load on your computer
- the language + compiler/interpreter you use to process the output and other commands ie,
Bash has arrays, and using '$arr[$d]' is O(1) while 'case $d in .. ' is O(n)
C has arrays and is compiled and can be optimized, runs natively etc
- the number of commands you spawn and process their output ie the number of $(cmd ..) you have
- how you generate and process the text you want to display, ie

f=$(foo); echo "$f" | sed 's/x/y/g' 
b=$(bar); echo "$b" | sed 's/x/y/g' 
echo "$f $b"

# is slower than

out=$(foo | sed 's/x/y/g; bar | sed 's/x/y/g;)

# is slower than

out=$(foo; bar)
echo "$out" | sed 's/x/y/g

- how that input is processed and displayed


with the dynamic scheme I use you have

wmrun.sh <-- read input from pipe
  `-> calls statusinfo
       |`-> process output
       |`-> spawn many different commands
        `-> format output and print
              `-> feed this to bar

tbh, things are fine here,
I may notice some minor delay from time to time but it's not very important
or annoying to make it worth rewritting the sh high-level processing to C

Last edited by c00kiemon5ter (2012-10-31 22:12:15)


.:[ git me! ] :.

Offline

#1092 2012-10-31 22:17:04

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

Re: monsterwm! ~ yet another tiny wm

Thanks for the huge help and info, now everything is working well. It seems I had several scripts running while I was experimenting (I had 100/% CPU load) so that was causing the lag. Now this panel looks as it should smile

Last edited by Shinryuu (2012-10-31 22:17:37)

Offline

#1093 2012-10-31 22:21:21

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

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

... I'll get the changes back into monsterwm and probably release that ^ wm

The xcb monsterwm? Yay \o/

Offline

#1094 2012-11-01 01:22:13

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

Re: monsterwm! ~ yet another tiny wm

Indeed! Looking very much forward to that smile (Having not only the bar, but also the vm in xcb...)

Offline

#1095 2012-11-01 12:38:33

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

Re: monsterwm! ~ yet another tiny wm

To be honest, I was waiting for this "xcb-monsterwm" as a kid with Christmas gifts.


Github -- My terminal font Envypn

Offline

#1096 2012-11-03 18:19:03

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

xcb does have an API to randr extension

Cough

    man xcb_randr_screen_change_notify_event_t

i3-wm uses the randr API.


gh · da · ds

Offline

#1097 2012-11-03 18:58:15

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

Re: monsterwm! ~ yet another tiny wm

smile finally man pages big_smile

yeah, I already use it too (needs work though).
if anyone's interested here's the protocol specification
http://cgit.freedesktop.org/xorg/proto/ … rproto.txt

btw, this aims to be fully dynamically configurable and uses
a client to communicate with the wm just like bspwm.
I wanna make it work nicely with different output devices (projectors mostly)
and so randr provides the tools for the different modes (clone, second monitor, rotations etc)
this wm provides all the tiling layouts monsterwm provides and includes
nmaster (for both bottom and side stack) and optionally uselessgaps
with single borders or when uselessgaps is on single useless gaps
on both the master and stack area (and on grid and monocle).
It also uses tags instead of desktops.

playing with some new concepts and code smile

but I have to study first sad durdurdur

Last edited by c00kiemon5ter (2012-11-03 18:59:50)


.:[ git me! ] :.

Offline

#1098 2012-11-04 01:02:31

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

Re: monsterwm! ~ yet another tiny wm

I already like the upcoming project. About bspwm, the only thing I dislike is the keyboard management. It needs xbindkeys. I hope it won't be like that in your next WM.
You should add initlayouts branch too.
About tags and desktop, what will be the differences?

Anyway, good luck for your studies / exams.


Github -- My terminal font Envypn

Offline

#1099 2012-11-04 02:56:17

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

Re: monsterwm! ~ yet another tiny wm

@cookie
So, monsterwm will be done after you show us that new wm. Can you find spare time to explain how will it be (not) like monsterwm?

You can answer a few questions to make it easier for us geeks:
1. Will it follow monsterwm sloc logic? Neat and simple? WIll it stay as simple as possible as monsterwm is at the moment?
2. Will tags be implemented as in dwm or...?
3. What is the reason to develop something new and not just extend monsterwm? At first i thought as this new wm as monsterwm with new logic to extend the current monsterwm abilities to manage clients + ability to do it on more than one monitor (and projectors etc.) but i'm not sure if that is the right way of thinking. Care to explain it a little more?

I'm just curious so that is why i asked all those questions. Feel free to answer them whenever you like.

p.s. Good luck with your exam smile

Offline

#1100 2012-11-04 11:39:31

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

Re: monsterwm! ~ yet another tiny wm

Ypnose wrote:

I already like the upcoming project. About bspwm, the only thing I dislike is the keyboard management. It needs xbindkeys. I hope it won't be like that in your next WM.

currently, that's the idea. the wm will only handle windows, nothing more (bars/fonts/keybinds/etc).
the only other thing that the wm listens to is mouse motion (to move / resize windows).

Ypnose wrote:

About tags and desktop, what will be the differences?

tags have the opposite logic of desktops.
when using tags, you have only one desktop
and many 'sets' of windows, grouped together by tags.
That means, each window is assigned a list of tags
and each monitor is assigned a list of tags.
when the monitor's tags match any of the window's tags, then that window is shown.

so consider three tags "nil", "web" and "dev". now say,
'chromium', 'mutt' and 'gtk-youtube' are tagged with the "web" tag
some terminals and 'geany' are tagged with the "dev" tag
and one monitor with currently with the tag "nil".

as there are no windows tagged with "nil" no window is shown.
with a shortcut (like Alt+F1 on monsterwm) we toggle the "web" tag
and all windows from the "web" tag are shown.
with a shortcut again we toggle the "dev" tag
and all windows from the "dev" tag are shown
without removing the "web" windows.
with a shortcut again we toggle the "web" tag and now
only the "dev" windows are shown.
notice that the "nil" windows are shown too, but there is none of them at this point.
if we now open an app that there is a rule set to tag it as "nil" it will be automatically
shown, as the "nil" tag is still there.

one can ofcourse switch tags and not just toggle them.
if there is no rule for an app, then it inherits the tags on the monitor at the time.
each window can have its tags changed ofcourse and that will result
to something similar to moving windows when you work with desktops.

Ypnose wrote:

You should add initlayouts branch too

so initlayouts does not make much sense in this context,
as there are no desktops to set a layout, but only one.

also check this

One could mimic the way desktops work by only switching tags,
then you can get something like initlayouts by automatically
changing the layout to the desired when you switch tags.
ie you bind two commands to a shortcut

 Alt+F1  switch_tag dev
 Alt+F1  set_layout bstack

either way, the configuration is dynamic, there is no "config.h" file smile
which maybe weird at first, but it makes some sense.
so initlayouts or whetever one had in config.h (like rules)
will be a command sent when the wm starts.


tags themselves is the only not completely dynamic thing.
there are 16 tags, which are named dynamically, but one can always
use them, even if there is no name set (they just get a number).
what you can't do is remove or add tags, there are always 16
and they are always there. you can just rename them.
'16' sounds logical to me, I could get it up to any number tbh,
but doing so dynamically would be a pain.


kuraku wrote:

So, monsterwm will be done after you show us that new wm

no, not really, each has its place and goals. I think monsterwm is great.
it is tiny and simple and to the point. as a product it does what is advertised and imo does it good.
code-wise it does have some hacks and some ugly formatting at times tongue but I would prefer it over
many many things out there.

kuraku wrote:

1. Will it follow monsterwm sloc logic? Neat and simple? WIll it stay as simple as possible as monsterwm is at the moment?

no and yes big_smile
the code is really simple (I hope) once one understands the 'tagging concept' -- there will be documentation smile .
the sloc however will not be of the same magnitude (around 1800loc atm). this is good and bad.
on monsterwm there are many "hacks" to reduce the line count, that make the code a bit ugly.
iirc, I tried to unroll monsterwm code once and got it to 1200loc easily (like having proper 'if .. else' instead of '..?..:..' etc).
so the "big" code is not 'bad'. 'bad' code would be _complex_ code or wrong code.
I didn't want to limit myself with this wm, and put constrains like loc, I do not believe that the loc is the
problem that makes software bad and code bad and unreadable (I do agree it has its role there ofcourse).
this wm will also try to handle some events better and support more of ewmh.

so, it will be neat and simple (hopefully) but the sloc will be greater.

kuraku wrote:

2. Will tags be implemented as in dwm or...?

tags are bitmasks atm that match an array with the dynamic tag names.

kuraku wrote:

3. What is the reason to develop something new and not just extend monsterwm? At first i thought as this new wm as monsterwm with new logic to extend the current monsterwm abilities to manage clients + ability to do it on more than one monitor (and projectors etc.) but i'm not sure if that is the right way of thinking. Care to explain it a little more?

the new wm is different as
- it is written in xcb
- it uses tags instead of desktops
- it wants clean code only
- it will better handle some events as it
- will support more of ewmh
- I want it to handle pluggable monitors smoothly
- will probably have more tiling methods (like stack on the left, or two side columns or w/e)
  which is I think are really easy to have, even on monsterwm.

I can and will get some of those back to monsterwm (ie the nmaster stuff)
but I cannot extend monsterwm to for example, use tags.
There are and will be shared things and code.

note that xcb is more verbose (as it is more low-level) than xlib.
an xcb-monsterwm will be bigger inevitably.


.:[ git me! ] :.

Offline

Board footer

Powered by FluxBB