SMUX-CONFIG(5)
π SMUX-CONFIG(5) β the smux-config page, but make it make sense π
Okay bestie, welcome to the File Formats Manual page for SMUX-CONFIG(5) β aka smux-config. It's giving config blueprint, and we're keeping every lil' fact exactly where it belongs. No cap. π«Ά
β¨ NAME β¨
smux-config β configuration file format for smux. That's the whole name vibe, and it slays. π
π¦ SYNOPSIS π¦
~/.config/smux/config.toml
Yep, that's the path, periodt. π
πΈ DESCRIPTION πΈ
Okay so smux reads a main TOML configuration file plus optional project files. By default the file is loaded from ~/.config/smux/config.toml. If XDG_CONFIG_HOME is set, smux uses $XDG_CONFIG_HOME/smux/config.toml.
Template definitions live in ~/.config/smux/templates/*.toml and project definitions in ~/.config/smux/projects/*.toml (or under $XDG_CONFIG_HOME/smux/), one file per definition. Obsessed with the one-file-per-definition organization tbh. β¨
π OVERVIEW π
config.toml holds a single [settings] section. Templates and projects each live in their own directory as one file per definition, where the file name is the template or project name. Iconic separation, fr fr. π
π SETTINGS π
π [settings] π
Here's the code block, exactly as the manual gives it β no edits, no "fixing" the commented preview lines, because we respect the receipts. π§Ύ
[settings]
default_template = "default"
icons = "auto"
[settings.icon_colors]
session = 75
directory = 108
template = 179
project = 81
[settings.picker.bindings]
reset = "ctrl-c"
sessions = "ctrl-s"
windows = "ctrl-w"
folders = "ctrl-f"
projects = "ctrl-p"
repos = "ctrl-g"
delete_session = "ctrl-x"
save_project = "alt-s"
rename_session = "ctrl-r"
edit_project = "ctrl-e"
choose_template = "ctrl-t"
toggle_hints = "?"
[settings.picker.preview]
# sessions = "tmux capture-pane -p -t
# folders = "eza --tree --level=2 --color=always --icons=always
# projects = "bat --style=plain --color=always --language=toml
[settings.folder_search]
# roots = ["~"]
# max_depth = 3
# include_hidden = false
[settings.clone]
# root = "~/Development"
# owners = ["my-org"]
default_templateβ sets the template used when no CLI override or matching project template applies. Lowkey the fallback queen. πiconsβ controls picker icons and acceptsauto,always, ornever. Pick your icon energy. β¨settings.icon_colorsβ sets ANSI-256 icon colors for sessions, directories, templates, and projects. Color moment, no cap. πsettings.picker.bindingsβ customizes the main picker keybinds. Here's every single one, bestie:resetβ resets to the full list.sessionsβ filters to tmux sessions.windowsβ switches to individual tmux windows across all sessions (hidden from the default list; Enter jumps straight to the selected window).foldersβ filters to folders.projectsβ filters to saved projects.reposβ switches to your GitHub repositories (hidden from the default list and fetched on demand viagh; Enter clones the selection intosettings.cloneroot, or just connects when a checkout already exists).delete_sessionβ deletes the selected session or project.save_projectβ saves the selected tmux session as a project.rename_sessionβ renames the selected tmux session.edit_projectβ opens the selected project file in the editor.choose_templateβ opens the selected folder and prompts for its template by hand (overriding auto-detection for that folder).toggle_hintsβ shows or hides the keyboard-shortcut hint bar.
settings.picker.show_hintsβ boolean, defaulttrue; sets whether the hint bar is shown initially. It can always be toggled at runtime withtoggle_hints. π«Ά
π¨ Picker binding values are passed through as fzf key names. They must not be empty and must be unique within the picker binding block. That's a hard vibe check, not a suggestion.
settings.picker.previewβ customizes the right-side picker preview commands.sessionsreceivesSMUX_PREVIEW_SESSION,foldersreceivesSMUX_PREVIEW_PATH, andprojectsreceivesSMUX_PREVIEW_FILE. When unset,smuxuses built-in defaults: tmux window and pane summaries for sessions,ezaorls -lafor folders, andbatorsed -n '1,200p'for project files. πsettings.folder_searchβ adds bounded filesystem directory discovery tosmux selectin addition tozoxide.rootsdefaults to["~"],max_depthdefaults to3and must be at most16, andinclude_hiddendefaults tofalse. Folder search skips common heavyweight directories such asLibrary,node_modules, andtarget. Bounded and bougie. π¦settings.cloneβ configuressmux cloneand the picker's repository list.rootis the directory new checkouts land in when no target directory is given with--dir(unset means the current working directory).ownerslists extra GitHub owners (users or orgs) whose repositories appear alongside your own β in the repository browser that opens whensmux cloneruns without a URL, and in the picker'sreposfilter (both require theghCLI). Clone era, activated. π₯
π§ TEMPLATES π§
Each template is a file in ~/.config/smux/templates/, one template per file, where the file name (without .toml) is the template name. A template defines the tmux layout used when smux creates a new session. The recommended format uses TOML 1.1 inline tables for windows and panes. So cute, so structured. π
startup_window selects the window focused after creation. startup_pane selects a zero-based pane index within that startup window.
Template fields:
matchβ array of marker patterns that auto-detect this template; exact filenames or simple*/?globs, for examplenuxt.config.*.match_dependenciesβ array ofpackage.jsondependency names that also auto-detect this template, for examplereact.priorityβ integer, default0; higher wins when several templates match, letting a meta-framework beat its base.rootstartup_windowstartup_paneenvβ table of environment variables set on the session viatmux new-session -e; needs tmux >=3.2.on_createβ shell command run once in the session root before the session is created; a failing command aborts the connect.windowsβ array of inline tables.
Window fields:
namecwdpre_commandcommandlayoutβ tmux window layout name passed totmux select-layout, for exampletiled,main-horizontal,main-vertical,even-horizontal, oreven-vertical. Applied after pane creation, so it may rearrange the final pane geometry.synchronizepanesβ array of inline tables.
Pane fields:
layoutβ controls how each new pane is created before any window-level tmux layout is applied.cwdcommandzoomβ zooms that pane after the window has been created. At most one pane per window may setzoom = true.
Rules:
- A template must contain at least one window.
startup_windowmust match an existing template window if set.startup_panemust be valid for the chosen startup window.- A window may define
commandorpanesor neither, but not both. - A
panesarray cannot be empty. pre_commandruns before the pane or window command.window.layoutis passed through to tmux without additional validation.
Pane layout values use the form <position> or <position> <size> where position is one of right, left, bottom, or top.
When both pane and window layout are set, pane layout controls split creation and window layout is applied afterward with tmux select-layout. That means window layout may rearrange the final pane geometry. Double layout moment, but that's the rule. π«Ά
π PROJECTS π
Projects are stored as individual files in ~/.config/smux/projects/.
path = "~/code/myapp"
template = "rust"
session_name = "myapp"
The project name comes from the file name, for example ~/.config/smux/projects/myapp.toml.
Project files may either point at a reusable template or define their own windows and startup behavior directly. And yes, here's that same lil' snippet again, because the original page serves it twice β receipts kept, no cap. π§Ύ
path = "~/code/myapp"
template = "rust"
session_name = "myapp"
Project fields:
pathβ required.session_nameβ optional.templateβ optional.rootβ optional.startup_windowβ optional.startup_paneβ optional.windowsβ optional; same structure as template windows.envβ optional; merged over the template'senv, project entries win.on_createβ optional; overrides the template'son_create.
π₯ RESOLUTION ORDER π₯
Template resolution order:
--template- matching project definition
settings.default_template- auto-detected template: a template whose
matchfiles ormatch_dependenciesare present in the directory; when several match, highest priority wins, then the most specific (longest) pattern, then the alphabetically first name - built-in fallback template
When opening a folder from the picker, if none of the above resolve a template and two or more templates are defined, smux prompts you to choose one instead of using the built-in fallback. Picker said choose your fighter. π
Session name resolution order:
--session-name- matching project
session_name - sanitized directory basename
π SEE ALSO π
smux(1)β go read the big sibling page, bestie. π«Ά
Okay bestie, that's the whole SMUX-CONFIG(5) page from the File Formats Manual. This copy didn't give us a date/version line, so we're not inventing one β just preserving the facts, the flags, the defaults, and the vibe. smux-config out. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: smux 0.6.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms