You are not logged in.
In my quest to fix the urxvt border issue I came across this bug report which states that this is actually wm causing this.
I am talking about window borders. If a client window is created with an ARGB visual, the X11 server expects pixel values (such as the window border color) to be in a 0xAARRGGBB-format. However, awesome will use XAllocColor() to get pixel values for the default (RGB24) visual. Thus it will set a window border of 0x00RRGGBB. This gets interpreted by the X11 server as a color with alpha==0, thus completely transparent.
So in monsterwm.c I changed:
win_focus = getcolor(FOCUS, screen);
win_focus = getcolor(UNFOCUS, screen);
to this:
win_focus = 0xFF5FB66B;
win_unfocus = 0xFF757575;
Which worked! urxvt windows rendered with the correct colored solid borders but true transparent backgrounds. (so I can do stuff like this mplayer + urxvt = *_*). However, this caused two side effects..
non-urxvt windows render their focused and unfocused borders in a slightly brighter shade now. Here is a picture of what I mean. In the top part of the picture above scrot you see urxvt showing the correct border color, in the bottom part of the picture above "File" and "Emulation" you see the slightly lighter border color that renders in every other program.
The second, more minor issue is that after manually setting the variables attempting to start my compositor before starting monsterwm causes monsterwm to hang, starting it after via dmenu works fine though.
Anyone have any suggestions as to what I should look into to fix this?
Last edited by DoctorSamulus (2012-07-28 19:31:41)
Offline
But.. I also experience the thing that you have to press the button two times when you want to change your layout mode. I'm not sure but I feel there might be an answer for that in this thread. For some reason I feel it's most likely normal to have that behaviour.
Cookie answer this in a previous post. If you have floating clients in a desktop and change the layout then, if the new layout is different from the current (i.e first time) only the stacked clients will change their layout, if it's the same (i.e second time) then all the clients are tilled.
Offline
Thanks prasinoulhs that's what I was after
Offline
In my quest to fix the urxvt border issue I came across this bug report which states that this is actually wm causing this.
I am talking about window borders. If a client window is created with an ARGB visual, the X11 server expects pixel values (such as the window border color) to be in a 0xAARRGGBB-format. However, awesome will use XAllocColor() to get pixel values for the default (RGB24) visual. Thus it will set a window border of 0x00RRGGBB. This gets interpreted by the X11 server as a color with alpha==0, thus completely transparent.
I remember you were having color issues with bar too, can you try using AARRGGBB colors and see if the colors are rendered correctly as it might be related to that issue ?
Offline
DoctorSamulus wrote:In my quest to fix the urxvt border issue I came across this bug report which states that this is actually wm causing this.
I am talking about window borders. If a client window is created with an ARGB visual, the X11 server expects pixel values (such as the window border color) to be in a 0xAARRGGBB-format. However, awesome will use XAllocColor() to get pixel values for the default (RGB24) visual. Thus it will set a window border of 0x00RRGGBB. This gets interpreted by the X11 server as a color with alpha==0, thus completely transparent.
I remember you were having color issues with bar too, can you try using AARRGGBB colors and see if the colors are rendered correctly as it might be related to that issue ?
I changed the color definitons in bar but no luck. I'll keep looking into that problem as well.
Offline
Hey all, having recently taken up monsterwm full time [been with arch for a while doing the wm-rounds], I just wanted to pass on my thanks for this great wm, in particular @c00kiemon5ter - and all others contributing their configs etc as I have probably plagiarised bits from you all .
I am still getting it all sorted out and am certaily appreciating all of your efforts.
Cheers
Offline
put `xterm -geometry 159x25+0+438 -e tmux &` in ~/.xinitrc, monsterwm places the xterm window at wrong position but DWM is normal
This happens in FreeBSD, any ideas?
I got another error on FreeBSD 9.0.
When I do "make" I get this error:
make: dont know how to make cflags. stop
Any ideas how to fix this?
Last edited by kalle97 (2012-07-30 11:04:50)
Offline
^I'm just taking a wild guess here, but try gmake instead of make.
Offline
It worked thank you!
Offline
I've been trying to think of a good way to show open windows on my setup. This seems to work ok. It's just a different way of doing what I was using before (from what I stole from mhertz's script), but instead of showing for each desktop it shows to the right of the layout indicator for the current desktop. It's a little less clutter this way and doesn't move the bar around. It doesn't show anything when there aren't open windows the way I have it. It works good for me because I'm almost always in monocle on my netbook but it would be better if it worked in monocle only (kinda like dwm). It's silly for the other layouts and I really don't need to see how many windows I have on other desktops. I just need to know that there are windows open, and background colors do that for me. Any ideas on how to do it for just monocle? Here's a screenshot:
I'm not sure if it's the right way to do it in my script, but that's all I could come up to get it to do what I wanted.
I edited my grammar and punctuation to make it slightly more understandable (slightly).
Last edited by stlarch (2012-08-02 04:05:07)
Offline
A quick question. I have two displays. One is set to be left-of the other. When I start monsterwm it becomes xinerama but I want seperate screens as I get with dwm so when I start xterm or something it will only fill 1 screen instead of 2. Is this possible? Do I need to configure something?
Offline
A quick question. I have two displays. One is set to be left-of the other. When I start monsterwm it becomes xinerama but I want seperate screens as I get with dwm so when I start xterm or something it will only fill 1 screen instead of 2. Is this possible? Do I need to configure something?
Be sure to use xinerama version of monsterwm. I use xinerama-init version here with my multihead setup. If you use the default monsterwm that kind of behaviour happens
Last edited by Shinryuu (2012-08-02 16:03:18)
Offline
Any ideas on how to do it for just monocle?
That's the first thing I did when I started using monsterwm This works just like dwm...prints the B, F, T and then a total number of windows on that desktop if in Monocle mode. Screenshot link in my sig has a pic of the status bar in Bottom stack mode (B).
Scott
#!/usr/bin/env bash
## Startup script for monsterwm. Pipes window/desktop information to dzen
# First define colors
norm_fg="#909090" # Light Gray
norm_bg="#303030" # Black
sel_fg="#303030" # Black
sel_bg="#909090" # Light Gray
err_fg="#ffffff" # White
err_bg="#ff0000" # Red
icon_path="$HOME/media/pictures/icons"
#font="Inconsolata"
font="-*-terminus-medium-*-*-*-16-*-*-*-*-*-*-*"
: "${wm:="monsterwm"}"
: "${ff:="/tmp/monsterwm.fifo"}"
[[ -p $ff ]] || mkfifo -m 600 "$ff"
while sleep 2; do statusline.sh
done | dzen2 -fg $norm_fg -bg $norm_bg -h 18 -e -p -fn $font -ta r -w 1060 -x 220 &
while read -t 30 -r wmout || true; do
# filter output to only what we want to match and parse
if [[ $wmout =~ ^(([[:digit:]]+:)+[[:digit:]]+ ?)+.*$ ]]; then
read -ra desktops <<< "$wmout" && unset r
for desktop in "${desktops[@]}"; do
# set values for
# d - the desktop id
# w - number of windows in that desktop
# m - tiling layout/mode for that desktop
# c - whether that desktop is the current (1) or not (0)
# u - whether a window in that desktop has an urgent hint set (1) or not (0)
IFS=':' read -r d w m c u <<< "$desktop"
# Set the icon for desktops with windows
ic=" "
((w)) && ic="^i($icon_path/desk.xbm)"
# name each desktop
case $d in
0) d="t " ;;
1) d="n " ;;
2) d="c " ;;
3) d="m " ;;
4) d="g " ;;
5) d="v " ;;
6) d="o " ;;
esac
# we will also display the current desktop's tiling layout/mode
((c)) && fg="$sel_fg" bg="$sel_bg" && case $m in
# name each layout/mode with a symbol
0) i=" [T]" ;;
1) i=" [$w]" ;;
2) i=" [b]" ;;
3) i=" [G]" ;;
4) i=" [F]" ;;
esac || fg="$norm_fg" bg="$norm_bg"
# if the desktop has an urgent hint its color should be err_fg/err_bg
((u)) && fg="$err_fg" bg="$err_bg"
# print the desktop name
r+="^bg($norm_bg)^bg($bg)^fg($fg)$ic$d^fg($norm_fg)^bg($norm_bg)"
done
fi
printf "%s%s\n" "$r" "$i"
done < "$ff" | dzen2 -fg $norm_fg -bg $norm_bg -h 18 -e -p -fn $font -ta l -w 220 &
while :; do "$wm" || break; done | tee -a "$ff"
Last edited by firecat53 (2012-08-03 00:57:13)
Offline
Offline
jfu wrote:A quick question. I have two displays. One is set to be left-of the other. When I start monsterwm it becomes xinerama but I want seperate screens as I get with dwm so when I start xterm or something it will only fill 1 screen instead of 2. Is this possible? Do I need to configure something?
Be sure to use xinerama version of monsterwm. I use xinerama-init version here with my multihead setup. If you use the default monsterwm that kind of behaviour happens
Read more carefully. The user doesn't want Xinerama, but two distinct screens (separate layouts, stausbar, etc.), so xrandr would be more suitable. I'm also wondering about the Xinerama branch: since the external monitor I use with my laptop is mounted to the wall (directly above kwhere my laptop sits), this isn't really an option for me, is it?
Offline
I wonder how did I miss that... thanks for the correction. Well at least I can't seem get seperate X sessions to run with monsterwm. Not really sure if it's possible to build 2 seperate monsterwms and start them with DISPLAY=:0.0 monsterwm and DISPLAY=:0.1 monsterwm2 options.
Offline
That I'm not sure of. Unfortunately, since I use more than one monitor much of the time as separate screens (and again, one is above the other), I don't think the Xinerama branch will work out for me. I still love this WM, though.
Offline
just came back from vacations
I'm having a problem. In monocle mode with 3 or more windows open, when I go to switch windows, it starts flickering and I lose control. It's firefox and two terminals or three terminals. It doesn't happen with two windows. I hacked up my config.h quite a bit and rather quickly, so maybe it's something here on my part. Anybody else experiencing this? Thanks
edit: actually it only happens when I use next_win, which is MOD4+k for me (I have MOD4+j for prev_win). Backwards, I know.
hi, I will look into this
put `xterm -geometry 159x25+0+438 -e tmux &` in ~/.xinitrc, monsterwm places the xterm window at wrong position but DWM is normal
This happens in FreeBSD, any ideas?
and this
Shinryuu wrote:But.. I also experience the thing that you have to press the button two times when you want to change your layout mode. I'm not sure but I feel there might be an answer for that in this thread. For some reason I feel it's most likely normal to have that behaviour.
Cookie answer this in a previous post. If you have floating clients in a desktop and change the layout then, if the new layout is different from the current (i.e first time) only the stacked clients will change their layout, if it's the same (i.e second time) then all the clients are tilled.
yep, follow this.
floating mode makes all windows floating.
when a floating window exists, and the mode is changed, one would like that window to still be floating with the new layout.
to make a floating window tiled again, one has to reselect the layout he wants.
So, combining those, when on floating mode, all windows are floating.
changing mode preserves the floating state of the windows.
to make the windows tiled, one has to reselect the layout.
Last edited by c00kiemon5ter (2012-08-04 18:34:16)
.:[ git me! ] :.
Offline
Hey cOOkie, hope you had a good vacation. Actually I determined that it was FOLLOW_MOUSE that was causing it. I changed that to false and all is good. I actually prefer it this way so it's not a problem at all here. One small thing I have been noticing is that when I'm in monocle and open firefox first and then urxvt, when I download something the popup window causes the focus to change to urxvt temporarily until I remove the popup and then focus gets returned to firefox. (if that makes any sense) It doesn't happen if I open urxvt first and then firefox? It's a very minor inconvience and not really a big deal at all, just something I noticed. That's about the only other thing I've noticed, otherwise everything seems to work great.
@that makes sense too about the floating windows, thank you
Last edited by stlarch (2012-08-04 19:16:01)
Offline
Hi C00kie, I hope you enjoyed your holidays.
In addition to the others things we asked you, could you tell me why I'm unable to bind just ALT + KEY for DESKTOPCHANGE (without using SHIFT).
https://bbs.archlinux.org/viewtopic.php … 3#p1135933
I know I'm becoming kind of boring, but this is last thing I need before testing monsterwm.
Last edited by Ypnose (2012-08-04 19:58:10)
Offline
Your problem is really weird.. I can't really help with you with that but here's config.def.h file I'm using. Never had any problems with keybindings in monsterwm. I wonder if it's possible it's keyboards fault. Do you see any errors?
/* see LICENSE for copyright and license */
#ifndef CONFIG_H
#define CONFIG_H
/** buttons **/
#define MOD1 Mod1Mask /* ALT key */
#define MOD4 Mod4Mask /* Super/Windows key */
#define CONTROL ControlMask /* Control key */
#define SHIFT ShiftMask /* Shift key */
/** generic settings **/
#define MASTER_SIZE 0.56
#define SHOW_PANEL True /* show panel by default on exec */
#define TOP_PANEL True /* False mean panel is on bottom */
#define PANEL_HEIGHT 15 /* 0 for no space for panel, thus no panel */
#define DEFAULT_MODE TILE /* TILE MONOCLE BSTACK GRID */
#define ATTACH_ASIDE True /* False means new window is master */
#define FOLLOW_MOUSE False /* Focus the window the mouse just entered */
#define FOLLOW_WINDOW False /* Follow the window when moved to a different desktop */
#define CLICK_TO_FOCUS False /* Focus an unfocused window when clicked */
#define BORDER_WIDTH 1 /* window border width */
#define FOCUS "#ff950e" /* focused window border color */
#define UNFOCUS "#141414" /* unfocused window border color */
#define DESKTOPS 4 /* number of desktops - edit DESKTOPCHANGE keys to suit */
#define DEFAULT_DESKTOP 0 /* the desktop to focus on exec */
#define MINWSZ 50 /* minimum window size in pixels */
/* open applications to specified desktop with specified mode.
* if desktop is negative, then current is assumed */
static const AppRule rules[] = { \
/* class desktop follow float */
{ "Pidgin", 1, False, True },
{ "Gimp", 2, False, True },
{ "thunar", -1, True, True },
{ "medit", -1, True, True },
{ "dwb", -1, True, True },
{ "mplayer2", -1, True, False },
{ "feh", -1, True, True },
{ "URXvt", -1, True, False },
{ "fbpanel", -1, True, True },
{ "PSX", -1, True, True },
{ "lxappearance", -1, True, True },
{ "Deadbeef", -1, True, True },
{ "nitrogen", -1, True, True },
{ "Snes9x-gtk", -1, True, True },
{ "file-roller", -1, True, True },
{ "7zFM", -1, True, True },
{ "wine", -1, True, True },
{ "winecfg", -1, True, True },
{ "Transmission-gtk", -1, True, True },
};
/* helper for spawning shell commands */
#define SHCMD(cmd) {.com = (const char*[]){"/bin/sh", "-c", cmd, NULL}}
/** commands **/
static const char *menucmd[] = { "dmenu_run", NULL};
static const char *browsercmd[] = { "dwb", NULL };
static const char *filecmd[] = { "thunar", NULL };
static const char *termcmd[] = { "termite", NULL };
static const char *prevcmd[] = { "ncmpcpp", "prev", NULL };
static const char *nextcmd[] = { "ncmpcpp", "next", NULL };
static const char *playcmd[] = { "ncmpcpp", "play", NULL };
static const char *volupcmd[] = { "sh", "/home/shn/bin/dvol", "-i", "2", NULL};
static const char *voldowncmd[] = { "sh", "/home/shn/bin/dvol", "-d", "2", NULL};
static const char *volmutecmd[] = { "sh", "/home/shn/bin/dvol", "-t", NULL};
static const char *suspendcmd[] = { "sudo", "pm-suspend", NULL};
static const char *padoncmd[] = { "synclient", "TouchpadOff=0", NULL};
static const char *padoffcmd[] = { "synclient", "TouchpadOff=1", NULL};
static const char *mymenucmd[] = { "mygtkmenu", "/home/shn/.menu", NULL};
static const char *lolicmd[] = { "lolictrl", NULL};
#define DESKTOPCHANGE(K,N) \
{ MOD1, K, change_desktop, {.i = N}}, \
{ MOD1|ShiftMask, K, client_to_desktop, {.i = N}},
/** Shortcuts **/
static Key keys[] = {
/* modifier key function argument */
{ 0, 0x1008ff11, spawn, {.com = voldowncmd}},
{ 0, 0x1008ff12, spawn, {.com = volmutecmd}},
{ 0, 0x1008ff13, spawn, {.com = volupcmd}},
{ 0, 0x1008ff14, spawn, {.com = playcmd}},
{ 0, 0x1008ff16, spawn, {.com = prevcmd}},
{ 0, 0x1008ff17, spawn, {.com = nextcmd}},
{ CONTROL, XK_Home, spawn, {.com = padoncmd}},
{ CONTROL, XK_End, spawn, {.com = padoffcmd}},
{ MOD1|CONTROL, XK_Delete, spawn, {.com = suspendcmd}},
{ MOD1, XK_p, spawn, {.com = menucmd}},
{ CONTROL, XK_p, spawn, {.com = mymenucmd}},
{ MOD1, XK_1, spawn, {.com = browsercmd}},
{ MOD1, XK_3, spawn, {.com = filecmd}},
{ MOD1|SHIFT, XK_Return, spawn, {.com = termcmd}},
{ CONTROL, XK_d, spawn, {.com = lolicmd}},
{ MOD1, XK_b, togglepanel, {NULL}},
{ MOD1, XK_BackSpace, focusurgent, {NULL}},
{ MOD1|SHIFT, XK_c, killclient, {NULL}},
{ MOD1, XK_j, next_win, {NULL}},
{ MOD1, XK_k, prev_win, {NULL}},
{ MOD1, XK_h, resize_master, {.i = -5}}, /* decrease */
{ MOD1, XK_l, resize_master, {.i = +5}}, /* increase */
{ MOD1, XK_i, resize_stack, {.i = -10}}, /* shrink */
{ MOD1, XK_o, resize_stack, {.i = +10}}, /* grow */
{ MOD1|CONTROL, XK_h, rotate, {.i = -1}},
{ MOD1|CONTROL, XK_l, rotate, {.i = +1}},
{ MOD1|SHIFT, XK_h, rotate_filled, {.i = -1}},
{ MOD1|SHIFT, XK_l, rotate_filled, {.i = +1}},
{ MOD1, XK_Tab, last_desktop, {NULL}},
{ MOD1, XK_m, swap_master, {NULL}},
{ MOD1|SHIFT, XK_j, move_down, {NULL}},
{ MOD1|SHIFT, XK_k, move_up, {NULL}},
{ MOD1|SHIFT, XK_t, switch_mode, {.i = TILE}},
{ MOD1|SHIFT, XK_m, switch_mode, {.i = MONOCLE}},
{ MOD1|SHIFT, XK_b, switch_mode, {.i = BSTACK}},
{ MOD1|SHIFT, XK_g, switch_mode, {.i = GRID}},
{ MOD1|SHIFT, XK_f, switch_mode, {.i = FLOAT}},
{ MOD1|CONTROL, XK_r, quit, {.i = 0}}, /* quit with exit value 0 */
{ MOD1|CONTROL, XK_q, quit, {.i = 1}}, /* quit with exit value 1 */
{ CONTROL, XK_Down, moveresize, {.v = (int []){ 0, 20, 0, 0 }}}, /* move up */
{ CONTROL, XK_Up, moveresize, {.v = (int []){ 0, -20, 0, 0 }}}, /* move down */
{ CONTROL, XK_Right, moveresize, {.v = (int []){ 20, 0, 0, 0 }}}, /* move right */
{ CONTROL, XK_Left, moveresize, {.v = (int []){ -20, 0, 0, 0 }}}, /* move left */
{ CONTROL|SHIFT, XK_Down, moveresize, {.v = (int []){ 0, 0, 0, 20 }}}, /* height grow */
{ CONTROL|SHIFT, XK_Up, moveresize, {.v = (int []){ 0, 0, 0, -20 }}}, /* height shrink */
{ CONTROL|SHIFT, XK_Right, moveresize, {.v = (int []){ 0, 0, 20, 0 }}}, /* width grow */
{ CONTROL|SHIFT, XK_Left, moveresize, {.v = (int []){ 0, 0, -20, 0 }}}, /* width shrink */
DESKTOPCHANGE( XK_F1, 0)
DESKTOPCHANGE( XK_F2, 1)
DESKTOPCHANGE( XK_F3, 2)
DESKTOPCHANGE( XK_F4, 3)
};
static Button buttons[] = {
{ MOD1, Button1, mousemotion, {.i = MOVE}},
{ MOD1, Button3, mousemotion, {.i = RESIZE}},
{ CONTROL, Button3, spawn, {.com = mymenucmd}},
};
#endif
Offline
@Shinryuu: Actually, monsterwm works fine. I can do whatever I want except I cannot switch to desktops, with ALT + these keys (azerty).
If I press ALT + SHIFT + 1or&, it's OK. But If I wanna bind ALT + &, it fails. On dwm, ALT + & (designed by 0x26 in keysymdef.h), it works.
I added this line for a test:
{ MOD1, 0x26, togglepanel, {NULL}},
I can't toggle panel and I don't know why. My keyboard is detected and I don't have any issues.
Offline
hi Ypnose,
if you do `xev | grep keysym` and press the key you want to bind to togglepanel (or any other function you'd like), what does xev return ?
normally, you should just take that keysym and place it where 0x26 is now. My '1' key returns '0x31' ( xev output: ..(keysym 0x31, 1).. )
So using:
{ MOD1, 0x31, togglepanel, {NULL}},
works, toggling the panel with 'Alt + 1' keys.
.:[ git me! ] :.
Offline
Hey cOOkie, hope you had a good vacation. Actually I determined that it was FOLLOW_MOUSE that was causing it. I changed that to false and all is good. I actually prefer it this way so it's not a problem at all here.
yep, I know it's FOLLOW_MOUSE's fault. I should fix it anyway
One small thing I have been noticing is that when I'm in monocle and open firefox first and then urxvt, when I download something the popup window causes the focus to change to urxvt temporarily until I remove the popup and then focus gets returned to firefox. (if that makes any sense) It doesn't happen if I open urxvt first and then firefox?
yep, I'm aware of that, and that happens because of the way the windows are stacked (in monocle mode windows are one behind the other).
I dont really have a workaround for that, only a hacky idea that might fail. I will try it out and if it works I'll post here letting you know.
.:[ git me! ] :.
Offline
Shinryuu wrote:jfu wrote:A quick question. I have two displays. One is set to be left-of the other. When I start monsterwm it becomes xinerama but I want seperate screens as I get with dwm so when I start xterm or something it will only fill 1 screen instead of 2. Is this possible? Do I need to configure something?
Be sure to use xinerama version of monsterwm. I use xinerama-init version here with my multihead setup. If you use the default monsterwm that kind of behaviour happens
Read more carefully. The user doesn't want Xinerama, but two distinct screens (separate layouts, stausbar, etc.), so xrandr would be more suitable. I'm also wondering about the Xinerama branch: since the external monitor I use with my laptop is mounted to the wall (directly above kwhere my laptop sits), this isn't really an option for me, is it?
I want seperate screens as I get with dwm so when I start xterm or something it will only fill 1 screen instead of 2.
jfu actually sounds like he wants the Xinerama brach.
The user doesn't want Xinerama, but two distinct screens (separate layouts, stausbar, etc.)
xinerama branch does that for you, and additionally allows windows to interact and be moved between the two screens.
xinerama works like doubling your desktops and being able to handle each desktop on each monitor separately.
since the external monitor I use with my laptop is mounted to the wall (directly above kwhere my laptop sits), this isn't really an option for me, is it?
xinerama branch should work with any setup and any number of monitors.
xrandr or your xorg.conf are responsible for setting the primary monitor,
the resolution of each monitor, and where each one is placed in relation to the other.
Last edited by c00kiemon5ter (2012-08-05 17:39:33)
.:[ git me! ] :.
Offline