CWM
CWM is an X11 window manager with a focus on getting out of your way so you can be productive. It was originally derived from evilwm, but the codebase has since been re-written from scratch.
Installation
Once you finish installing Archcraft, CWM can be installed on the top of it. It's pre-configured and ready to go. Open a terminal and run the following command to install CWM :
$ sudo pacman -Sy archcraft-cwm
Configuration
CWM is pre-configured in Archcraft. In this section, We'll see how the CWM window manager is configured, what tools and utilities are used to make it look and work like a complete desktop environment.
Config Structure
The configuration structure of CWM in Archcraft looks something like this:
/usr/bin/run-cwm : Autostart programs
~/.cwmrc : main cwm config file
~/.cwm : cwm config directory
├── alacritty : terminal config
├── scripts : scripts used for cwm
├── theme : desktop theme (polybar, rofi configs)
├── dunstrc : dunst config for notifications
├── picom.conf : compositor config
└── xsettingsd : gtk themes, icons and fonts config file
Terminal
Alacritty is the default terminal. In the CWM window manager, alacritty is launched with an alternative config file. If you need to change anything, make sure you modify the config files in ~/.cwm/alacritty
directory. These are the following config files you can modify to change the behaviour of your terminal:
~/.cwm/alacritty/alacritty.toml
: Main configuration file
~/.cwm/alacritty/colors.toml
: Colors configurations
~/.cwm/alacritty/fonts.toml
: Fonts configurations
If you need any help with alacritty config, run :
man 5 alacritty
in terminal.
Notification
Dunst is used as a notification daemon for notifications in CWM. In the CWM window manager, dunst is launched with an alternative config file, which is ~/.cwm/dunstrc
. So, If you need to modify anything, make sure you edit this file.
If you need any help with dunst config, run :
man 5 dunst
in terminal.
Wallpaper
hsetroot sets the wallpaper in the CWM. If you want to change the wallpaper, Edit /usr/bin/run-cwm
script and add the path to your wallpaper :
# Restore wallpaper
hsetroot -cover '/path/to/your/wallpaper'
Statusbar
Polybar is used as the statusbar in Archcraft's CWM window manager.
The configurations for polybar can be found inside the theme directory directory of CWM ~/.cwm/theme
If you want to modify the polybar settings, or perhaps want to add/remove modules, then you need to edit the following files :
~/.cwm/theme/polybar/config.ini
: Main config file
~/.cwm/theme/polybar/colors.ini
: Colors config file
~/.cwm/theme/polybar/modules.ini
: Modules config file
If you need any help with polybar config, visit : polybar wiki
Launchers and Applets
Rofi is used for application launchers, command runner and various applets. To modify the rofi config, edit ~/.config/rofi/config.rasi
file.
If you need any help with rofi config, run :
man rofi
in terminal.
The scripts for rofi that are used in CWM can be found it ~/.cwm/scripts
directory. These are the following scripts that uses rofi to provide the launchers and applets in CWM :
rofi_askpass
: rofi based sudo
frontend to get root password
rofi_asroot
: applet to open apps as root
rofi_bluetooth
: bluetooth applet to quickly connect to BT devices
rofi_launcher
: an application launcher, cmd runner, file manager and task manager
rofi_music
: music applet, that controls MPD with mpc
rofi_powermenu
: power menu, with confirmation dialog
rofi_runner
: quickly lets you run a command
rofi_screenshot
: screenshot applet that works with maim
If you want to modify any applet or perhaps want to extend the functionality of the applet, just edit these scripts above.
The configuration of each script can be found inside the theme directory of CWM ~/.cwm/theme
Let's say you want to modify the looks of launcher, then you need to edit the ~/.cwm/theme/rofi/launcher.rasi
file. Same goes for every other applet, Edit the respective file in the same directory.
If you need any help with rofi theming, run :
man rofi-theme
in terminal.
To change the colors and fonts of the launchers and applets, Edit the ~/.cwm/theme/rofi/shared/colors.rasi
and ~/.cwm/theme/rofi/shared/fonts.rasi
files.
Compositor
Picom is used for compositing. It's a lightweight compositor with shadowing, advanced blurring and fading. In CWM, picom is launched with an alternative config file, which is ~/.cwm/picom.conf
.
If you need to change anything related to picom, Edit this picom config file.
If you need any help with picom config, check the picom's default config file in
/etc/xdg/picom.conf
If you're having screen-tearing issues, using glx
backend can solve this issue.
If you're facing lagging, hangs and freezes, try switching between xrender
and glx
backend.
Window Manager
The configuration of CWM is available in your home directory. To configure CWM window manager, this is the main file that is used :
~/.cwmrc
: main configuration file responsible for determining the behaviour and settings of the overall session. Edit this file to configure keybindings, colors, menu and cwm appearance.
If you need any help with cwm configuration, run :
man cwm
andman cwmrc
in terminal.
Keybindings
Here's a list of some important keybinds you need to know for operating CWM easily. If you want to view, modify or add new keybinds, Edit ~/.cwmrc
file.
Applications
Keys | Action |
---|---|
super + Return | Open terminal (alacritty) |
super + shift + Return | Open fullscreen terminal |
super + F | Open file manager (thunar) |
super + E | Open text editor (geany) |
super + W | Open web browser (firefox) |
Menu and Applets
Keys | Action |
---|---|
super | Open application launcher |
alt + F1 | Open application launcher |
alt + F2 | Open command runner |
super + N | Open network manager applet |
super + B | Open bluetooth applet |
super + M | Open music applet |
super + X | Open powermenu applet |
super + S | Open screenshots applet |
super + R | Open apps as root applet |
alt + ctrl + W | Launch window search menu |
alt + ctrl + A | Launch application search menu |
alt + ctrl + G | Launch group search menu |
Hardware Keys
Keys | Action |
---|---|
Take screenshot | |
alt + Print | Take screenshot in 5 seconds delay |
shift + Print | Take screenshot in 10 seconds delay |
ctrl + Print | Take screenshot of currently focused window |
super + Print | Take screenshot of selected area |
XF86AudioRaiseVolume | Increase volume |
XF86AudioLowerVolume | Decrease volume |
XF86AudioMute | Toggle mute speakers |
XF86AudioMicMute | Toggle mute microphone |
XF86MonBrightnessUp | Increase display brightness |
XF86MonBrightnessDown | Decrease display brightness |
Groups
Keys | Action |
---|---|
super + NUM | Show only group NUM, where NUM is 1-9, hiding other groups |
super + shift + NUM | Hide current window from display and move to group NUM, where NUM is 1-9 |
super + alt + NUM | Toggle visibility of group NUM, where NUM is 1-9 |
super + ctrl + NUM | Close all windows in group NUM, where NUM is 1-9 |
super + shift + B | Show only the previously active group |
super + shift + A | Toggle visibility of all groups |
super + shift + G | Toggle group membership of current window |
ctrl + alt + Right/Left | Forward/Reverse cycle through groups |
Window Management
Keys | Action |
---|---|
super + C/Q | Close focused client |
super + Tab | Forward/Reverse cycle through windows |
alt + Tab | Forward/Reverse cycle through windows in current group |
super + I | Hide current window |
super + T | Freeze current window geometry |
super + shift + R | Label current window |
super + O | Stick current window to all groups |
super + Space | Fullscreen current window |
super + shift + Space | Maximize current window |
ctrl + alt + V | Vertically maximize current window |
ctrl + alt + H | Horizontally maximize current window |
ctrl + alt + shift + V | Vertically maximize current window placing it in left of the screen |
ctrl + alt + shift + H | Horizontally maximize current window placing it at top of the screen |
super + shift + Left/Right/Up/Down | Move window by 10px directionally |
super + shift + H/J/K/L | Move window by 100px directionally |
super + ctrl + Left/Right/Up/Down | Resize window by 10px directionally |
super + ctrl + H/J/K/L | Resize window by 100px directionally |
super + Left/Right/Up/Down | Snap window to the screen edges |
super + H/J/K/L | Snap window to the screen edges |
Window Manager
Keys | Action |
---|---|
super + ctrl + R | Restart CWM |
super + ctrl + Q | Quit CWM |
Misc Keys
Keys | Action |
---|---|
ctrl + alt + M | Run ncmpcpp with album art |
ctrl + alt + L | Trigger lockscreen |
super + P | Run colorpicker |
Mouse Bindings
Button | Action |
---|---|
alt + Button_1 | Raise current window |
alt + Button_3 | Lower current window |
alt + Button_2 | Hide current window |
super + Button_1 | Move current window |
super + Button_3 | Resize current window |
super + Button_2 | Freeze current window geometry |
Button_1 | Launch window search menu |
Button_3 | Launch application search menu |
Button_2 | Launch group search menu |
Screenshots
Here's few screenshots of CWM
desktop. These'll give you an idea of the experience of CWM in Archcraft.
Desktop 1 | Desktop 2 | Desktop 3 | Desktop 4 |
---|---|---|---|
Desktop 5 | Desktop 6 | Desktop 7 | Desktop 8 |
---|---|---|---|
Desktop 9 | Desktop 10 | Desktop 11 | Desktop 12 |
---|---|---|---|
FAQs
How to update my config to new configs?
When a new version of Archcraft CWM get released, And you update the system by sudo pacman -Syu
or you update the CWM package by sudo pacman -S archcraft-cwm
, New config files get installed as ~/.cwm_pacnew_YYYY-MM-DD and ~/.cwmrc_pacnew_YYYY-MM-DD in your home directory.
To use new configs :
- backup your old
~/.cwm
directory and~/.cwmrc
file - move
~/.cwm_pacnew_YYYY-MM-DD
to~/.cwm
- move
~/.cwmrc_pacnew_YYYY-MM-DD
to~/.cwmrc
- logout and login again.
How to change GTK theme, icons and cursor?
To change GTK theme, icons and cursor in CWM session, Edit ~/.cwm/xsettingsd
file and restart CWM to apply the changes.
Net/ThemeName "Arc-Dark"
Net/IconThemeName "Arc-Circle"
Gtk/CursorThemeName "Future"
How to manage multiple monitors and resolution in CWM?
If you use multiple monitors with CWM window manager, you can manage them by running Manager Monitors or archcraft-randr
app.
Why Alacritty is not working on my computer?
Since Alacritty is a OpenGL based terminal emulator, It may not work on some computer hardwares. You can make it work on such computers by following these methods :
- Open alacritty with LIBGL_ALWAYS_SOFTWARE=1 variable. Edit the keybindings/script launching alacritty and replace
alacritty
withLIBGL_ALWAYS_SOFTWARE=1 alacritty
- Edit /usr/share/applications/Alacritty.desktop desktop file and replace
Exec=alacritty
withExec=env LIBGL_ALWAYS_SOFTWARE=1 alacritty