Skip to main content

Sway Window Manager Configuration

Config-Sway uses Sway as the primary Wayland compositor and window manager. The configuration provides a comprehensive setup with keybindings, window management, and theme integration.

Configuration Files

The Sway configuration is split into two main files:
  • ~/.config/sway/config - Main configuration file with keybindings and settings
  • ~/.config/sway/theme.conf - Theme-specific colors, borders, and gaps (dynamically updated)

Core Settings

Modifier Key

The Super (Windows) key is used as the primary modifier for all Sway keybindings.

Vim-style Navigation

Movement keys follow Vim conventions for consistency across the system.

Keybindings

~/.config/sway/config

Basic Window Operations

Focus Movement

~/.config/sway/config

Moving Floating Windows

Small movements (50px):
Large movements (150px) - Super + Alt + HJKL:

Resizing Windows

Super + Ctrl + HJKL:
All Rofi menus are accessible through Super key combinations:
~/.config/sway/config

Standard Workspaces (1-10)

Switch to workspace:
Move container to workspace:

Special “Magic” Workspace

Use the magic workspace as a scratchpad for temporary windows or tasks you want to keep separate from your main workflow.

Mouse Wheel Navigation

Scroll while holding Super to cycle through workspaces.
~/.config/sway/config

Audio Control (WirePlumber)

Brightness Control

Media Playback (Playerctl)

  • Super + N - Dismiss all notifications
  • Super + Shift + N - Toggle Do Not Disturb mode

Input Configuration

Keyboard Layout

~/.config/sway/config
The configuration supports both US and Latin American keyboard layouts. Switch between them using Alt + Shift.

Touchpad

Theme System

Theme File Structure

~/.config/sway/theme.conf

Color Variables

Window Decoration

  • Border width: 2px for both regular and floating windows
  • Inner gaps: 5px between windows
  • Outer gaps: 10px from screen edges
The theme.conf file is automatically updated when you switch themes using Super + A. Each theme in ~/.config/themes/ contains its own sway/theme.conf file.

Wayland Portal Integration

~/.config/sway/config
This ensures proper integration with:
  • Screen capture (xdg-desktop-portal-wlr)
  • Screenshot tools (Flameshot)
  • DBus-based applications

Flameshot Configuration

Special window rules ensure Flameshot overlays work correctly in multi-monitor setups.

Autostart Applications

~/.config/sway/config

Startup Services

  1. Wallpaper setter - Applies saved wallpaper on startup
  2. nm-applet - NetworkManager system tray icon
  3. Waybar - Status bar with Sway-specific config
  4. Mako - Notification daemon
  5. Custom autostart - User-defined startup applications

Advanced Configuration

Window borders are shown on all edges. Change to smart to hide borders when only one window is visible.
The main config file includes the theme configuration, which allows dynamic theme switching without editing the main config.

Waybar Configuration

Configure the status bar appearance and modules

Theme System

Learn how theme switching works across all components

Rofi Configuration

Customize application launchers and menus

Kitty Terminal

Terminal emulator configuration and styling

Configuration Tips

Reload after changes: Press Super + Shift + R to reload Sway configuration without restarting your session.
Backup your config: Before making changes, create a backup:
Be careful when modifying the portal integration settings. Incorrect configuration may break screenshot functionality and other Wayland features.