AwesomeWM Config
This AwesomeWM setup is the orchestration layer for LinuxUtilities. It binds keys, builds the status widgets, launches helper tools, and connects desktop events to the rest of the toolkit.
rc.lua is the entry point and reusable logic now lives under linuxutils/*.lua. When you install the config, copy both the entrypoint and the module tree.
Installation
# Recommended: install the full user config tree from the repo
cd ~/Workspace/LinuxUtilities
make awesome-user-update
# Or update the system-wide config tree (uses sudo)
make awesome-update
# Reload AwesomeWM (no restart needed)
# Press Mod4+Ctrl+r or:
awesome-client 'awesome.restart()'
The update targets install:
rc.luaas the entrypointlinuxutils/common.luafor shared helperslinuxutils/brightness.luafor brightness controllinuxutils/icons.luafor palette-aware Bluetooth/network icon markuplinuxutils/audio.luafor volume/media controllinuxutils/presenter.luafor spotlight, Gromit, and presenter dash logiclinuxutils/launchers.luafor flameshot, control-center, and app launcherslinuxutils/calendar.luafor the large calendar/agenda popup and note previewlinuxutils/widgets.luafor wibar widget builders and status refreshlinuxutils/bindings.luafor root mouse bindings, global hotkeys, client keys, and client mouse bindingsicons/LinuxUtilitiesStatus/for custom tray icon assets used by NetworkManager and Blueman
Config Tree
| Path | Role |
|---|---|
rc.lua | AwesomeWM entrypoint. Loads Awesome libraries, updates package.path, imports local modules, defines widgets, key bindings, rules, and signals. |
linuxutils/common.lua | Shared helper functions used by the config: shell quoting, hostname lookup, command existence checks, compact label helpers, numeric clamping. |
linuxutils/brightness.lua | Brightness controller with backend fallbacks: brightnessctl, light, xbacklight, writable /sys/class/backlight/*, then xrandr. |
linuxutils/icons.lua | Semantic icon/palette helpers for status widgets. Produces Pango markup so Bluetooth and network indicators stay visible on the dark bar. |
linuxutils/audio.lua | Audio controller for volume changes, mute, media keys, notifications, PipeWire/PulseAudio refresh, and audio widget tooltip text. |
linuxutils/presenter.lua | Presenter controller for cursor spotlight, Gromit overlay commands, and the animated presenter dash helper script. |
linuxutils/launchers.lua | Launcher/controller actions for flameshot, the rofi program palette, Linux Control Center, system utilities, folder navigation, AppImage scanning/launching, notes entrypoints, and the btop -> htop -> top system monitor fallback chain. |
linuxutils/calendar.lua | Calendar popup controller. Builds the larger center-screen agenda panel, month navigation, font-size controls, and daily-note preview/actions. |
linuxutils/widgets.lua | Widget factory/controller for audio, battery, network, Bluetooth, system usage, Thunderbird, and clock widgets. Network, Bluetooth, and audio refresh from device events with a conservative periodic fallback. |
linuxutils/device_events.lua | Consumes LinuxUtilities session D-Bus events and debounces focused widget refreshes. |
linuxutils/bindings.lua | Binding factory for root mouse buttons, global media/presenter/launcher hotkeys, client keys, and client-side utility mouse actions. |
icons/LinuxUtilitiesStatus/ | Bundled GTK icon theme overrides for tray applets so Bluetooth and Wi-Fi indicators can use explicit colors instead of inheriting Mint's dark symbolic glyphs. |
How The Modules Stitch Together
rc.lua
-> resolve_config_dir()
-> package.path += "<config dir>/?"
-> require("linuxutils.common")
-> require("linuxutils.brightness")
-> require("linuxutils.audio")
-> require("linuxutils.presenter")
-> require("linuxutils.launchers")
-> require("linuxutils.calendar")
-> require("linuxutils.widgets")
-> require("linuxutils.icons")
-> require("linuxutils.bindings")
-> construct controllers
-> construct binding tables
-> alias public actions for keybindings/mouse bindings
-> build the wibar using widgets.lua
-> install root/global/client bindings from bindings.lua
rc.lua now behaves like a composition root. The modules own the logic; the entrypoint owns wiring, layouts, bindings, and AwesomeWM lifecycle hooks.
Right-click Menu
The root right-click menu uses freedesktop.menu.build() when the freedesktop helper is available. That means installed applications are discovered from desktop-entry files under the standard XDG application directories, not from a hardcoded Lua list.
On top of that generated app menu, this config now injects a custom LinuxUtilities submenu with notes, files, AppImage launching, system monitor, network actions, world clock, and timezone actions. If you want more items in the application list itself, install or edit .desktop files; if you want workflow actions, add them to the custom submenu in rc.lua.
Multi-screen behavior
- Each screen gets its own launcher, host label, keyboard widget, and full custom status-widget set.
- On narrower screens, only text-heavy labels are shortened: network SSID, host text, clock text, and system-usage labels.
- The systray remains on the primary screen because AwesomeWM implements it as a singleton widget.
- The top bar now includes a folder utility widget for home, repo, screenshots, notes, and the AppImage library.
- An applications widget scans
~/Programs/AppImage(orLINUXUTILS_APPIMAGE_DIR) so dropped.AppImagefiles show up in the launcher automatically.
Clock / calendar behavior
- Left click the clock to toggle the large centered calendar popup.
- Middle click shows a world-clock popup with local, Mumbai, and Vancouver times.
- Right click opens time/date preferences.
- Mouse wheel on the clock browses previous/next months.
- The wibar clock itself now includes compact
YVRandBOMsegments next to the local time. - The popup includes font resize controls, visible
Daily Note,Tasks,Notes App, andCloseactions, plus a markdown preview panel. - Left click a day cell to select it and update the preview. Right click a day cell to open that date's note immediately.
- Today's date keeps a subtle outline, while the selected date gets the stronger highlight.
- Notes actions prefer Obsidian when installed; otherwise they fall back to opening the markdown note in
viinside a terminal. - The notes launcher keeps a managed mirror of repository markdown files under
ShivasNotes/linked/LinuxUtilitiesso docs stay visible inside the vault. Mod4+Ctrl+iandMod4+Ctrl+vattempt to switch the system timezone to Mumbai or Vancouver usingtimedatectl(andpkexecif needed).
System Stack
AwesomeWM is a user-space window manager. It does not talk directly to the Linux kernel to arrange windows. Instead, it receives events from the X server and calls out to user-space tools and daemons when it needs information or device changes.
What talks to what
- Keyboard and device interrupts start in the kernel and input stack.
- Xorg/X11 exposes those events to AwesomeWM.
awful.keycallbacks inrc.luaturn those events into Lua actions.- Those actions may call helper commands like
pactl,xrandr,nmcli,brightnessctl, orflameshot.
What this config adds
- Media keys and brightness handling
- Presenter controls for Gromit, spotlight, and dash drawing
- Status widgets for audio, battery, network, Bluetooth, mail, and clock
- A compact CPU/RAM widget that opens the preferred process monitor
- Folder and AppImage launch widgets for daily desktop tasks
- Workflow launchers for the Linux control center and presentation tools
Example Event Flow
Brightness key example
- You press a laptop brightness key.
- X11 delivers an
XF86MonBrightness*key event to AwesomeWM. rc.luadispatches tolinuxutils/brightness.lua.- The brightness module tries hardware-friendly tools first, then falls back to
xrandrsoftware dimming if needed. - A notification shows which backend actually handled the change.
How Module Loading Works
rc.lua first resolves the directory it was loaded from, then prepends that path to Lua's package.path. That matters because the same config must work both from the repository checkout and after installation into ~/.config/awesome or /etc/xdg/awesome.
local config_dir = resolve_config_dir()
package.path = table.concat({
config_dir .. "?.lua",
config_dir .. "?/init.lua",
package.path,
}, ";")
local common = require("linuxutils.common")
local brightness = require("linuxutils.brightness")
local audio = require("linuxutils.audio")
local presenter = require("linuxutils.presenter")
local launchers = require("linuxutils.launchers")
local widgets = require("linuxutils.widgets")
local bindings = require("linuxutils.bindings")
After the local module requires, rc.lua constructs controllers and aliases their public methods into the names used later by keybindings and widget setup.
local audio_controller = audio.new({ ... })
local presenter_controller = presenter.new({ ... })
local launchers_controller = launchers.new({ ... })
local widgets_controller = widgets.new({ ... })
local binding_tables = bindings.build({ ... })
local volume_up = audio_controller.volume_up
local open_flameshot = launchers_controller.open_flameshot
local create_audio_widget = widgets_controller.create_audio_widget
root.buttons(binding_tables.root_buttons)
This keeps the entrypoint small enough to reason about while still letting the config ship as a self-contained tree.
How To Edit This Config Safely
# 1. Edit the repo copy
$EDITOR rc.lua
$EDITOR linuxutils/common.lua
$EDITOR linuxutils/brightness.lua
$EDITOR linuxutils/icons.lua
$EDITOR linuxutils/audio.lua
$EDITOR linuxutils/presenter.lua
$EDITOR linuxutils/launchers.lua
$EDITOR linuxutils/widgets.lua
$EDITOR linuxutils/bindings.lua
# 2. Validate before install
make awesome-test
awesome -k -c rc.lua
# 3. Install into your user config tree
make awesome-user-update
# 4. Reload AwesomeWM
# Mod4 + Ctrl + r
Writing AwesomeWM Lua
Common Awesome building blocks
awful.keyfor key bindingsawful.spawnandawful.spawn.easy_async_with_shellfor external commandsnaughty.notifyfor notificationsgears.timerfor delayed refresh/retry behaviorwibox.widgetfor bar widgets and controls
Style of Lua used here
- Keep shared logic in small modules that
returntables. - Keep desktop actions as explicit local functions instead of anonymous shell blobs sprinkled everywhere.
- Prefer one config entrypoint and small reusable modules over multiple competing
rc.luacopies. - Validate with
awesome -kbefore reloading.
local function volume_up()
awful.spawn({ "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%" }, false)
end
awful.key({}, "XF86AudioRaiseVolume", volume_up,
{ description = "increase volume", group = "media" })
Hotkey Groups
All custom keybindings are organized into AwesomeWM's built-in help system (Mod4+s).
Launcher
| Key | Action |
|---|---|
| Mod4+Return | Open terminal |
| Mod4+r | Run prompt |
| Mod4+p | Application menu (rofi) |
| Mod4+c | Control Center |
| Mod4+space | Cursor Spotlight |
Window Management
| Key | Action |
|---|---|
| Mod4+j/k | Focus next/previous client |
| Mod4+Shift+j/k | Swap client position |
| Mod4+l/h | Increase/decrease master width |
| Mod4+m | Toggle maximize |
| Mod4+f | Toggle fullscreen |
| Mod4+Shift+c | Close client |
Drawing & Presentation
| Key | Action |
|---|---|
| F6 | Toggle Gromit drawing |
| Shift+F6 | Clear Gromit strokes |
| Alt+F11 | Set presenter anchor |
| F11 | Draw dash segment |
| Shift+F11 | Draw dotted segment |
| Ctrl+F11 | Draw solid segment |
| Mod4+F11 | Draw arrow segment |
Tags (Workspaces)
| Key | Action |
|---|---|
| Mod4+1-9 | Switch to tag 1–9 |
| Mod4+Shift+1-9 | Move client to tag |
| Mod4+Ctrl+1-9 | Toggle tag visibility |
Widgets + Status Bar
The wibar is assembled in rc.lua and combines standard Awesome widgets with LinuxUtilities-specific status blocks. The right side hosts Bluetooth, network, CPU/RAM, battery, audio, keyboard layout, systray, application launcher, folder launcher, host label, Thunderbird, clock, and layout indicators.
The network and Bluetooth widgets now render through linuxutils/icons.lua using light-colored Pango markup and are the primary status indicators by default. The tray applets are optional: if you set LINUXUTILS_AUTOSTART_STATUS_APPLETS=1 before starting AwesomeWM, nm-applet and blueman-applet are relaunched with GTK_ICON_THEME=LinuxUtilitiesStatus, Blueman is pushed to full-color mode by setting org.blueman.general symbolic-status-icons to false, and the bundled tray icon theme under icons/LinuxUtilitiesStatus/ overrides the icon names those applets request.
Mod4+Space opens the universal LinuxUtilities surface: one fuzzy search across LinuxUtilities actions, folders, desktop applications, open windows, and shell commands. Mod4+r remains an alias. The folder widget still prefers yazi, then ranger, then lf, and finally xdg-open or gio. Mod4+/ remains the focused folder-only surface, with Enter to open, Ctrl+O for a terminal, and Alt+C to copy the path. Layout cycling now uses Mod4+Alt+Space and Mod4+Alt+Shift+Space. The network widget exposes nmtui-connect directly inside x-terminal-emulator, and the right-click menu mirrors that path under LinuxUtilities -> network -> Wi-Fi picker (nmtui).
Theme Integration
The config applies a dark theme consistent with the Antsand brand:
| Element | Color | Value |
|---|---|---|
| Background | ████ | #232323 |
| Foreground | ████ | #e0e0e0 |
| Accent (focus) | ████ | #c4a7ff |
| Urgent | ████ | #e74c3c |
| Active tag | ████ | #07adf8 |
Theme file location: ~/.config/awesome/themes/antsand/theme.lua
Testing
# AwesomeWM-only checks
make awesome-test
# Full fast test path used by the git pre-commit hook
make test-fast
# Build docs after changing this page
bash docs/build.sh
make awesome-test currently validates:
- repo-copy syntax via
awesome -k -c rc.lua - a runtime smoke wrapper via
bash tests/awesomewm_runtime_smoke.shfor the controller and bindings smoke configs - a staged
$XDG_CONFIG_HOME/awesometree with the modular config layout - presence of critical bindings such as brightness, spotlight, gromit, and presenter dash
- Makefile dry-run coverage for installing
linuxutils/*.lua
The runtime smoke wrapper skips cleanly when a usable virtual X11 display is not available in the current shell.
Crash Recovery
If AwesomeWM crashes or fails to load the config:
- Press Ctrl+Alt+F2 to switch to a TTY
- Log in and check syntax:
awesome -k -c ~/.config/awesome/rc.lua - Restore the matching backup of
rc.luaand, if needed, the matchinglinuxutils/backup directory created by the Make targets. - Press Ctrl+Alt+F7 to return to the graphical session
- Reload:
awesome-client 'awesome.restart()'
Alternatively, the rescue-windows.sh script can recover floating windows if layouts break.