You are not logged in.

#1101 2012-11-04 13:15:01

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

Re: monsterwm! ~ yet another tiny wm

I'm not too experience with git, what do I have to do to merge xinerama-init with centerwindows, fibonacci, and windowtitles?

Offline

#1102 2012-11-04 13:48:27

kuraku
Member
From: planet Earth
Registered: 2012-01-03
Posts: 199

Re: monsterwm! ~ yet another tiny wm

@cookie
Thank you for your time and answers. We look forward to new wm smile

Offline

#1103 2012-11-05 15:41:37

Vixus
Member
Registered: 2012-11-02
Posts: 60

Re: monsterwm! ~ yet another tiny wm

So I've been trying out monsterwm and it's been working out great so far. Yesterday I tried setting up a panel and had it all working until I tried to restart my computer.

Basically I followed the techniques other have used here, having monsterwm send output to a named pipe and then reading that into a python script. But after a reboot the python script got stuck on reading the named pipe (tail -n1 /tmp/monsterwm.fifo) and when I tried reading from the pipe myself there was no output.

Then I stopped the bar script from running on startup and just had monsterwm output to the named pipe. But now monsterwm just hangs and doesn't do anything. I can switch to another terminal and run cat to maybe get a line or two from the named pipe but there is no activity.

Now monsterwm only functions when I'm not piping the ouput anywhere. What could be happening?

Session script (run from .xinitrc, $1=monsterwm): https://github.com/vixus0/arch-configs/ … er/session
Bar script: https://github.com/vixus0/arch-configs/ … er/bard.py

Any ideas? I've probably fundamentally misunderstood named pipes...

Edit: Yup, fixed......

Last edited by Vixus (2012-11-05 23:35:27)

Offline

#1104 2012-11-07 03:36:04

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

Re: monsterwm! ~ yet another tiny wm

I just noticed dwm added xft support to the dev-version without compile-flags to disable it, and which adds 1mb to the memory-usage(ps_mem.py), no matter if not using xft fonts...

Yeah, of course 1mb is nothing, but still, it's nice to be using a wm which controls windows and not fonts etc. smile

Sorry for somewhat off-topic maybe...

Offline

#1105 2012-11-07 12:23:49

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

Re: monsterwm! ~ yet another tiny wm

Hi cookie,
I have read around two times your big post about the new WM. Actually this is interesting and I like talking about it, with you.

About keyboard management, I understand your philosophy (seems similar to UNIX with "Make each program do one thing well") but in this case, it has a drawback: the dependencies.
I liked monsterwm idea which don't include bar. It was still easy to find something light as monsterwm.
Now, if I wanna use your upcoming WM, I'll need bar (from lemonbar for example) + xbindkeys + your WM.
I wanna be clear, I'm not criticizing anything, I respect your work. Anyway, don't you think it will need too many dependencies? I like to install a program without a tons of dependencies.

Apparently, you wanna include 16 tags without the option for deleting unused tags. For me, it was a drawback on scrotwm (formelly known as spectrwm now). I was just using 6 or 7 desktops and 3 desks were doing nothing.
I wanna have only what I use, nothing more. It's simplicity smile
Adding or deleting tags isn't necessary, but I think 10 or 12 tags would be enough, huh? I don't think many persons will use the 16 tags.

You talked about SLOC too. I don't have any problems with it. I know dwm has 2000 SLOC and bspwm 2500 SLOC. 1800 is still light and I trust you for writing clean code.

@mhertz: You're right. I agree. I'll ask a flag for turning off xft, on the mailing list.


Github -- My terminal font Envypn

Offline

#1106 2012-11-07 16:54:48

kuraku
Member
From: planet Earth
Registered: 2012-01-03
Posts: 199

Re: monsterwm! ~ yet another tiny wm

mhertz wrote:

I just noticed dwm added xft support to the dev-version without compile-flags to disable it, and which adds 1mb to the memory-usage(ps_mem.py), no matter if not using xft fonts...

Yeah, of course 1mb is nothing, but still, it's nice to be using a wm which controls windows and not fonts etc. smile

Sorry for somewhat off-topic maybe...

Jeezas, 1MB for nothing.

Offline

#1107 2012-11-07 21:07:49

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

Re: monsterwm! ~ yet another tiny wm

hi all, there was a power failure here and my psu its dead sad so, I'm without a computer until I get a new one.

bslackr wrote:

