You are not logged in.

#26 2011-12-23 10:43:34

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

Re: monsterwm! ~ yet another tiny wm

stalphonzo wrote:

Your fix seems to work when gvim isn't the only window in workspace and layout isn't monocle.
In other words: in case gvim can take the full screen the annoying behaviour appears.
I think i'm going to revert the concerning commit, though at the moment I guess it's the cleaner solution and
I don't want to bother you with such annoying stuff.

oh, hadn't noticed that, thanks for reporting, I'll be looking over that section of code later.
I will fix it along with some other things I've noticed. Thanks wink

edit: pushed and will be looking over it again later
I'd be glad if you could test it and report if there are any problems, thanks again

Last edited by c00kiemon5ter (2011-12-23 20:40:55)


.:[ git me! ] :.

Offline

#27 2011-12-23 11:11:59

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

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

However, give us a heads up, if you go forward with that wink This can actually be done without affecting any of the current code, just adding a new method and a shortcut to re-read the configuration. All it would do is get the new/default values and reset them internally. If you have it working, this can be maintained as a patch, for anyone that would like it.

Your answer convinced me. Why? Because I love dwm and config.h method. It's not hard to recompile after any changes, but the performance are much better compared to others WM.
Nice project.


Github -- My terminal font Envypn

Offline

#28 2011-12-25 03:14:12

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

Re: monsterwm! ~ yet another tiny wm

I reworked the tile function, and now windows will always cover the whole screen on tile and bstack modes. Also there are now a bit less loc(636) than when I announced this(642) smile

I will work on getting desktop and window information tomorrow. I already tried a couple of things and got something working.


.:[ git me! ] :.

Offline

#29 2011-12-26 15:24:38

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

Re: monsterwm! ~ yet another tiny wm

Latest commit implements, outputing some desktop information. More specific, the wm outputs on every window change (addition/removal of window) the window count on every desktop in the following format:

(desktop:window_count )*desktop:window_count

that is, the desktop number,
followed by ':',
followed by the window count on that deskop,
followed by a single space if it's not the last desktop,
and a new line if it's the last desktop

for example, if I have 4 desktops, here's a typical output:

0:3 1:0 2:12 3:1

this means that desktop 0(the first one) has 3 windows, desktop 1 has no windows, desktop 2 has 12 windows and desktop 3(the last one of four) has 1 window

so one can now parse that output as he likes,
eg. using bash to format the output and display it with dzen2

monsterwm |  while read -r; do             # filter the output
    if [[ $REPLY =~ ^([[:digit:]]+:[[:digit:]]+ ?)+$ ]]; then
        sed -r 's/0:/web:/                 # rename desktop 0 to 'web'
                s/1:/chat:/                # rename desktop 1 to 'chat'
                s/2:/foo:/                 # rename desktop 2 to 'foo'
                s/3:/porn:/                # uhm.., someone is watching pr0n
                s/([^[:space:]]+):([[:digit:]]+)/[ \1 \2 ]/g' <<< "$REPLY"
    fi | dzen2 -h 18 -w 200 -ta -e -p l    # 18px height, 200px width, left align text

which would create a panel on top left corner, with 18px height, 200px width and left aligned text, displaying:

[ web 3 ] [ chat 0 ] [ foo 12 ] [ porn 1 ]

One can even not display a desktop if it has no windows, or not display the window count if it's zero, or get away with the '[ .. ]' thing and come with his own format.

The wm implies no formatting, so the user can format the output as he desires. All the wm knows is that some desktops exist. Those are 0 .. DESKTOPS-1. The wm doesn't care about any names and has nothing to do with displaying a panel.
That way, the wm(monsterwm) has been separated from the panel(dzen2) concept. One "talks" to the other through text, as is the UNIX way.

Here's a couple of shots:

tYng4NQ   tYng4OA

If you're interested in the above, see my script that fires up the wm for me. I don't name any desktop, but it can be done as shown above, all I do is display the window count, minimal and informative smile

I hope you like this, I really do. Be creative wink Any feedback is welcome.

I think the next thing I'll work on, is getting floating mode for transient windows.

Last edited by c00kiemon5ter (2011-12-26 15:30:19)


.:[ git me! ] :.

Offline

#30 2011-12-27 08:18:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: monsterwm! ~ yet another tiny wm

c00kie: that is awesome fantastic! Thanks for the feature.

I've dropped a screenie of my desktop info in the December thread. smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#31 2011-12-27 12:07:18

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

Re: monsterwm! ~ yet another tiny wm

I'm glad you like this smile I've dropped a screenshot too tongue

If you'd like it, I could add more info in that line, like the layout mode and/or mark the current desktop

desktop:windows:mode:current

where current would be a 0/1 value, I guess.

supposing this format I'd parse it like (very quickly):

 monsterwm | while read -r; do
    [[ $REPLY =~ ^([[:digit:]]+:[[:digit:]]+ ?)+ ]] || continue
    read -a desktops <<< "$REPLY"
    for desktop in "${desktops[@]}"; do
        IFS=':' read -r id wins mode current <<< "$desktop"
        case $id in
            0) id="web"
                ;;  
            1) id="term"
                ;;  
            2) id="mail"
                ;;  
            3) id="misc"
                ;;  
        esac
        if (( current )); then
            id="^fg(#d11783)$id^fg()"
            case $mode in
                0) modeicon="[]="
                    ;;  
                1) modeicon="[M]"
                    ;;  
                2) modeicon="TTT"
                    ;;  
                3) modeicon="###"
                    ;;  
            esac
        fi  
        info+="[ $id:$wins ]"
    done
    printf "%s %s\n" "$info" "$modeicon"
    unset info
done

I've already done this, and here is a shot-result:
tYnhuaw

check the icon for the current layout and the coloring for the current desktop
I'll probably push that, but I have to go now. Later in about 5hrs I guess.


.:[ git me! ] :.

Offline

#32 2011-12-27 13:04:01

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter, can you implement an option to spawn custom command on desktop right-click? This is useful for a menu.

Offline

#33 2011-12-28 02:17:37

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

Re: monsterwm! ~ yet another tiny wm

OK100 wrote:

c00kiemon5ter, can you implement an option to spawn custom command on desktop right-click? This is useful for a menu.

I will look into it. I guess more mouse support will come with floating mode support, for transient/pop-up windows.

I pushed the above implementation. The wm now outputs the desktop id, the window count along with the desktop mode and whether the desktop is current, as described above.

Just so that you know, the wm itself has dropped two whole lines! tongue

http://cloc.sourceforge.net v 1.55  T=0.5 s (4.0 files/s, 1556.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1             72             27            584
C/C++ Header                     1             10             24             61
-------------------------------------------------------------------------------
SUM:                             2             82             51            645
-------------------------------------------------------------------------------

I've reworked the function that shows the windows on the screen.
I tested, but if you find any bugs, please report. Thanks smile

Some current shots on the December thread

Last edited by c00kiemon5ter (2011-12-28 02:19:55)


.:[ git me! ] :.

Offline

#34 2011-12-28 03:34:05

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: monsterwm! ~ yet another tiny wm

Thanks for the updates c00kie.

A couple of minor things:
1. If I kill tabbed (Mod-Shift-C), monster hangs and the only way to recover is kill X. If I kill tabbed with an instance of vimprobable still running, no issue. Let me know if you want a stack trace (or anything else).

2. In monster, my cursor is the default X cursor - not sure why it is not picked up...

3. I can't for the life of me get the modeicons to print; even using your wmrun script - I pulled monster an hour ago, is there something else I am missing? Nvm: pulled again and it is all good... Must have been a bit quick on the draw smile

Thanks again.

# edit: moar cookies...
monster-thumb.png

Last edited by jasonwryan (2011-12-28 09:09:31)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#35 2011-12-28 09:04:30

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

Re: monsterwm! ~ yet another tiny wm

Looking into 1

For 2, the default cursor is the "X" cursor. To get a common cursor you would need to

xsetroot -cursor_name left_ptr &

in ~/.xinitrc


