A complete, minimal Wayland/Sway installation focused on performance and efficiency. Targets <200MB idle RAM with tear-free Intel HD 530 graphics acceleration.
- Sway - Tiling Wayland compositor (i3-compatible)
- Waybar - Lightweight status bar with clock, calendar popup, and power button
- Foot - Fast, minimal terminal emulator
- Rofi - Application launcher with custom midnight theme
- Sway Notification Center - Modern notification daemon
- PipeWire - Modern audio stack (lower CPU than PulseAudio)
Three Python GTK3 apps are included in ~/.local/bin/, all styled with the midnight dark theme:
sway-welcome— Welcome screen shown on first login. Lists key keybindings, links to GitHub and sponsor page, and has a "Don't show again" checkbox. Run with--forceto show it at any time.sway-power— Power menu ($mod+Shift+por waybar ⏻ button). Sleep callssystemctl suspenddirectly (logind allows it without auth). Reboot and Shutdown prompt for your sudo password.cal-popup— GTK calendar popup launched by clicking the waybar clock. Closes on focus-out or Escape. Wrapped bycal-togglewhich prevents duplicate windows.
- Thunar - File manager (GTK, integrates with the Midnight-Blue theme)
- Pavucontrol - Audio mixer GUI
- Grim + Slurp - Screenshot tools
- Brightnessctl - Backlight control
- LXAppearance - GTK theme manager
- Cliphist + wl-copy - Clipboard history manager (
$mod+v) - Arc-Dark GTK theme + Papirus icons - Applied system-wide
- Wlsunset - Night light (adjustable latitude/longitude)
- Mesa Vulkan drivers
- VAAPI hardware video acceleration
- Intel media driver (non-free)
- Optimized i915 kernel parameters
- Power management tuning
- GameMode - CPU/GPU governor optimization
- MangoHud - Performance overlay
- GameScope - Micro-compositor for games
- Steam libraries (multilib i386 support)
- VkBasalt - Vulkan post-processing
- Fresh Debian 13 (Trixie) netinstall
- Root access
- Internet connection
Option A — Clone the full repo (recommended)
# 1. Clone the repository
git clone https://github.com/BeanGreen247/sway-setup-script.git
cd sway-setup-script
# 2. Make executable
chmod +x *.sh
# 3. Setup Debian repositories
sudo bash sources_list_setup.sh
# 4. Run main installation
sudo bash sway-minimal-install.sh
# 5. (Optional) Additional tweaks
sudo bash sway-post-install-tweaks.sh
# 6. Reboot
sudo systemctl rebootOption B — Download scripts individually
# 1. Download all scripts
wget https://raw.githubusercontent.com/BeanGreen247/sway-setup-script/main/sources_list_setup.sh
wget https://raw.githubusercontent.com/BeanGreen247/sway-setup-script/main/sway-minimal-install.sh
wget https://raw.githubusercontent.com/BeanGreen247/sway-setup-script/main/sway-post-install-tweaks.sh
# 2. Make executable
chmod +x *.sh
# 3. Setup Debian repositories
sudo bash sources_list_setup.sh
# 4. Run main installation
sudo bash sway-minimal-install.sh
# 5. (Optional) Additional tweaks
sudo bash sway-post-install-tweaks.sh
# 6. Reboot
sudo systemctl rebootAfter reboot, Sway will auto-start when you log in on TTY1.
Purpose: Configure Debian repositories
What it does:
- Adds
contrib,non-free, andnon-free-firmwarerepos - Enables security and update repositories
- Backs up original sources.list
- Auto-detects Debian version (Bookworm/Trixie)
When to run: Before main installation (only once)
Purpose: Complete Sway environment installation
What it does:
- Auto-detects current user or prompts for username
- Creates user if doesn't exist
- Proper permission handling
- Core Sway stack (sway, swaybg, swaylock, swayidle)
- Wayland essentials (xdg-desktop-portal-wlr, xwayland)
- PipeWire audio stack
- Intel HD 530 GPU drivers (Mesa, Vulkan, VAAPI)
- Gaming libraries (32-bit + 64-bit)
- Essential utilities (file manager, terminal, etc.)
- Pulls configs from your GitHub repository
- Creates comprehensive fallback configs if download fails
- Configures:
- Sway main config + keybindings
- Waybar (status bar + styling)
- Foot (terminal)
- Sway Notification Center
- Kernel module parameters:
enable_rc6,enable_fbc,enable_psr - FastBoot for quicker startup
- GuC firmware loading
- Display C-states for power saving
- Configures auto-login to Sway on TTY1
- Sets environment variables (Wayland, Firefox, Qt, etc.)
- Enables linger for user session
Expected Results:
- Idle RAM: ~150-200MB
- Tear-free rendering
- Hardware video acceleration
- <5% idle CPU usage
Purpose: Additional enhancements and optional software
Interactive prompts for:
- Additional applications (GIMP, VLC, LibreOffice, etc.)
- Development tools (VSCode, Docker, Node.js)
- CPU governor optimization
- Swappiness tuning (recommended: 10 with 40GB RAM)
- zram compressed swap — automatically sized based on detected RAM (see below)
- Steam installation
- Lutris + Wine (for Windows games)
- Night light (wlsunset)
- Clipboard manager (cliphist)
- GTK themes (Arc Dark + Papirus icons)
- UFW firewall
- Intel GPU monitoring script
Note:
.bashrcand.vimrcare no longer applied by this script — they are deployed automatically by the dotfiles tool on first login.
When to run: After main installation, customize as needed
Why: Wallpapers consume GPU memory for texture storage and require constant compositing. Black background = minimal GPU overhead.
Config: output * bg #000000 solid_color
Why: PipeWire has lower latency, better Bluetooth support, and ~30% less CPU usage.
Benefit: Smoother audio, less system wake-ups
options i915 enable_rc6=1 # RC6 power state (deep sleep)
options i915 enable_fbc=1 # Framebuffer compression (saves bandwidth)
options i915 enable_psr=1 # Panel self-refresh (saves power)
options i915 fastboot=1 # Skip mode setting on boot
options i915 enable_guc=2 # GuC firmware for command submissionBenefit: Lower power consumption, less tearing, faster boot
focus_follows_mouse no # Reduces constant focus events
mouse_warping none # Prevents unnecessary cursor updates
max_render_time 3 # Limits frame time for Intel iGPUWhy: zram creates a compressed block device in RAM used as swap. Compression ratios of 3:1 are common, effectively giving you more usable memory without touching disk. This is especially useful on systems with ≤8 GB RAM.
Sizing logic (auto-detected at install time):
| Host RAM | Multiplier | Min floor |
|---|---|---|
| < 8 GB | 2× | 4 GB |
| 8–15 GB | 1× | — |
| 16–31 GB | 0.75× | — |
| 32–63 GB | 0.5× | — |
| 64–255 GB | 0.25× | — |
| ≥ 256 GB | 0.125× | — |
Config written to: /usr/lib/systemd/zram-generator.conf
Benefit: Reduces disk swap usage, improves responsiveness under memory pressure, negligible CPU overhead on modern hardware
- Downloads latest Font Awesome (with fallback to system package)
- Rebuilds font cache after installation
- Uses DejaVu Sans Mono (lightweight, clean)
For best performance in Steam games:
# Basic optimization
gamemoderun %command%
# With overlay
gamemoderun mangohud %command%
# With GameScope (micro-compositor)
gamescope -w 1920 -h 1080 -f -- gamemoderun %command%
# Full stack
gamescope -w 1920 -h 1080 -f -- gamemoderun mangohud %command%Create ~/.config/MangoHud/MangoHud.conf:
# Minimal overlay
fps
frame_timing=0
cpu_temp
gpu_temp
vulkan_driver
engine_version
position=top-leftAlready configured via:
- Vulkan drivers installed
- 32-bit libraries present
- VkBasalt for post-processing
All configs are stored in ~/.config/ and custom scripts in ~/.local/bin/:
~/.config/sway/
├── config # Main Sway config
├── general_keybinds # General keybindings
├── desktop_keybinds # Desktop-specific
├── laptop_keybinds # Laptop-specific
└── env # Environment variables
~/.config/waybar/
├── config # Waybar modules (JSON)
└── style.css # Waybar styling (midnight theme)
~/.config/foot/
└── foot.ini # Terminal config
~/.config/swaync/
└── config.json # Notification settings
~/.config/gtk-3.0/
└── settings.ini # GTK theme (Arc-Dark + Papirus)
~/.config/rofi/
├── config.rasi # Rofi options (drun, icons, font)
└── midnight.rasi # Custom midnight dark theme
~/.local/bin/
├── sway-welcome # Welcome screen (GTK3)
├── sway-power # Power menu (GTK3)
├── cal-popup # Calendar popup (GTK3)
└── cal-toggle # Calendar toggle wrapper
Default: ~/Pictures/Screenshots/
Filename format: screenshot-YYYYMMDD-HHMMSS.png
Keybinds:
Print— Full-screen screenshot (saved to ~/Pictures/Screenshots + copied to clipboard)$mod+Shift+s— Area selection screenshot$mod+Shift+p— Power menu (sway-power)$mod+Control+Shift+s— Suspend (sleep immediately, no confirmation)$mod+d— App launcher (rofi)$mod+v— Clipboard history (cliphist → rofi → wl-copy)$mod+Return— Open terminal (foot)
# Check logs
journalctl --user -xe | grep sway
# Validate config
sway --validate
# Debug mode
sway --debug 2>&1 | tee ~/sway-debug.log# Try manual start
sway
# Check display outputs
swaymsg -t get_outputs
# Test with simple config
mv ~/.config/sway/config ~/.config/sway/config.backup
sway # Will use default config# Restart PipeWire
systemctl --user restart pipewire pipewire-pulse wireplumber
# Check status
wpctl status
# GUI mixer
pavucontrol# Check top consumers
ps aux --sort=-%mem | head -20
# Expected idle: ~200MB
free -h# Verify kernel params loaded
cat /sys/module/i915/parameters/enable_fbc # Should be 1
cat /sys/module/i915/parameters/enable_psr # Should be 1
# If 0, rebuild initramfs
sudo update-initramfs -u -k all
sudo reboot# Rebuild cache
fc-cache -f -v
# Verify Font Awesome
fc-list | grep -i "awesome"
# Reinstall
sudo apt install --reinstall fonts-font-awesomesudo apt update
sudo apt upgrade -y
sudo apt autoremove -ycd ~/.config/sway
wget -O config https://raw.githubusercontent.com/BeanGreen247/sway-setup-script/main/sway/config
swaymsg reload# Remove Sway packages
sudo apt remove --purge sway swaybg waybar foot rofi
# Remove configs
rm -rf ~/.config/sway ~/.config/waybar ~/.config/foot ~/.config/rofi
# Remove custom scripts
rm -f ~/.local/bin/sway-welcome ~/.local/bin/sway-power \
~/.local/bin/cal-popup ~/.local/bin/cal-toggle
# Remove auto-start
rm ~/.bash_profile
# Restore original sources.list
sudo cp /etc/apt/sources.list.backup.* /etc/apt/sources.list- Sway Wiki: https://github.com/swaywm/sway/wiki
- Waybar Wiki: https://github.com/Alexays/Waybar/wiki
- Intel Graphics: https://wiki.archlinux.org/title/Intel_graphics
- Your GitHub: https://github.com/BeanGreen247/sway-setup-script
- Debian PipeWire: https://wiki.debian.org/PipeWire
Improvements welcome! Submit issues/PRs to: https://github.com/BeanGreen247/sway-setup-script
MIT License - Feel free to modify and distribute
Edit ~/.config/sway/config:
# Assign apps to workspaces
assign [app_id="firefox"] workspace 1
assign [class="Steam"] workspace 9# List outputs
swaymsg -t get_outputs
# Configure in sway config
output HDMI-A-1 resolution 1920x1080 position 0,0
output eDP-1 resolution 1920x1080 position 1920,0The midnight theme is at ~/.config/rofi/midnight.rasi. Edit colors there to restyle the launcher. The active palette:
Background: #0a1628
Accent: #2a5a8a
Highlight: #58a6ff
Foreground: #dce8f5
Font: DejaVu Sans Mono 12
Created: February 2026
Last Updated: March 2026
Tested on: Debian 13 (Trixie)
Target Hardware: Intel i5-6500T (HD 530), 40GB RAM, 1TB HDD
Author: BeanGreen247
GitHub: https://github.com/BeanGreen247/sway-setup-script