I'm not too experience with git, what do I have to do to merge xinerama-init with centerwindows, fibonacci, and windowtitles?

this will need some manual intervention
but I have nowhere to try the code atm.

@ypnose,
thanks for sharing your thoughts.
I'm not set on anything yet, it's all being worked out. I do understand your concerns about the dependencies. I will get back to the new wm topic, once I fix my pc.


.:[ git me! ] :.

Offline

#1108 2012-11-07 21:17:34

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

Re: monsterwm! ~ yet another tiny wm

If you decide to change your PSU, Antec, Seasonic and Corsair are generally good products smile


Github -- My terminal font Envypn

Offline

#1109 2012-11-08 16:00:27

kuraku
Member
From: planet Earth
Registered: 2012-01-03
Posts: 199

Re: monsterwm! ~ yet another tiny wm

@cookie
It is not bad, if you can, to buy one surge protect power cord device (basically, it is power cord with arrester). It is a good thing and it is very cheap now (about 17e are the APC ones). WIth that, you can use almost all regular (read: chinese c**p psu). Just my 2c on that.

p.s. ups devices are more advanced things but there are many of them and some of them are toxic (like mine that is filled with zinc (it is Pb so i`m not sure how do you say that in english properly)). Good ones are over 80e per device.

[/offtopic]

Last edited by kuraku (2012-11-08 16:02:14)

Offline

#1110 2012-11-12 01:53:35

knowayhack
Member
From: UK
Registered: 2012-04-05
Posts: 22

Re: monsterwm! ~ yet another tiny wm

Hi there, I'm rather new to Arch, window managers and tbh, Linux and tech in general, but have dove in at the deep end and spent the last few months messing about with Arch, Awesome & dwm. The documentation has been so great, this is the first time, I've been stumped for long enough to ask for help! :-)
I recently decided to give Monster a go and absolutely love it :-) It's faster than dwm with almost all the features of Awesome that I most enjoyed....almost...

A couple of things I'd really like to get working that I really loved in Awesome (but am not willing to pay for in the extra resources Awesome uses - I'm trying to optimise old hardware).
Firstly - the run or raise feature, whereby a new instance of an app is only raised if one is not already running, if it is, it is switched to instead. Looking through this thread, this was almost implemented early on, at another user's request, in the form of the "fetch" branch, but it seems that was dropped a couple of pages later....  I've actually managed to get this super useful feature working using a couple of xdotool/lsw based bash scripts, but would love it if it was actually baked into the window manager so to speak, but obviously if it's as complicated a feature as it seems to be, no worries.

Secondly, is something that I'm sure is easy to add, in fact it seems that it's already been done - as the below quote suggests. It is the function to cycle through the various window modes using a key combo (generally some Mod + space combo)

c00kiemon5ter wrote:

thnx for CLICK_TO_FOCUS feedback smile

next_mode cycles the layouts. that isn't implemented, so you're not reinventing the wheel wink
you can do it though more easily as:

static void cyclemodes(const Arg *arg) {
	switch_mode(&(Arg){.i = (MODES + mode + arg->i) % MODES});
}

so now you have

{ MOD1,    XK_n,     cyclemodes,       {.i = +1}},  /* next layout */
{ MOD1,    XK_p,     cyclemodes,       {.i = -1}},  /* prev layout */

However, having no programming experience/knowledge (although I'd love to learn), I simply cannot get this to work :-(  I've been assuming that the static void bit needs to go in the monsterwm.c file. But where?? I've tried it in multiple places, but the build always fails with this msg:

monsterwm.c: In function ‘cyclemodes’:
monsterwm.c:1183:42: error: ‘mode’ undeclared (first use in this function)
monsterwm.c:1183:42: note: each undeclared identifier is reported only once for each function it appears in

Then, obviously the key-binding needs to be declared in the config.h. I would greatly appreciate if anyone could point me in the right direction, as I've been right the way through this thread, googled till i'm blue in the face, but alas - to no avail! I would really like to be able to able to cycle/toggle modes so I can free up some keybindings for other things...

Anyway dude, cheers c00kiemon5ter for your amazing work on this fantastic WM, even if I can't get the above things perfect, i'll still be sticking around, as it suits my needs in so many other ways.

Oh, and sorry to hear about your HW issues, hope you get them sorted soon.

Last edited by knowayhack (2012-11-12 02:40:34)


There is no truth. There is no reality. There is no consistency. There are no absolute statements. I am very probably wrong.

Offline

#1111 2012-11-12 03:47:17

kuraku
Member
From: planet Earth
Registered: 2012-01-03
Posts: 199

Re: monsterwm! ~ yet another tiny wm

knowayhack wrote:

Firstly - the run or raise feature, whereby a new instance of an app is only raised if one is not already running, if it is, it is switched to instead. Looking through this thread, this was almost implemented early on, at another user's request, in the form of the "fetch" branch, but it seems that was dropped a couple of pages later....  I've actually managed to get this super useful feature working using a couple of xdotool/lsw based bash scripts, but would love it if it was actually baked into the window manager so to speak, but obviously if it's as complicated a feature as it seems to be, no worries.

There is a way to use that awesome trick in monsterwm.

Add something like this to your config.h for monsterwm:

static const char *web_browser[]  = { "run_once.sh", "firefox",         NULL };

Then you use it like in this example:

static Key keys[] = {
    /* modifier          key            function           argument */
...
    {  MOD1|SHIFT,      XK_w,           spawn,             {.com = web_browser } },
...
};

(where "..." can be anything and it is irrelevant in this case)
You can change name (web_browser) and shortcut (in this case, it is Shift+Alt+w).


run_once.sh content (it can be improved, i left tips in comment):

#!/bin/bash
# ps -A or ps -C (thanks c00kiemon5ter for tip)
# also useful: ps axco pid,command (less output)

if [ -z "$(ps -C "$1"| grep "$1")" ]
    then
      $@
    fi

This way you get option to start only one instance of app if you launch it via keyboard keys. I use it and it is working for months (it also worked in dwm). Monsterwm will not launch program that is already running. However, monsterwm will not focus program if you try to start it even though that program is running.

Last edited by kuraku (2012-11-12 03:52:06)

Offline

#1112 2012-11-12 08:19:26

knowayhack
Member
From: UK
Registered: 2012-04-05
Posts: 22

Re: monsterwm! ~ yet another tiny wm

kuraku wrote:

run_once.sh content (it can be improved, i left tips in comment):

#!/bin/bash
# ps -A or ps -C (thanks c00kiemon5ter for tip)
# also useful: ps axco pid,command (less output)

if [ -z "$(ps -C "$1"| grep "$1")" ]
    then
      $@
    fi

This way you get option to start only one instance of app if you launch it via keyboard keys. I use it and it is working for months (it also worked in dwm). Monsterwm will not launch program that is already running. However, monsterwm will not focus program if you try to start it even though that program is running.

Thanks kuraku for your quick reply smile I've been doing a similar thing using this script for gui apps:

#! /bin/sh
 
if lsw | grep -i "$@"; then
xdotool search --onlyvisible --class "$@" windowactivate
else "$@"
fi

...and this script for my terminal based apps, as the above script doesn't work for terminal bound apps and visa/versa for the graphical ones...

#! /bin/sh
  
wid=$(lsw -l | grep -m 1 "$@" | cut -d ' ' -f 1)
  
if [ -n "$wid" ]; then
 xdotool windowactivate "$wid"
     else
      case "$@" in
         urxvt)
         urxvt;;
         tmux)
         urxvt -e tmux attach;;
         ncmpcpp)
         urxvt -e ncmpcpp;;
         ranger)
         urxvt -e ranger;;
         vim)
         urxvt -e vim;;
         *)
 echo "don't know how to raise '$@'" >&2
exit 1;;
esac
fi 

These work reasonably well, except the set up seems to sometimes get "stuck", and switching via the keyboard short-cuts seems to randomly stop working. I've not been playing with it long enough to work out what the circumstances of this apparent "lock up" are. It usually involves switching between Tmux and Chromium.

However, this does demonstrate that it is possible to focus a running app this way in Monsterwm, but it's apparently quite temperamental....or at least my dodgy brand of cut and paste shell-scripting is more than a wee bit sketchy! wink

I'm afraid your script didn't work for me at all sad I only tried it with my keyboard-bound gui apps - Chromium, SpaceFM & Speedcrunch. However that is undoubtedly due to me not looking carefully enough at it, not knowing enough about scripting, not implementing it correctly to work with my set up and not sleeping for faaaar too long!

Will have another look once I've had some kip, but thanks very much for the input nonetheless smile

Last edited by knowayhack (2012-11-12 08:20:44)


There is no truth. There is no reality. There is no consistency. There are no absolute statements. I am very probably wrong.

Offline

#1113 2012-11-13 19:17:48

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

Re: monsterwm! ~ yet another tiny wm

I had written a script (that might need revising) to select a window using dmenu here

@kuraku you can write your script like

ps -C "$1" || "$@"

@knowayhack
you can too try

cmd="$1"  # then use "$@" for arguments
shift 

pid="$(ps -C "$cmd" -o pid)"
xdotool search --onlyvisible --any --class --classname --name --pid "${pid:--1}" "$cmd" windowactivate && exit

case "$cmd" in
    urxvt)
        urxvt "$@" ;;
    tmux)
        urxvt -e tmux attach ;;
    ncmpcpp)
        urxvt -e ncmpcpp ;;
    ranger)
        urxvt -e ranger ;;
    vim)
         urxvt -e vim ;;
    *)
        "$@" ;;  # run it - it can even be a GUI app of course
esac        

xdotool's windowactivate will focus that window if it's on the current desktop,
but will not switch to it if it's on a different desktop or different screen.
I can change this, so that activating a window will switch to it (screen and desktop) of it is really needed.

I will give it some time and think how "raise" can be implemented and be back on that.



@knowayhack
try this to get layout "cycling" (sounds funny tongue):

static void cyclemodes(const Arg *arg) {
    switch_mode(&(Arg){.i = (MODES + desktops[currdeskidx].mode + arg->i) % MODES});                                                                     
}



@Ypnose @kuraku
I finally opened the psu and located a bad capacitor
got a new one and replaced it and now it's working
total cost: 0,55€   big_smile




@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.

edit: aaargh, forgot to do windowtitles, but I have to go atm

Last edited by c00kiemon5ter (2012-11-13 19:18:25)


.:[ git me! ] :.

Offline

#1114 2012-11-14 12:24:17

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

Re: monsterwm! ~ yet another tiny wm

I'm glad to see you finally solved this with less than one euro!


Github -- My terminal font Envypn

Offline

#1115 2012-11-14 14:35:46

kuraku
Member
From: planet Earth
Registered: 2012-01-03
Posts: 199

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

@kuraku you can write your script like

ps -C "$1" || "$@"

Splendid. I used it like this:

ps -C "$1" || "$@" &

Thank you cookie, now i can use just ps without grep \o/

Offline

#1116 2012-11-15 16:03:38

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

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

I

@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.

edit: aaargh, forgot to do windowtitles, but I have to go atm

Thanks a bunch, working great. windowtitles is purely for aesthetics so it isn't dire. I really appreciate all your work, by the way.

Offline

#1117 2012-11-23 01:54:28

Mactownes
Member
From: The womb
Registered: 2012-08-17
Posts: 22
Website

Re: monsterwm! ~ yet another tiny wm

Hello. I'm not sure if this question has been answered yet or not, but it's fairly simple so I'll ask it anyways.
I clone the monsterwm git and install the "default", that is not changing anything in the config.h. When I try to start it in my .xinitrc with "exec monsterwm", all I get is a black screen which eventually just goes to a completely black screen (monitor off black).

So what I'm asking is this: is there some sort of special configuration I need to do to get a "default setup" working, or some wizardry I need to do in my .xinitrc?

Thanks.

P.s., love monsterwm from what I've seen, and it seems very small and coherent. Nice job.

Offline

#1118 2012-11-23 02:10:22

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

Re: monsterwm! ~ yet another tiny wm

well, monsterwm is a window manager and that's it smile so a "blank screen" is normal.

I do not know what your background is so I'll answer the most common things.
to get a app running you need to edit config.h and fill in the keybinds for your apps
at the very least you want a terminal or a launcher application.

by default 'xterm' is binded to Alt-Shift-Return/Enter
and 'dmenu' is binded to Win-V (I have no idea how I came up with 'v' tbh :-P).
so if you have those installed you're ready to go - iow able to open any app you'd like.

if you want shortcuts/keybinds for specific apps you'll have to edit config.h and add those.

the other common thing people expect to get is a statusbar.
monsterwm does not have one builtin, so you have to use an external one.
some choices are: bar, some_sorta_bar, bipolarbar, mopag and dzen2
some examples on how to get those working are here
you'd need one of those scripts, making it executable, the statusbar of your choice installed and
replacing 'exec monsterwm' in your .xinitrc with 'exec /path/to/script'

so those should give you access to all your apps and provide a statusbar for you.
the readme on github and monsterwm entry on arch wiki provide lots of useful info to get you started.


.:[ git me! ] :.

Offline

#1119 2012-11-23 02:14:10

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

Re: monsterwm! ~ yet another tiny wm

Read the wiki-article about monsterwm, and then come back here if you have any specific questions...

There's no "default setup". You just change config.h to your preferences with regards to keybindings and programs etc. and start additional stuff you want in .xinitrc, like bars and such...

-- Edit --

Too late smile

Last edited by mhertz (2012-11-23 02:16:28)

Offline

#1120 2012-11-26 09:51:44

dmi3y
Member
From: Kiev, Ukraine
Registered: 2012-11-06
Posts: 4

Re: monsterwm! ~ yet another tiny wm

Hi. Thanks for the great tiling manager. I like it's philosophy.
I've noticed one issue though. Swing applications doesn't render properly. Specifically monsterwm has the same issue as described here and here. In short It's not possible to focus on editor in IntelliJ IDEA. Same issue was reproduced in XMonad (the reason why I decided to switch to another tiling WM) but doesn't reproduce in dwm.

% java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

I'm using master branch of monsterwm with centerwindow patch.

I will appreciate if anyone could give a hint on what's the difference in how dwm and monsterwm render Java/Swing applications.
Thanks.

Last edited by dmi3y (2012-11-26 10:16:32)

Offline

#1121 2012-11-26 11:28:15

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: monsterwm! ~ yet another tiny wm

@dmi3y, try installing openjdk6.

@cookie, steam works perfectly on Monster! I can even play in monocle mode. smile

Offline

#1122 2012-11-26 11:33:46

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

Re: monsterwm! ~ yet another tiny wm

You can also try setting the wmname to 'LG3D'. 'wmname' is an app on [community] repo.
so in your .xinitrc place somewhere before starting monsterwm 'wmname "LG3D"'

another thing you should try is 'export _JAVA_AWT_WM_NONREPARENTING=1'
this could also go in your .xinitrc or .login or .bash_profile or .profile etc

Last edited by c00kiemon5ter (2012-11-26 11:37:54)


.:[ git me! ] :.

Offline

#1123 2012-11-27 10:11:39

dmi3y
Member
From: Kiev, Ukraine
Registered: 2012-11-06
Posts: 4

Re: monsterwm! ~ yet another tiny wm

Hi, Cookie.

Unfortunately none of the suggested workarounds helped. Same issue was also reproduced in snapwm. So currently, dwm is the only tiling wm (among dwm, snapwm, monsterwm and xmonad) which doesn't have that issue.  I'd probably stay with dwm but the amount of efforts required to configure dwm makes me sad (on the other hand, that forced me to understand basics of Mercurial and how to create and apply a patchset, thanks to the great tutorial by jasonwryan). Wouldn't it be for that bloody swingy bug I might have stayed with monsterwm. :)

PS: I'll be happy to submit a patch if I ever understand the root of the issue.

Last edited by dmi3y (2012-11-27 10:12:31)

Offline

#1124 2012-11-27 10:42:18

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,469
Website

Re: monsterwm! ~ yet another tiny wm

dmi3y wrote:

I'd probably stay with dwm but the amount of efforts required to configure dwm makes me sad (on the other hand, that forced me to understand basics of Mercurial and how to create and apply a patchset, thanks to the great tutorial by jasonwryan).

OT:

Just use the ABS.

/OT


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

#1125 2012-11-27 11:37:11

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

Re: monsterwm! ~ yet another tiny wm

Hi dmi3y

IntelliJ works here. Here is what I did:

$ pacman -S intellij-idea-community-edition  # I have no java installed so this also got me jre7-openjdk-7

$ sudo vim /etc/profile.d/jre.sh             # uncomment last line to set _JAVA_AWT_WM_NONREPARENTING=1 var
$ cat /etc/profile.d/jre.sh
export J2REDIR=/usr/lib/jvm/java-7-openjdk/jre
export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk/jre}

# enable this for non-reparenting window managers
export _JAVA_AWT_WM_NONREPARENTING=1

$ wmname LG3D

$ JDK_HOME="/usr/lib/jvm/java-7-openjdk/" idea.sh
[..]

and the editor is working.

tZ2d3bQ

Last edited by c00kiemon5ter (2012-11-28 01:46:19)


.:[ git me! ] :.

Offline

Board footer

Powered by FluxBB