💾 Archived View for tsqrl.xyz › cwm.gmi captured on 2022-04-28 at 17:45:00. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
oh no! what happened to all the bullshit?
cwm is not a tiling window manager, but you can configure it to act like one. Though I have a few keyboard shortcuts for moving/snapping windows, I primarily rely on a 3 button mouse for movement and resizing, augmented with keybindings.
There are only a few things that cwm can do, making it easy to configure. (On OpenBSD, the cwmrc man page is extremely helpful and contains a complete example.)
My favorite feature (which is available in other, more traditional window managers and desktop environments) is moving and resizing a window without having to click a drag/resize handle.
That is, while holding down the "Super" key (that's the Win key or the Cmd key on other operation systems), I can:
And my cursor can be anywhere inside the window.
More about using the 3 Button Mouse here.
My .cwmrc is as follows (apologies for the inconsistent comment column):
sticky yes snapdist 10 moveamount 15 # Override built-in term command command term "xterm +vb +sb -fn 9x15 -bg black -fg white -geometry 71x30 tmux" # termbar is the window label for the shell-based status bar ignore termbar autogroup 0 termbar gap 16 0 0 0 # Inspired by (lifted from and modifed) # https://git.causal.agency/src/tree/home/.config/cwm/cwmrc borderwidth 2 color inactiveborder rgb:4C/46/35 color activeborder rgb:99/8D/6B color urgencyborder rgb:A3/77/20 color menubg rgb:14/13/0E color menufg rgb:B7/A9/80 color font rgb:B7/A9/80 color selfont rgb:14/13/0E # Reset everything unbind-key all unbind-mouse all ######################## General ############################## bind-key 4S-Return terminal # Spawn a new terminal bind-key C4-Delete lock # Lock the screen bind-key 4-Return window-hide # Hide the current window bind-key 4-Down window-lower # Lower current window bind-key 4-Up window-raise # Raise current window bind-key 4-slash menu-window # Search for windows bind-key C4-n window-menu-label # Label current window bind-key M-Tab window-cycle # Window switching bind-key MS-Tab window-rcycle bind-key C4-x window-close # Close current window bind-key 4-s menu-window # Show list of currently defined windows bind-key 4-space menu-exec # Spawn exec program dialog bind-key C4S-r restart # Restart bind-key C4S-q quit # Quit bind-mouse "1" menu-window-hidden # Show list of currently hidden windows bind-mouse "2" menu-group # Show list of currently defined groups bind-mouse "3" menu-cmd # Show list of applications as defined in config ######################## Groups ############################## # toggle group visibility bind-key 4-1 group-only-1 bind-key 4-2 group-only-2 bind-key 4-3 group-only-3 bind-key 4-4 group-only-4 bind-key 4-5 group-only-5 bind-key 4-6 group-only-6 bind-key 4-7 group-only-7 bind-key 4-8 group-only-8 bind-key 4-9 group-only-9 # move windows to specific bind-key 4S-1 window-movetogroup-1 bind-key 4S-2 window-movetogroup-2 bind-key 4S-3 window-movetogroup-3 bind-key 4S-4 window-movetogroup-4 bind-key 4S-5 window-movetogroup-5 bind-key 4S-6 window-movetogroup-6 bind-key 4S-7 window-movetogroup-7 bind-key 4S-8 window-movetogroup-8 bind-key 4S-9 window-movetogroup-9 # Switch to group bind-key C4-1 group-toggle-1 # Toggle visibility of group n bind-key C4-2 group-toggle-2 # where n is 1-9 bind-key C4-3 group-toggle-3 bind-key C4-4 group-toggle-4 bind-key C4-5 group-toggle-5 bind-key C4-6 group-toggle-6 bind-key C4-7 group-toggle-7 bind-key C4-8 group-toggle-8 bind-key C4-9 group-toggle-9 # Show all bind-key C4-a group-toggle-all # Toggle visibility of all gruops bind-key C4-0 group-toggle-all # Put window in current group bind-key C4-g window-group # Toggle group membership of current window # Show window on all groups bind-key C4-s window-stick # Toggle stickiness of current window # Cycle through groups bind-key C4-Right group-cycle bind-key C4-Left group-rcycle ######################## Window manipulation: mouse ############################## bind-mouse 4-1 window-move # Move current window bind-mouse 4-2 window-resize # Resize current window bind-mouse 4-3 window-lower # Lower current window ######################## Window manipulation: keyboard ############################## # Snapping bind-key 4S-Up window-snap-up bind-key 4S-Down window-snap-down bind-key 4S-Right window-snap-right bind-key 4S-Left window-snap-left # Horizontal and vertical maximize bind-key C4-f window-fullscreen # Toggle full-screen mode of current window bind-key C4-m window-maximize # Toggle maximization of current window bind-key C4-equal window-vmaximize # Toggle vertical maximization of current window bind-key C4S-equal window-hmaximize #Toggle horizontal maximization of current window # Movement bind-key 4-h window-move-left # Move window by a small amount bind-key 4-j window-move-down bind-key 4-k window-move-up bind-key 4-l window-move-right bind-key 4S-h window-move-left-big # Move window by a large amount bind-key 4S-j window-move-down-big bind-key 4S-k window-move-up-big bind-key 4S-l window-move-right-big # Resizing bind-key C4-h window-resize-left # Resize window by a small amount bind-key C4-j window-resize-down bind-key C4-k window-resize-up bind-key C4-l window-resize-right bind-key C4S-h window-resize-left-big #Resize window by a large amount bind-key C4S-j window-resize-down-big bind-key C4S-k window-resize-up-big bind-key C4S-l window-resize-right-big