.TH mcwm 1 "Nov 07, 2011" "" "" .SH NAME mcwm \- MC's Window Manager for X11. .SH SYNOPSIS .B mcwm [ .B \-b ] width [ .B \-i ] [ .B \-t .I terminal-program ] [ .B \-f .I colour ] [ .B \-u .I colour ] [ .B \-x .I colour ] .SH DESCRIPTION .B mcwm\fP is a window manager for the X Window System. .SH OPTIONS .PP \-b width sets border width to this many pixels. .PP \-i turns on icons/hidden windows. .B Please note that there is no way from mcwm to get a hidden window back! You have to use an external program such as a dock or the 9icon script (see below) to get the window mapped again. .PP \-t urxvt will start urxvt when MODKEY + Return is pressed. Change to your prefered terminal program or something else entirely. .PP \-f colour sets border colour for focused window to a named colour, such as "red". .PP \-u colour sets border colour for unfocused windows. .PP \-x colour sets border colour for fixed windows, that is, windows that are visible on all workspaces. .SH USE Nota bene: For mcwm to be at all useful you need to know how what keys generate the Mod1 and Mod4 modifier masks (default). If you don't know, use .B xmodmap(1) with the \-pm option to list them. If you don't want to use Mod1 and Mod4, you can change the modifiers in the file config.h and recompile. With the the default configuration, use mcwm like this. .PP Mod1 + mouse buttons: .RS .IP \(bu 2 .B 1 move .IP \(bu 2 .B 2 raise or lower .IP \(bu 2 .B 3 resize window .RE .PP Note that the mouse cursor needs to be inside the window you want to move, raise/lower or resize even if it currently has the focus. This is a feature, not a bug. .PP Mod4 + key: .RS .IP \(bu 2 .B r raise or lower (toggles) .IP \(bu 2 .B x maximize (toggles) .IP \(bu 2 .B m maximize vertically (toggles) .IP \(bu 2 .B h move left .IP \(bu 2 .B j move down .IP \(bu 2 .B k move up .IP \(bu 2 .B l move right .IP \(bu 2 .B H resize left .IP \(bu 2 .B J resize down .IP \(bu 2 .B K resize up .IP \(bu 2 .B L resize right .IP \(bu 2 .B Return start terminal .IP \(bu 2 .B Tab go to next window in the current workspace window ring. If you release MODKEY or press another command key mcwm will change focus to the new window. A new press of MODKEY + Tab will bring you back to the window where you last had focus. .IP \(bu 2 .B f fix window so it is visible on all workspaces. Toggles. Press again to unfix window. Also used to move windows between workspaces: First fix the window, change to the workspace you want, then unfix the window on the new workspace. .IP \(bu 2 .B y move to upper left corner of physical screen. .IP \(bu 2 .B u move to upper right corner of physical screen.. .IP \(bu 2 .B b move to lower left corner of physical screen.. .IP \(bu 2 .B n move to lower right corner of physical screen.. .IP \(bu 2 .B 0\-9 go to workspace n, 0-9. .IP \(bu 2 .B End close focused window. .IP \(bu 2 .B , move window to previous physical screen. .IP \(bu 2 .B . move window to next physical screen. .RE .PP Note that all functions activated from the keyboard work on the currently focused window regardless of the position of the mouse cursor. Of course, changing workspaces has nothing to do with the focused window. .PP If you don't like the default key bindings, border width, et cetera, look in the config.h file, change and recompile. In the config.h file you can also define mouse button actions on the root window. By default button 3 starts the command mcmenu. You can write your own mcmenu by using, for instance, 9menu, dmenu or ratmenu. .PP .SH STARTING Typically the window manager is started from a script, either run by .B startx(1) or a login manager such as .B xdm(1). .PP If you start from the console, you need an .xinitrc file. Here's a complete example: .sp .in +4 .nf \&#! /bin/sh # Set nice background. xsetroot -solid grey20 # Set nice pointer cursor. xsetroot \-cursor_name plus \-fg white \-bg black # Load resources. xrdb \-load ~/.Xresources # Start window manager in the background. If it dies, X still lives. mcwm & # Start a terminal in the foreground. If this dies, X dies. exec urxvt .fi .in -4 .sp .PP You may also want to define an mcmenu program for use with mcwm. Here's a complete example using the 9menu program: .sp .in +4 .nf \&#! /bin/sh exec 9menu -bg black -fg white \\ -popup \\ 'cpu:urxvt -e ssh cpu.example.org' \\ ':' \\ 'VGA On: xrandr --output VGA --on' \\ 'VGA Off: xrandr --output VGA --off' \\ 'VGA Above: xrandr --output VGA --auto --above LVDS' \\ ':' \\ 'HHKB: xkbcomp -I$HOME/conf/xkb $HOME/conf/xkb/hhkb.xkb $DISPLAY' \\ 'Thinkpad: xmodmap /home/mc/lib/xmodmap/thinkpad-x60.xmodmap' \\ ':' \\ 'close:' .fi .in -4 .sp .PP Christian Neukirchen wrote a little script you can use to get iconified windows mapped again. It relies on xwininfo and xdotool and GNU xargs. .sp .in +4 .nf \&#! /bin/sh # 9icon - show 9menu of iconified windows for unmapping IFS=" " for win in $(xwininfo -root -children | awk '$1~/0x/ && $2~/"/ {print $1}'); do xprop -id $win WM_NAME WM_STATE | awk -F'"' -v win=$win ' /^WM_NAME/ { name=$2 } /window state: Iconic/ { print name ":xdotool windowmap " win " windowraise " win } ' done | xargs -r -d'\\n' \\ 9menu -popup -label 9icon -bg grey20 -fg grey80 -font fixed .fi .in -4 .sp .SH AUTHOR Michael Cardell Widerkrantz .