Skip to content

MonoWM

Introduction

This environment is built around the mono window manager. This is a very simple window manager that only allows you to have one window occupying your entire screen at a time. Kind of like a mobile OS. Therefore you are going to have to rely on keybinds to quickly navigate to where you need to go. You probably noticed you can only have 9 windows open at a time (Not really, you can set in the monowm config to have up to 128, but I don't recommend it). Instead, you should rely on the terminal and tmux to get a lot of work done in just one terminal. I've included a very minimal tmux setup, which you can activate by entering tm in the terminal.

Default Keybinds

Window Keybinds

Keybinding Action
super+tab MRU switcher (similar to macOS Cmd+Tab)
super+j Cycle foward
super+k Cycle back
super+shift+1-9 Go directly to an open window
super+q Quit / close window

Utility Keybinds

Keybinding Action
Super+enter Open Terminal (alacritty)
Super+b Open Browser (chromium)
Super+space Open Application Launcher (rofi)
Super+p Color Picker
PrtSc Screenshot (Saves to ~/Pictures/ and to your clipboard)
super+i View system information (time, battery, date)

Configuration

You may configure monowm in ~/.config/monowm/.

Here's the default configuration found in config.conf to give you an idea on how to change things:

# ==============================================================================
# Monowm Core Configuration (config.conf)
# ==============================================================================

# Maximum number of windows that can be open at the same time (max 128)
max_windows = 9

# Internal Window Manager Keybindings
# Format: modifiers+keysym (modifiers can be: super, shift, control, alt)
bind_quit = super+q
bind_cycle_forward = super+j
bind_cycle_back = super+k

#the prefix for switching using mod 1-9
bind_switch_window_mod = super+Shift
bind_mru_switcher = super+Tab

bind_reload = control+F4

# Format: keybind = modifiers+keysym : command
keybind = super+Return : ~/.config/monowm/talacritty
keybind = super+space : ~/.config/rofi/launcher.sh
keybind = super+b : chromium
keybind = super+p : ~/.config/scripts/colorpicker
keybind = Print : ~/.config/scripts/screenshot

keybind = XF86AudioRaiseVolume : monowm-volume up
keybind = XF86AudioLowerVolume : monowm-volume down
keybind = XF86AudioMute : monowm-volume mute
keybind = XF86AudioMicMute : wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
keybind = XF86MonBrightnessUp : monowm-brightness up
keybind = XF86MonBrightnessDown : monowm-brightness down

Add a Custom Keybind

keybind = key : action

For custom scripts, it is recommended to use direct paths (Ex. ~/scripts/example-script).

Autostart Commands

To run applications or commands automatically when MonoWM starts, put them in ~/.config/monowm/autostart

#!/usr/bin/env bash

# make computer go zzzzz
xset s on
xset s "$IDLE_TIME"
xset +dpms
xset dpms "$IDLE_TIME" "$IDLE_TIME" "$IDLE_TIME"

#start monosend
mkdir -p "$HOME/Downloads" && cd "$HOME/Downloads" && nohup monosend receive --autoaccept >/dev/null 2>&1 &

#set diaplay settings
~/.config/scripts/restui --apply

# Sync D-Bus environment before starting user services
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
    dbus-update-activation-environment --systemd --all
fi

# Set wallpaper
if [ -f "$HOME/.config/monos-themes/current/bg.png" ]; then
    xwallpaper --zoom "$HOME/.config/monos-themes/current/bg.png"
fi

# Daemons & Compositor (backgrounded)
dunst &
xcompmgr -n &
~/.config/monowm/bar.sh &

Bar Configuration

The status bar is configured separately in ~/.config/monowm/bar.conf. Below is the default bar.conf file:

# ==============================================================================
# Monowm Built-in Bar Configuration (bar.conf)
# ==============================================================================

# Set to 0, false, no, or off to disable the bar.
enabled = 1

# Colors accepted by Xft, including #RRGGBB and named X11 colors.
text_color = #c6d0f5
active_text_color = #303446
background_color = #303446
highlight_color = #babbf1

# Use a Nerd Font to display the built-in application icon mappings.
font = JetBrainsMono Nerd Font

# The bar is exactly twice this many pixels tall.
font_size = 46

# Options: top, bottom
position = top

# Vertical pixels above and below the font. The active highlight always fills
# the complete bar height. Valid range: 0-64
vertical_padding = 0


# Where to show programs in opening/keybinding order.
# Options: left, middle, right, hidden
programs = left
show_numbers = false
show_icons = true
program_padding = 24

# Show the focused program's short WM_CLASS name beside the program icons.
# Options: left, right, off
focused_name = right
You may add additional things to your bar using xsetroot. Here is an example:
#!/bin/sh

battery=""

for candidate in /sys/class/power_supply/BAT*; do
    if [ -d "$candidate" ]; then
        battery=$candidate
        break
    fi
done

while :; do
    if [ -n "$battery" ]; then
        capacity=$(cat "$battery/capacity" 2>/dev/null)
        state=$(cat "$battery/status" 2>/dev/null)
        battery_text="${state:-Battery} ${capacity:-?}% | "
    else
        battery_text="No battery | "
    fi

    xsetroot -name "${battery_text}$(date '+%a %d %b | %H:%M')"
    sleep 30
done

You can add this script to your autostart, or make it a separate file and run it in your autostart. You will now be able to see the time, date and battery for your laptop