OpenBSD BASED Challenge Day 2

by Root BSD

I'm beginning to really like cwm(1)!

The majority of the time on the laptop today was spent learning cwm(1) or the calm window manager. Just a quick note, the number appended to the base utility represents it classification in the manual system,

1 General commands (tools and utilities). 2 System calls and error numbers. 3 Library functions. 3p perl(1) programmer's reference guide. 4 Device drivers. 5 File formats. 6 Games. 7 Miscellaneous information. 8 System maintenance and operation commands. 9 Kernel internals.

The man page for cwmrc(5) is absolutely fantastic! The calm window manager was definately designed to be K.I.S.S. (keep it simple stupid) in nature. Whenever I try to learn a new window manager I generally go online to find an example configuration file. A example configuration file was included in the cwmrc(5) man page. Using ctrl + v, I copied it into vi(1) and began to edit. vi(1) quickly started to get on my nerves. The modal nature of the program forces me to be slow and constantly think about pressing the correct command, what mode I'm in, and is a little less forgiving to mistakes. So I switched over to mg(1) and I like it much more to be honest. It feels like a good old fashion text editor, like wordstar in MS-DOS. It's actually an emacs clone, so you use emacs keys to control it. I only need the C-x C-x, C-x C-c key combos (save and quit).

Back to the subject of cwm(1). I was able to learn a lot in a short period of time just modifying the example .cwmrc file and having the cwmrc(5) manpage in a vertical tmux(1) pane to the right. Honestly, I don't know how people did work in the terminal before tmux(1) or GNU screen.

Key things learned -

1) Pressing the alt key with M1 (left mouse button) will allow you to move a window with the mouse, the right mouse button will allow you to resize a window.

2) group-only-[n] shows only group n, where n is 1-9, hiding other groups(windows/frames). This is cwm's approach to workspaces basically. Very useful on a laptop where the screen real estate is limited.

3) From what I can tell so far, unless I missed something, cwm(1) is absolutely a manual tiler. The word layout wasn't even in the manpage.

4) cwm(1) doesn't appear to have an exec command (application autostart). Which is disappointing because I always have ratpoison/starfish autostart a terminal + tmux(1) when I login.

My .cwmrc so far, the bold text is just comments, write.as interprets # as markdown headings, so just ignore that.

set default Xft(3) font

fontname “Input Mono:pixelsize=14:bold”

Turn on sticky-group mode

sticky yes

Any entry here is shown in the application menu

command links “links -g https://openbsd.org" command term “xterm -e tmux” command toot “xterm -e toot tui” command calc xcalc

aesthetics

borderwidth 3 color activeborder darkblue

Autogroup definitions

autogroup 3 “aterm,XTerm” autogroup 3 “xterm,XTerm”

Ignore programs by that name by not drawing borders around them.

ignore xcalc ignore xclock

Key bindings

bind-key CM-r restart bind-key 4-Return “xterm -e tmux” bind-key C4-equal window-vmaximize bind-key C4S-equal window-hmaximize bind-key M-1 group-only-1 bind-key M-2 group-only-2 bind-key M-3 group-only-3 bind-key MS-1 window-movetogroup-1 bind-key MS-2 window-movetogroup-2 bind-key MS-3 window-movetogroup-3 unbind-key 4-o unbind-key CM-equal unbind-key CMS-equal

Mouse bindings

bind-mouse M-2 window-lower bind-mouse M-3 window-resize

I love simple, uncomplicated config and this is almost as small as my sdorfehs(ratpoison) config.

Misc things -

1) I added this alias to my .kshrc to make drive identification easier, sysctl hw.disknames just doesn't cut it for me.

alias drives="dmesg | grep '^[ws]d.*[0-9]'"

2) This stops the obnoxious terminal beep, in the ~/.Xdefaults config

xterm*visualBell:true

3) To stop screen tearing when I opened a terminal, or the visual bell flashed, I created this 20-intel.conf file in /etc/X11/xorg.conf.d/

Section "Device" Identifier "Intel Graphics" Driver "intel" Option "TearFree" "true" EndSection

In closing it was a good day. I realize though, I could literally spend the entire month just on ricing cwm(1), and configuring/mastering tmux(1). So I will only go to the extent of helping my workflow and making the system very utilitarian. Tomorrow I will dive into tmux(1) and relearn it from scratch. In the meantime I'm on the hunt for good and interesting reads online as my web browser is html only. I was really enjoying 100 Rabbits website (Rekk and Devine https://100r.co). They are sailing the world together and writing FOSS software which is really cool. I enjoy their outlook on computers, software and life in general; very inspirational! I also found Theo de Raadt's personal website too. He is really into hiking! Well, that's all. Happy hacking in OpenBSD!

My laptop workflow

My laptop workflow.

Rootfetch!

My fetch script called rootfetch