You are not logged in.
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
@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
apply this patch, and you're set
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
@c00kiemon5ter
Awesome, it is working. Thank you!
Offline
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
Offline
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
@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
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
It's been a while but I still haven't gone anywhere from monsterwm 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
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
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
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:
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
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
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
@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
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
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
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
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
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
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
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
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
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
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