sway


#linux #config #dotfiles #desktop

sway is currently the most stable wayland compositor I have ever used. It's a drop-in replacement to i3.

Setup

Software

Here is the list of software I use with sway to run a functionning desktop:

Quick install

Here is an opinionated barebones list of basic programs you will need to run sway. For a full overview of tools and software I use, there is a list in the dotfiles entry of the wiki.

sudo pacman -S sway swayidle swaylock swaybg \
foot waybar fuzzel mako wlsunset wl-clipboard \

Sources

Swayidle Configuration Troubleshooting

Common Issues with Screen Locking and Power Management

When configuring swayidle for automatic screen locking and display power management, certain syntax errors can prevent proper functionality.

Problematic Configuration

exec swayidle -w \
    timeout 600 'waylock -fork-on-lock'\       
    timeout 900 'swaymsg "output * power off"'\
    resume 'swaymsg "output * dpms on"'\
    before-sleep 'waylock'

Issues:

Corrected Configuration

exec swayidle -w \
    timeout 600 'waylock' \
    timeout 900 'swaymsg "output * power off"' \
    resume 'swaymsg "output * power on"' \
    before-sleep 'waylock'

Power vs DPMS Commands

Modern approach (recommended):

Legacy approach (still works):

Both achieve the same result, but power commands are preferred for new configurations as they use modern Wayland-native protocols and are more future-proof.

Back to the top ↑