cwm  openbsd 

2021-09-19

cwm tips

Desktop switching

append ~/.cwmrc and restart cwm (Ctrl+Shift+Alt r)

Super + number to switch between numbered desktops, Shift + Super + number to send a window to a desktop of the specific number.

sticky yes

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

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

tiling

Once a desktop has accumulated several windows, they can be tiled. The following will use Super+h and Super+v to tile horizontally and vertically respectively.

bind-key 4-h window-htile
bind-key 4-v window-vtile

The currently selected window will always occupy the top left corner. Only raised windows are affected. Don't expect much functionality out of this feature, as you are still working with a floating window manager. You cannot easily change the position of the tiles.

window switching

cwm offers no bar to keep track of open windows, instead one can get a list of windows with Alt+/. Note that the list comes up empty by default. Either begin typing a name of a window or press Ctrl+A to get a list of all open windows. Windows can also be labeled with Ctrl+Alt+n. Alt+Tab cycles through raised windows on a specific desktop.

Alt+Enter minimizes the focused window. You can raise it by switching to the numbered group (desktop) it is a member of, Alt+/ or left clicking the desktop. Minimized windows begin with &. View desktop/Minimize all/Show all windows

toggle-all

The following line has multiple uses. (Default Ctrl+Alt a).

bind-key 4-d group-toggle-all

Press it once to minimize all windows and show the wallpaper. Press it again to raise all windows from all desktops. Otherwise press it once to hide the current desktop and return to it with Super + number.

src: