Skip to main content
Version: 2.0

Setup

Dux Modular Shell

Setup

The dms setup command generates default configuration files for your compositor (niri, Hyprland, or MangoWC). It only writes files that don't already exist or are empty, so it won't clobber anything you've customized.

Running dms setup with no arguments deploys all defaults at once. You can also deploy individual configs one at a time.

Image-based systems

dms setup works unchanged on Fedora Atomic, bootc, and other image-based systems because it only writes to your home directory. On those hosts the Dux Installer runs this same config deployment once the packages have been layered and the system rebooted. See Fedora Atomic & bootc images.

Quick Start​

Deploy all default configs:

dms setup

Deploy just keybinds:

dms setup binds

Subcommands​

SubcommandDescriptionniriHyprlandMangoWC
bindsDefault keybinds config~/.config/niri/dms/binds.kdl~/.config/hypr/dms/binds.lua~/.config/mango/dms/binds.conf
colorsDefault colors config~/.config/niri/dms/colors.kdl~/.config/hypr/dms/colors.lua~/.config/mango/dms/colors.conf
layoutDefault layout config~/.config/niri/dms/layout.kdl~/.config/hypr/dms/layout.lua~/.config/mango/dms/layout.conf
outputsDefault outputs config~/.config/niri/dms/outputs.kdl~/.config/hypr/dms/outputs.lua~/.config/mango/dms/outputs.conf
cursorDefault cursor config~/.config/niri/dms/cursor.kdl~/.config/hypr/dms/cursor.lua~/.config/mango/dms/cursor.conf
windowrulesDefault window rules config~/.config/niri/dms/windowrules.kdl~/.config/hypr/dms/windowrules.lua~/.config/mango/dms/windowrules.conf
alttabDefault alt-tab config (niri only)~/.config/niri/dms/alttab.kdl——

Running dms setup with no subcommand deploys all of the above, plus the input fragment (dms/input.kdl on niri, dms/input.lua on Hyprland, dms/input.conf on MangoWC) and, on Hyprland, dms/binds-user.lua. The input fragment has no subcommand of its own.

Hyprland 0.55 or newer

DMS writes Hyprland config in Lua only. When the installed Hyprland reports a version older than 0.55, dms setup stops with hyprland.lua is not loaded by Hyprland <version>; DMS needs 0.55 or newer instead of writing a config Hyprland would ignore. If the version can't be detected, it deploys anyway.

MangoWC 0.18 or newer

Everything dms setup writes for MangoWC uses the snake_case keys of MangoWC 0.18 and newer. With no subcommand, your existing config.conf is backed up to config.conf.backup.<timestamp> and replaced. Its bind, monitor_rule and window_rule lines move into dms/binds.conf, dms/outputs.conf and dms/windowrules.conf when those are empty, converted to snake_case. Fragments that already have content are kept as they are; if they predate 0.18, convert them with MangoWC's migrate-config-keys.sh (see MangoWC Configuration).

tip

If you installed DMS from packages (not through the interactive installer), run dms setup after install to get working compositor and terminal configs right away.

Existing Keybinds​

When dms setup finds your own keybinds (a non-empty dms/binds.kdl on niri; a non-empty dms/binds.conf or bind lines in config.conf on MangoWC), it asks before deploying:

1) Keep my binds as they are
2) Start from the DMS stock binds

Keeping is the default. Either way, an existing binds.conf or binds.kdl is backed up with a timestamp first. Hyprland is not asked, since your own binds live in dms/binds-user.lua. dms setup headless keeps them unless you pass --stock-binds.

Headless​

dms setup headless deploys configs without any prompts, for installers and scripts.

dms setup headless --compositor niri
FlagDescription
--compositorRequired. niri, hyprland, or mango
--terminalAlso deploy a terminal config and wire it into the keybinds: ghostty, kitty, or alacritty
--forceOverwrite existing configs. Existing files get timestamped backups first
--skip-existingLog a warning and skip anything that already has a config, instead of failing
--no-systemdDeploy the session config without systemd integration
--stock-bindsReplace existing keybinds with the DMS stock set instead of keeping them. A backup is kept

With systemd, setup binds dms.service to the compositor's session unit (the same step as dms systemd enable) and the deployed config does not start DMS itself. If that binding fails, the config falls back to starting dms run.

If a config already exists and you pass neither --force nor --skip-existing, the command fails with a non-zero exit so scripts notice. The two flags can't be combined.

dms refuses to run as root, so from an install hook run it as the target user:

runuser -u youruser -- dms setup headless --compositor niri --skip-existing

NixOS Home-Manager Users​

If you manage your niri or Hyprland config through home-manager, you probably don't want dms setup writing files that conflict with your declarative config. Instead, use the individual subcommands to generate only the pieces you need.

For example, if you handle keybinds through the niri home-manager module but want DMS defaults for colors and layout:

dms setup colors
dms setup layout

The niri home-manager module's niri.includes option references these same files under ~/.config/niri/dms/. See the niri integration docs for the full list of included files.

info

The individual subcommands are safe to run at any time — they skip files that already have content. To force a reset, delete or empty the file first, then run the subcommand again.