.:[ git me! ] :.

Offline

#36 2011-12-28 13:03:20

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

Re: monsterwm! ~ yet another tiny wm

jasonwryan wrote:

1. If I kill tabbed (Mod-Shift-C), monster hangs and the only way to recover is kill X. If I kill tabbed with an instance of vimprobable still running, no issue. Let me know if you want a stack trace (or anything else).

bah, I can't get tabbed to reproduce this. I think I don't even use tabbed the right way, cause I don't get tabs at all. I got latest tabbed from hg tip and also installed vimprobable2-git from aur. I use your config.h for tabbed.

I start tabbed as:

$ tabbed vimprobable2

and I get a grey empty window(tabbed) and a vimprobable instance. If I focus the grey window and hit <Ctrl>+<Return> I get a new vimprobable instance. It's not tabbed, and I now have 3 windows (2 vimprobables and the grey window by tabbed).

Whether I close(:q) or kill all vimprobables, and then kill tabbed, or kill tabbed and then close/kill vimprobables, nothing wrong happens.

But, I think I'm missing something for tabbed here, cause afaik, tabbed is supposed to create tabs.
I'd like some help to reproduce this.

Last edited by c00kiemon5ter (2011-12-28 13:03:52)


.:[ git me! ] :.

Offline

#37 2011-12-28 13:17:41

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

Re: monsterwm! ~ yet another tiny wm

This looks very interesting, I wonder if I can fork and port all my dwm patches to this.

Offline

#38 2011-12-28 15:33:30

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

Re: monsterwm! ~ yet another tiny wm

Thanks Cloudef. It'd definately be fun to see work on this by others smile keep us informed!

I moved my config to another branch(personal) so that the master branch is clearly a development branch, and commits don't clutter with personal customization. I think it's better that way, and also the PKGBUILD should be easier to handle this.


.:[ git me! ] :.

Offline

#39 2011-12-28 16:04:30

redhalo
Member
Registered: 2009-08-11
Posts: 22

Re: monsterwm! ~ yet another tiny wm

monsterwm is amazing. I'm finding it sticks more to the suckless philosophy than dwm itself does. Thanks for outputting window info and not including a bar, this is what really sold me.

thumb-desktop.png?raw=true

Offline

#40 2011-12-28 16:36:04

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: monsterwm! ~ yet another tiny wm

@Cookie

Mate, i have problem whit the layout's mode and mark the current desktop
tYnk4bw

I used your script https://github.com/c00kiemon5ter/script … ster/wmrun

Thanks

Last edited by ivoarch (2011-12-28 16:51:14)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#41 2011-12-28 18:14:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

...
But, I think I'm missing something for tabbed here, cause afaik, tabbed is supposed to create tabs.
I'd like some help to reproduce this.

Sure; you start vimprobable, or any app, by attaching it to the xid of tabbed. So in my monster config.h I have:

SHCMD("$(tabbed -d > /tmp/tabbed.xid); vimprobable2 -e $(</tmp/tabbed.xid)")

Then, to reproduce the error, open a couple of instances of your browser in tabbed. Kill all of the with Ctrl-q and you should be back to the empty tabbed container (the grey box). Kill that with Ctrl-c and that's when I see the lock-up.

Thanks again.


# edit: @ivoarch - see my post a little further up the  page wink

Last edited by jasonwryan (2011-12-28 18:16:20)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#42 2011-12-28 19:24:06

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: monsterwm! ~ yet another tiny wm

@jasonwryan

Thanks dude,but the problem is the same,
I tried even with your monsterbar, rebooted and still the same problem : ) 

is there something else I am missing?


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#43 2011-12-28 20:08:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: monsterwm! ~ yet another tiny wm

Yes: you have an earlier version of monsterwm. It may have something to do with the, ahem, PKGBUILD smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#44 2011-12-29 01:32:28

metre
Member
Registered: 2011-03-13
Posts: 130

Re: monsterwm! ~ yet another tiny wm

