You are not logged in.

#1351 2013-09-18 20:59:31

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

Re: monsterwm! ~ yet another tiny wm

F34R wrote:

C00kie

how i configure this bar style ?

Well, you can start with these scripts. If you're interested, I created/use this. BUT -- I made it mostly as an exercise for myself, so feel free to send feedback my way if you do set it up, but I won't be offended if you try something a little more conventional from this thread :-).

Scott

Offline

#1352 2013-09-29 22:52:19

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

Re: monsterwm! ~ yet another tiny wm

@c00kiemon5ter
Try to do this:
- open program A on one workspace;
- open program B on the same workspace but make that client float;
- switch back focus to A;
- hold ALT+left click on B to move it (it is floating so let's presume that it's in the way).

If i ALT+Left click on B it will gain focus even tho i disabled "FOLLOW_MOUSE" in config.h. Is there a way to make it not gain focus? In short: is there a way to disable focus gain on inactive clients that we try to move?

It is not a big deal and not really a life saving option but if it's easy to implement, you could add option for it in config.h and make use use if we need it :-)

Offline

#1353 2013-09-30 08:38:18

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

Re: monsterwm! ~ yet another tiny wm

apply this patch, and you're set smile

diff --git a/monsterwm.c b/monsterwm.c
index 8d0b9d9..665fed4 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -59,7 +59,7 @@ typedef struct {
  */
 typedef struct {
     unsigned int mask, button;
-    void (*func)(const Arg *);
+    void (*func)(const Arg *, Window);
     const Arg arg;
 } Button;
 
@@ -86,7 +86,7 @@ static void last_desktop();
 static void move_down();
 static void move_up();
 static void moveresize(const Arg *arg);
-static void mousemotion(const Arg *arg);
+static void mousemotion(const Arg *arg, Window w);
 static void next_win();
 static void prev_win();
 static void quit(const Arg *arg);
@@ -254,8 +254,7 @@ void buttonpress(XEvent *e) {
     for (unsigned int i = 0; i < LENGTH(buttons); i++)
         if (CLEANMASK(buttons[i].mask) == CLEANMASK(e->xbutton.state) &&
             buttons[i].func && buttons[i].button == e->xbutton.button) {
-            if (c && d->curr != c) focus(c, d);
-            buttons[i].func(&(buttons[i].arg));
+            buttons[i].func(&(buttons[i].arg), e->xbutton.window);
         }
 }
 
@@ -748,30 +747,30 @@ void maprequest(XEvent *e) {
  *
  * once a window has been moved or resized, it's marked as floating.
  */
-void mousemotion(const Arg *arg) {
-    Desktop *d = &desktops[currdeskidx];
+void mousemotion(const Arg *arg, Window w) {
+    Desktop *d = NULL; Client *c = NULL;
     XWindowAttributes wa;
     XEvent ev;
 
-    if (!d->curr || !XGetWindowAttributes(dis, d->curr->win, &wa)) return;
+    if (!wintoclient(w, &c, &d) || !XGetWindowAttributes(dis, w, &wa)) return;
 
-    if (arg->i == RESIZE) XWarpPointer(dis, d->curr->win, d->curr->win, 0, 0, 0, 0, --wa.width, --wa.height);
-    int rx, ry, c, xw, yh; unsigned int v; Window w;
-    if (!XQueryPointer(dis, root, &w, &w, &rx, &ry, &c, &c, &v) || w != d->curr->win) return;
+    if (arg->i == RESIZE) XWarpPointer(dis, c->win, c->win, 0, 0, 0, 0, --wa.width, --wa.height);
+    int rx, ry, ch, xw, yh; unsigned int v;
+    if (!XQueryPointer(dis, root, &w, &w, &rx, &ry, &ch, &ch, &v) || w != c->win) return;
 
     if (XGrabPointer(dis, root, False, BUTTONMASK|PointerMotionMask, GrabModeAsync,
                      GrabModeAsync, None, None, CurrentTime) != GrabSuccess) return;
 
-    if (!d->curr->isfloat && !d->curr->istrans) { d->curr->isfloat = True; tile(d); focus(d->curr, d); }
+    if (!c->isfloat && !c->istrans) { c->isfloat = True; tile(d); focus(c, d); }
 
     do {
         XMaskEvent(dis, BUTTONMASK|PointerMotionMask|SubstructureRedirectMask, &ev);
         if (ev.type == MotionNotify) {
             xw = (arg->i == MOVE ? wa.x:wa.width)  + ev.xmotion.x - rx;
             yh = (arg->i == MOVE ? wa.y:wa.height) + ev.xmotion.y - ry;
-            if (arg->i == RESIZE) XResizeWindow(dis, d->curr->win,
+            if (arg->i == RESIZE) XResizeWindow(dis, c->win,
                     xw > MINWSZ ? xw:wa.width, yh > MINWSZ ? yh:wa.height);
-            else if (arg->i == MOVE) XMoveWindow(dis, d->curr->win, xw, yh);
+            else if (arg->i == MOVE) XMoveWindow(dis, c->win, xw, yh);
         } else if (ev.type == ConfigureRequest || ev.type == MapRequest) events[ev.type](&ev);
     } while (ev.type != ButtonRelease);
 

.:[ git me! ] :.

Offline

#1354 2013-09-30 09:42:25

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

Re: monsterwm! ~ yet another tiny wm

@c00kiemon5ter
Awesome, it is working. Thank you!

Offline

#1355 2013-10-15 13:07:44

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

Re: monsterwm! ~ yet another tiny wm

Oh i have another request:
Can you add option into master to use shortcut to center floating client? I know that any float spawned client will be centered but for ones that changed state from tiled to float, this option would be handy. I believe this could be in master smile

Offline

#1356 2013-10-15 14:01:39

Neuromatic
Member
From: Germany
Registered: 2013-05-31
Posts: 65

Re: monsterwm! ~ yet another tiny wm

I tryed to apply the patch, and patch gave me:

 *** Only garbage was found in patch input

The command I've used was:

$ mv patchfile $BUILDDIR/ && cd $BUILDDIR
$ patch -Np1 patchfile monsterwm.c

Did I somthing wrong?


/* No Comment */

Offline

#1357 2013-10-15 14:37:31

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

Re: monsterwm! ~ yet another tiny wm

@Neuromatic
What patch did you tried? If it was the one that cookie left on this page, i used it this way:

patch -p1 monsterwm.c some_patch_name.diff

Offline

#1358 2013-10-20 19:56:10

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

Re: monsterwm! ~ yet another tiny wm

Now, i'm not sure what i discovered but i will report it.

How to produce it:
- Open firefox, go to any site and press CTRL+U (it is showing the source of the site);
- make newly created window float;
- Refocus to main firefox windows while window with source code of site is floatin;
- Try to use any shortcut in main firefox window.

What should happen:
- If i press ALT+Home, i should go to homepage that is set up in firefox.

What happens instead:
- Nothing, window with source is focused even to i shitched focus to main window. That means that i cant use any keyboard shortcuts untill i make window with source code tiled again.


Maybe it has something to do with your latest patch?

Silly question, i asked for this patch and now i'm complaining. Shhh

Last edited by kuraku (2013-10-22 21:48:27)

Offline

#1359 2013-12-04 23:06:18

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

Re: monsterwm! ~ yet another tiny wm

It's been a while but I still haven't gone anywhere from monsterwm smile There are couple of things I need to get to work with xinerama branch. First is this "centerwindow" patch because in some cases it comes more than handy and I can't seem to figure out how to convert it to work with xinerama branch. I tried to ask more information from Cloudef but he didn't seem to remember what had to be changed from the code. Another one is "uselessgaps" patch but it's not necessary at all. I know c00kiemon5ter gave me a patch for uselessgaps to work with xinerama before but the sprunge link is now dead! Happy monstering.

Last edited by Shinryuu (2013-12-04 23:07:37)

Offline

#1360 2013-12-05 07:47:26

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

Re: monsterwm! ~ yet another tiny wm

I can redo the patches and probably better save those in a gist. But that'll take some time.
I'm heading to work in a bit and I'll be back in about ~10hrs.


.:[ git me! ] :.

Offline

#1361 2013-12-05 17:10:32

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

Re: monsterwm! ~ yet another tiny wm

Damn, you are fast to reply on almost everything. As always don't overwork yourself. Well gist might be a better solution for patches etc. and I didn't know sprunge deletes their links.

I've tried several window managers along the way but I always fallback into this one and I'm quite happy Steam and other games are working just fine. I just had to add wmname line into my .xinitrc in order to play Steam games in fullscreen mode.

wmname "LG3D"
exec blaablaa

Offline

#1362 2013-12-15 12:44:46

F34R
Member
From: /dev/loliland
Registered: 2012-02-05
Posts: 245

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:
F34R wrote:

want on display only one torrent running. transmission-remote -l contain the remaning time and torrent name , and i don't know the switch what is show both.

change the torrent status part from the previous post to:

# torrent status
torrent_status="$(transmission-remote -l | awk '$2!="100%"&&$5~/^[[:digit:]]+$/{t=$5" "$6;s=$(11);for(i=12; i<=NF; ++i)s=s" "$i;exit}END{if(s)print t" :: "s}')"
[ -z "$torrent_status" ] && torrent_status="Idle"

I back to mpd and rtorrent . the bar could read the information from rtorrent?

Offline

#1363 2013-12-21 21:09:52

Shipwreck
Member
Registered: 2013-03-27
Posts: 7

Re: monsterwm! ~ yet another tiny wm

Hello Everyone.

I'll have to aplogize if this is addressed somewhere else--if so I may need to work on my ability to use the search feature and Google. Regardless, I'm experiencing a serious issue with screen tearing in effectively every situation while I have the X server running. I'd use a proprietary compositor, but to quote Shinryuu from a while back:

Shinryuu wrote:
bslackr wrote:

This happens both with plain master and with the rectangle branch. Tried with vanilla config.h as well. And you are correct, it is not just urxvt, it has happened in dwb, spacefm, and pavucontrol. It's not just the keyboard either, when I click the windows also are not redrawn until I resize them first.

Are you running compositors such as xcompmgr or compton etc.? That kind of behaviour happens when you have something silly like that enabled.

So not only are compositors suspect to catalyze issues that weren't there in the first place, but also seem to be a clunky and excessive way to solve this issue. However, if this is the case, I fail to see what the preferred method is to avoid screen tearing. Would someone mind pointing me in the right direction?

Some insight on my setup: I have a multihead arrangement using a GTX 680 and the xinerama-master branch merged with monsterwm. For my X server configuration I'm using the defualt xorg.conf.d.

Last edited by Shipwreck (2013-12-21 21:13:10)

Offline

#1364 2014-01-02 00:48:32

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

Re: monsterwm! ~ yet another tiny wm

Is anyone having issues with VirtualBox? When i set client to float, it is moving client to bottom right corner on every window refresh. It is not so much and it is visible only on installing some distro on VM (i use it for that testing) but if it can be fixed then do tell.

Offline

#1365 2014-01-02 16:10:36

F34R
Member
From: /dev/loliland
Registered: 2012-02-05
Posts: 245

Re: monsterwm! ~ yet another tiny wm

kuraku wrote:

Is anyone having issues with VirtualBox? When i set client to float, it is moving client to bottom right corner on every window refresh. It is not so much and it is visible only on installing some distro on VM (i use it for that testing) but if it can be fixed then do tell.

similar thing then i set float and open Virtualbox the opened window jut move a little bit because fresh.

Offline

#1366 2014-01-04 18:37:48

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

Re: monsterwm! ~ yet another tiny wm

@F34R
That is the only way. I will try to recompile monsterwm with VBox set as float so i could track changes that way.

Offline

#1367 2014-01-19 20:52:41

mrawfull
Member
Registered: 2011-11-26
Posts: 25

Re: monsterwm! ~ yet another tiny wm

Fantastic little wm. Couple minor annoyances :

#1 sometimes bar spawns inside the desktop area.
#2 it would be great to apply window title rules also (for example I am starting a game - Enemy Territory in windowed mode, and it does not have a class type it only has title type "Enemy Territory". spawns on the whole desktop and looks plain weird)

Offline

#1368 2014-01-21 01:26:53

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

Re: monsterwm! ~ yet another tiny wm

Hey c00kie...(or anyone else that might know the answer)

Using your scratchpad.sh script to pop-up a scratchpad --

1. I can't figure out how one would enable the hotkey to pull it into the current desktop if it's active in a different desktop. Right now you have to hide it first, then re-open it where you want it. It would be nice to just hit the keyboard shortcut and have it appear on your current desktop. It looks like this might be possible if monsterwm supported the _NET_CURRENT_DESKTOP variable? Or is there another way to accomplish that?

2. If there are multiple windows open in Monocle mode, then the scratchpad is opened, the other windows may change their stacked order, depending which one is on top. Can the scratchpad (or any other floating window) be opened without affecting the current top Monocle mode window?

Thanks!
Scott

Offline

#1369 2014-02-12 20:21:49

GE
Member
Registered: 2014-01-04
Posts: 41

Re: monsterwm! ~ yet another tiny wm

I am trying to patch monsterwm with uselessgaps, centerwindow and monocleborders, but merge fails.

[user@arch TEMP]$ git clone https://github.com/c00kiemon5ter/monsterwm.git
Cloning into 'monsterwm'...
remote: Reusing existing pack: 1712, done.
remote: Total 1712 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1712/1712), 424.69 KiB | 318.00 KiB/s, done.
Resolving deltas: 100% (910/910), done.
Checking connectivity... done.
[user@arch TEMP]$ cd monsterwm/
[user@arch monsterwm]$ git checkout uselessgaps
Branch uselessgaps set up to track remote branch uselessgaps from origin.
Switched to a new branch 'uselessgaps'
[user@arch monsterwm]$ git checkout centerwindow
Branch centerwindow set up to track remote branch centerwindow from origin.
Switched to a new branch 'centerwindow'
[user@arch monsterwm]$ git checkout monocleborders
Branch monocleborders set up to track remote branch monocleborders from origin.
Switched to a new branch 'monocleborders'
[user@arch monsterwm]$ git merge -m merge uselessgaps centerwindow monocleborders
Trying simple merge with uselessgaps
Simple merge did not work, trying automatic merge.
Auto-merging monsterwm.c
ERROR: content conflict in monsterwm.c
fatal: merge program failed
Automated merge did not work.
Should not be doing an Octopus.
Merge with strategy octopus failed.

Without monocleborders it kind of works.

[user@arch monsterwm]$ git merge -m merge uselessgaps centerwindow
Auto-merging monsterwm.c
Auto-merging config.def.h
Merge made by the 'recursive' strategy.
 config.def.h |  1 +
 monsterwm.c  | 25 +++++++++++++++----------
 2 files changed, 16 insertions(+), 10 deletions(-)

Is there any way to fix this?


• WM: Openbox
• Resolution: 1366x768
• CPU: CPU: Intel Pentium CPU B980 @ 2.4GHz
• RAM: 2931MB

Offline

#1370 2014-03-28 11:10:52

Knakis
Member
Registered: 2014-03-28
Posts: 1

Re: monsterwm! ~ yet another tiny wm

Merge « Monocleborders » and « uselessgaps » and use this patch (sorry, I don't create something clean):

--- Monster/monsterwm.c	2014-03-28 12:03:12.899943110 +0100
+++ monsterwm.c	2014-03-28 11:57:28.308948098 +0100
@@ -778,11 +778,7 @@
  */
 void monocle(int x, int y, int w, int h, const Desktop *d) {
     for (Client *c = d->head; c; c = c->next) if (!ISFFT(c))
-<<<<<<< HEAD
-        XMoveResizeWindow(dis, c->win, x, y, w - 2*BORDER_WIDTH, h - 2*BORDER_WIDTH);
-=======
-        XMoveResizeWindow(dis, c->win, x + USELESSGAP, y + USELESSGAP, w - 2*USELESSGAP, h - 2*USELESSGAP);
->>>>>>> origin/uselessgaps
+        XMoveResizeWindow(dis, c->win, x + USELESSGAP, y + USELESSGAP, w - 2*BORDER_WIDTH - 2*USELESSGAP, h - 2*BORDER_WIDTH - 2*USELESSGAP);
 }
 
 /**

Offline

#1371 2014-04-17 09:00:02

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: monsterwm! ~ yet another tiny wm

Decided to give Monsterwm a try
As usual with wm's that dont supply their own bar I am not having trouble with monsterwm but with getting a bar
(some_sorta_bar) to work with it.
I am just using the script that monster put up on git
trouble is when I run it I got the message that I didn't have terminus mod font
So I intalled that from aur as well as
stlarch_font and stlarch_icons
but now get

:: SSB :: Font '-*-terminusmod.icons-medium-r-*-*-12-*-*-*-*-*-*-*,-*-stlarch-medium-r-*-*-12-*-*-*-*-*-*-*' Not Found
:: SSB :: Trying Font 'Fixed'

Why use a font that folks won't have on their system? 
wouldn't it better to include a bar that works by default with monsterwm so folks wont have to fiddle abt trying to get one to work - there could be an easy way to switch it off if you didn't want a bar - I dont know why anyone would not want a bar unless they have a massive brain and can remember what apps are open on what workspace etc all in their head?!
Anyway any advice on another font to try with some_sorta_bar or where to get the right teminus font for it as the one I installed from aur must be the wrong one.

Last edited by chickenPie4tea (2014-04-17 11:46:05)


You can like linux without becoming a fanatic!

Offline

#1372 2014-04-17 20:29:49

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

Re: monsterwm! ~ yet another tiny wm

At the top of the some_sorta_bar.c file are the defines(including font) an end user should edit before compiling. It's mentioned in the github Readme.
Here's the font wiki link which should help you install and use any font.

Being an Archlinux user you are expected to be able to set up the configuration for an app you choose to use, not have a rant because you did no reading or research....

Best of luck with monsterwm.


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

Offline

#1373 2014-04-26 16:22:04

theGunslinger
Member
Registered: 2011-05-20
Posts: 300

Re: monsterwm! ~ yet another tiny wm

Hello everyone, just got a laptop and wanted to put monsterwm on it but my config.h which used to work ( 6 months ago though ) now spews out errors after make. So if anyone could check it out and find what's wrong with it would help me out a lot.

Here's the config.h http://pastebin.com/XaFnqtqw, I've merged initlayouts, fibonacci and uselessgaps succesfully and make works with config.def.h. The errors seem to point to lines 129-135 ( DESKTOPCHANGE section) and referencing line 50 out of monsterwm.c but with my weak ass C-fu doesn't allow me to figure out anything useful from it.

Offline

#1374 2014-04-28 07:10:54

krax
Member
From: Tory;Mi
Registered: 2010-06-26
Posts: 62
Website

Re: monsterwm! ~ yet another tiny wm

Hello;
I hope there is the place ( the screenshot thread was dead somehow)
Basically I am looking for the config file of this screenshot

http://ubuntuone.com/4RHQwjXU2gJ88sQpPh6RoZ
thanks




-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Offline

#1375 2014-05-07 10:06:39

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: monsterwm! ~ yet another tiny wm

moetunes wrote:

At the top of the some_sorta_bar.c file are the defines(including font) an end user should edit before compiling. It's mentioned in the github Readme.
Here's the font wiki link which should help you install and use any font.

Being an Archlinux user you are expected to be able to set up the configuration for an app you choose to use, not have a rant because you did no reading or research....

Best of luck with monsterwm.

yes I did read the some_sorta_bar.c file and thought I had installed the right fonts.
yes guilty as charged on the rant charge. bspwm caused me a lot of hassle getting a panel set up so I tried Monster but was still having trouble - too many window manager experiments pushed me over the egde smile
I do like to try out wm's now and then but my default is Snapwm
It comes with a good working panel, I dont have to rebuld every time I change a keybinding or apperance. It's snappy.


You can like linux without becoming a fanatic!

Offline

Board footer

Powered by FluxBB