2bwm
From upstream:
- A fast floating WM, with the particularity of having 2 borders, written over the XCB library and derived from mcwm written by Michael Cardell. In 2bwm everything is accessible from the keyboard but a pointing device can be used for move, resize and raise/lower.
Installation
Install the 2bwmAUR package. Although the installation process can be automatic, if directly building from the AUR, it is highly recommended to read and edit the config.h file in the source directory.
Starting
Run 2bwm
with xinit.
Using 2bwm
After the launch of 2bwm, a mouse cursor, a background, and a terminal will be the only thing on the screen (as specified in the .xinitrc). To open a terminal, using the default configuration, hit Super+Enter
. Use the terminal as desired, for example to start a program with program_name &
, however it is easier and more convenient to use a menu to launch programs, for instance dmenu or 9menuAUR.
General commands
Super+Ctrl+q
– exit 2bwmSuper+Ctrl+r
– restart 2bwmSuper+w
– start the menuSuper+Enter
– start a terminalSuper+Arrows
(+Shift
) – move the cursor (withShift
fast).
Window controls
Using the Super
key combined with one of the key below on a specific focused window:
q
– close window.Tab
orShift+Tab
– go to the next window in the current workspace window ring.f
– fix a window, making it visible on all workspaces (toggles).a
– make a window unkillable bySuper+q
(toggles).r
– raise or lower (toggles).i
– iconify (or hide) a window from the display.
Move, resize and teleport a window
Using the Super
key combined with one of the key below on a specific focused window:
x
– maximize (toggles).m
– maximize vertically (toggles).Shift+m
– maximize horizontally (toggles).Shift+h
(+Ctrl
) – resize left (withCtrl
slow).Shift+j
(+Ctrl
) – resize down (withCtrl
slow).Shift+k
(+Ctrl
) – resize up (withCtrl
slow).Shift+l
(+Ctrl
) – resize right (withCtrl
slow).Home
– grow keeping aspect.End
– shrink keeping aspect.h
(+Ctrl
) – move left (withCtrl
slow)j
(+Ctrl
) – move down (withCtrl
slow)k
(+Ctrl
) – move up (withCtrl
slow)l
(+Ctrl
) – move right (withCtrl
slow)y
– move to the upper left corner of monitor.u
– move to the upper right corner of monitor.b
– move to the lower left corner of monitor.n
– move to the lower right corner of monitor.g
– move to the center of monitor.Shift+y
/Shift+u
/Shift+b
/Shift+n
– move to the left/right/bottom/top while maxvert/maxhor and half max horizontal/vertical.
Workspaces
0
–9
– go to workspacen
, 0–9.Shift+n
– send to workspacen
.c
orv
– go to next/previous workspace.,
or.
– move window to previous/next monitor.
Mouse controls
By holding the Super
Key, the mouse buttons act as follows:
- Button 1 on a window – move window
- Button 3 on a window – resize window
- Button 3 +
Ctrl
on the desktop – start the menu specified inconfig.h
.
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.
You may change the keyboard mappings from config.h
.
Tips and tricks
Get the current workspace number using a script
The following command yields the current workspace:
$ xprop -root _NET_CURRENT_DESKTOP | sed -e 's/_NET_CURRENT_DESKTOP(CARDINAL) = //'
Easy to remember outer border colours
A simple trick to remember the meaning of the outer border colours would be by setting, for example, "fixed" to blue, "unkillable" to red, and "fixed + unkillable" to purple. The mix of blue and red create purple!
Top left squares
Setting borders[0]
to a negative number will make the outer border turn into a square located in the top-left corner of the full-border. The colours set for the outer borders now stick to the square.