Can I, using monsterwm, bind a key in order to launch a program or to show it if it was already running?
I asked it in "The dwm thread" (https://bbs.archlinux.org/viewtopic.php … 2#p1033342), and right now I'm doing this (https://bbs.archlinux.org/viewtopic.php … 3#p1033363).
I don't know if dwm has this feature (built-inf), and after all I don't know if monsterwm has it (built-in). This is why I'm asking the same question here.

Last edited by metre (2011-12-29 01:33:15)

Offline

#45 2011-12-29 03:17:14

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

Re: monsterwm! ~ yet another tiny wm

thanks for your words redhalo wink

ivoarch wrote:

Mate, i have problem whit the layout's mode and mark the current desktop

jasonwryan wrote:

you have an earlier version of monsterwm. It may have something to do with the, ahem, PKGBUILD smile

I, too, think the problem is, you got an older version of monsterwm.

I also believe PKGBUILDs for things like monsterwm, tabbed, dwm, etc, are not that usefull or convinient. An initial git clone, and updates with git pull do the work. One only has to check whether there has been any change on the config.def.h. As I've now separated my personal config from the master branch, the user's config.h won't be affected or overwritten. So, just clone the repo, and pull to update.

metre wrote:

Can I, using monsterwm, bind a key in order to launch a program or to show it if it was already running?
I asked it in "The dwm thread", and right now I'm doing this.
I don't know if dwm has this feature (built-inf), and after all I don't know if monsterwm has it (built-in). This is why I'm asking the same question here.

No, not currently, but I think that'd be easy to implement. Its 5am here, so I'll get some sleep, and think about it tomorrow. Will probably need to find a generic way to add the option on the config.
This can also be done with `wmctrl` and a bit of bash.

Last edited by c00kiemon5ter (2011-12-29 03:40:09)


.:[ git me! ] :.

Offline

#46 2011-12-29 08:36:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: monsterwm! ~ yet another tiny wm

After using it solidly for the last several days now, there is one feature that would be helpful: sending urgency hints to the status bar.

Otherwise, the wm (given that it is only a week or so old) is extremely impressive. Nice one c00kie!


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#47 2011-12-29 09:53:01

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: monsterwm! ~ yet another tiny wm

Thanks guys, the problem is the old version of monsterwm.
Now works! 

Thanks for the help!


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#48 2011-12-29 11:39:54

metre
Member
Registered: 2011-03-13
Posts: 130

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

No, not currently, but I think that'd be easy to implement. Its 5am here, so I'll get some sleep, and think about it tomorrow. Will probably need to find a generic way to add the option on the config.
This can also be done with `wmctrl` and a bit of bash.

Thank you for your answer, but please don't be in hurry and don't feel obligated to implement that idea: you know, real life and sleep deserve more time than you think big_smile

Offline

#49 2011-12-29 11:59:51

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

Re: monsterwm! ~ yet another tiny wm

Here's some updated shots of my monster. I'm going with a minimal statusbar for now with only what I really need (battery and clock). Less distraction. Great job c00kie!

tYnlxMA    tYnlxMQ

Offline

#50 2011-12-29 15:03:35

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

Re: monsterwm! ~ yet another tiny wm

thank you people for your words big_smile cookies for all!

jasonwryan wrote:

there is one feature that would be helpful: sending urgency hints to the status bar.

done wink

I added one more value in the desktop info output to mark that the desktop has an urgent window. Once the user focuses that window, the urgent mark is gone. I also added a function and a keybind to config.def.h to focus the urgent window on the current desktop; Alt+Backspace.

Here's a shot:
tYnlzcA
an urgent event has been raised on desktop 1 (red), while I'm currently on desktop 3 (pinkish?!).
urgent events are usually raised by chat clients when someone speaks to you, or general notification events that need the user to be notified and have him respond in short time.
an easy test on urxvt, is to set in .Xdefaults:

URxvt.urgentOnBell:true

and then try

echo -e '\a'

edit: fun fact, cloc returns "SUM: 666" tongue

Last edited by c00kiemon5ter (2011-12-29 15:10:25)


.:[ git me! ] :.

Offline

Board footer

Powered by FluxBB