CWM

 

CWM setting in FreeBSD

 

 

CWM (Calm Window Manager) is a stackable, lightweight window manager for the X Window System. This window manager was developed primarily as part of the OpenBSD base system, but that has not prevented CWM from being ported to other Unix-like operating systems. Configuring CWM on FreeBSD is similar to other UNIX-BSD systems.

As usual, let us install CWM on FreeBSD, as follows:

 

pkg install cwm

 

or

 

cd /usr/ports/x11-wm/cwm/

 

make install clean

 

 

The installation will go very quickly because this window manager is very light weight. To set it up, we need to create a .cwmrc configuration file in our home directory.

 

 

 

My .cwmrc configuration file looks like this

 

 

# Set default Xft(3) font

fontname "sans-serif:pixelsize=14:bold"

 

# Turn on sticky-group mode

sticky yes

 

# Any entry here is shown in the application menu

command Terminal sakura

command Run.. gmrun

command File pcmanfm

command Firefox firefox

command Chromium chrome

command Leafpad leafpad

command VLC vlc

command SMPlayer smplayer

command OBS obs

command Avidemux avidemux3_qt5

command Audacious audacious

command Audacity audacity

command DeaDBeeF deadbeef

command DSBMixer dsbmixer

command VNC vncviewer

command qBittorrent qbittorrent

command Telegram telegram-desktop

command Gimp gimp

command Blender blender

command Ristretto ristretto

command Bluefish bluefish

command Filezilla filezilla

command DSBMC dsbmc

command OpenoFfice /usr/local/openoffice-4.1.12/openoffice4/program/soffice.bin

command Top "sakura -e glances"

command Calculator xcalc

#command Reboot "shutdown -r now"

#command PowerOFF "shutdown -p now"

 

# Autogroup definitions

autogroup 3 "aterm,XTerm"

autogroup 3 "xterm,XTerm"

 

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

ignore XMMS

ignore xwi

ignore xapm

ignore xclock

 

# Key bindings

# kill window

bind-key 4-w window-delete

bind-key 4-f window-fullscreen

bind-key 4-m window-maximize

# mod + equals = maximize window in vertical direction only

bind-key 4-equal window-vmaximize

# mod + shift + equals = maximize window in horizontal direction only

bind-key 4S-equal window-hmaximize

# mod + H,J,K,L = move window left, down, up, right 10 pixels

bind-key 4-h window-move-left-big

bind-key 4-j window-move-down-big

bind-key 4-k window-move-up-big

bind-key 4-l window-move-right-big

# mod + shift + H,J,K,L = resize window left, down, up, right by 10 pixels

bind-key 4S-h window-resize-left-big

bind-key 4S-j window-resize-down-big

bind-key 4S-k window-resize-up-big

bind-key 4S-l window-resize-right-big

bind-key 4-Return "xterm -e top"

bind-key CS-r "shutdown -r now"

bind-key CS-p "shutdown -p now"

bind-key CS-1 group-only-1

bind-key CS-2 group-only-2

bind-key CS-3 group-only-3

bind-key CS-4 group-only-4

bind-key CA-1 window-movetogroup-1

bind-key CA-2 window-movetogroup-2

bind-key CA-3 window-movetogroup-3

bind-key CA-4 window-movetogroup-4

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

 

 

 

 

You can change it on your own, I configured it for myself, prescribing the applications that I use most often and prescribing the keys for convenience. For more information about the configuration run the command:

 

man cwm

 

 

I used fen to install my desktop wallpaper on FreeBSD and the command

 

pkg install graphics/feh

 

or

 

cd /usr/ports/graphics/feh/

 

make install clean

 

 

Next, you need to put the path to the desktop image in .xinitrc like this

 

 

feh --bg-scale /user/Image/succubus.jpg

 

 

Or just use nitrogen as opposed to fen, which has a graphical interface.

 

 

BSD is very easy and most importantly, fascinating.

Share This Article

Previous Article

April 24, 2022 • 3:44AM

Next Article

May 20, 2022 • 5:47PM

From Our Blog