sway-config

Guide Sway window manager configuration syntax, variables, and exec commands.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/milojarow/dotfiles --skill sway-config-milojarow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sway-config
Source: https://github.com/milojarow/dotfiles/tree/main/.claude/skills/sway-config
Command: npx skills add https://github.com/milojarow/dotfiles --skill sway-config-milojarow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill helps you write, understand, and debug Sway window manager configuration files, ensuring your environment starts reliably and your custom daemons run correctly.

Core Features & Use Cases

  • Configuration Syntax: Understand sway config commands, quoting, and block syntax.
  • Variable Management: Learn to define and use variables for cleaner configs.
  • Modular Structure: Organize your config using include directives and alphabetical ordering.
  • Daemon Management: Reliably start and restart background services on sway reload.
  • Use Case: You've just installed Sway and need to configure keybindings, set up your status bar, and ensure your clipboard manager starts automatically every time you log in.

Quick Start

Use the sway-config skill to understand how to reliably start a background daemon using exec_always.

Frequently Asked Questions about sway-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reliably start a daemon on sway reload without duplicating processes?

To reliably start a daemon on sway reload, use the `exec_always` command in your sway config and include a script to kill existing instances before launching. This ensures background services restart cleanly without duplicate processes during configuration reloads.

What is the difference between exec and exec_always in sway configuration?

In sway configuration, `exec` runs a command only once on initial startup, while `exec_always` runs the command every time the config file is reloaded. Use `exec_always` for daemons that need to restart on configuration changes.

How do I organize a sway config file using variables and include directives?

Organize a sway config by defining variables for colors and workspaces, then use `include` directives to split configurations into modular files. This approach maintains alphabetical ordering and simplifies managing complex window manager setups.

Why does my sway window manager configuration fail to parse shell commands correctly?

Sway configuration parsing fails when shell commands are not properly quoted or when block syntax is incorrect. Sway has specific command parsing rules that require understanding shell scripting nuances and correct quoting for reliable execution.

Do I need to know shell scripting to configure the sway window manager?

Yes, understanding shell scripting is required for sway window manager configuration. You need knowledge of shell scripting to properly format daemon management commands, understand quoting rules, and handle `exec` and `exec_always` nuances.

What are common pitfalls when setting up keybindings and status bars in sway?

Common sway setup pitfalls include incorrect quoting in keybinding blocks, failing to properly restart status bars on reload, and mismanaging daemon startup. Following best practices for syntax and modular file structure prevents these configuration issues.