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
Super (Windows) key is used as the primary modifier for all Sway keybindings.
Vim-style Navigation
Keybindings
Application Launchers
Application Launchers
| Keybinding | Action | Description |
|---|---|---|
Super + Enter | kitty | Launch terminal emulator |
Super + F | firefox | Launch Firefox browser |
Super + Z | flameshot gui | Take screenshot |
~/.config/sway/config
Window Management
Window Management
Basic Window Operations
| Keybinding | Action |
|---|---|
Super + C | Kill focused window |
Super + O | Toggle split layout |
Super + Shift + R | Reload Sway configuration |
Focus Movement
~/.config/sway/config
Moving Floating Windows
Small movements (50px):Super + Alt + HJKL:Resizing Windows
Super + Ctrl + HJKL:Rofi Menus
Rofi Menus
Workspaces
Workspaces
Mouse Bindings
Mouse Bindings
| Mouse Button | With Super Key | Action |
|---|---|---|
| Left Click | Super + LMB | Move window |
| Middle Click | Super + MMB | Resize window |
| Right Click | Super + RMB | Toggle floating |
~/.config/sway/config
Notifications (Mako)
Notifications (Mako)
- 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
| Variable | Purpose | Default Value |
|---|---|---|
$bg | Background color | #1e1e2e |
$fg | Foreground/text color | #cdd6f4 |
$active | Active window border | #89b4fa |
$inactive | Inactive window border | #45475a |
Window Decoration
- Border width: 2px for both regular and floating windows
- Inner gaps: 5px between windows
- Outer gaps: 10px from screen edges
Wayland Portal Integration
~/.config/sway/config
- Screen capture (xdg-desktop-portal-wlr)
- Screenshot tools (Flameshot)
- DBus-based applications
Flameshot Configuration
Autostart Applications
~/.config/sway/config
Startup Services
- Wallpaper setter - Applies saved wallpaper on startup
- nm-applet - NetworkManager system tray icon
- Waybar - Status bar with Sway-specific config
- Mako - Notification daemon
- Custom autostart - User-defined startup applications
Advanced Configuration
Edge Borders
Edge Borders
smart to hide borders when only one window is visible.Including Theme Configuration
Including Theme Configuration
Related Configuration
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
Backup your config: Before making changes, create a backup: