~/swaydesk/guide/config

Configuration

The Sway and bar configuration comes with the package and is updated with it. What’s yours lives in a few files in your home folder, which the first login creates and updates never overwrite.

FileWhat it holds
~/.config/swaydesk/config.tomlLanguage, theme, icons, accent color, weather city, holidays, file manager, shortcut profile and the components turned off
~/.config/sway/config.d/50-local.confMonitors, keyboard, mouse, startup apps and app workspaces
~/.config/swaydesk/displays.jsonYour screens for each set of monitors, saved by the Displays app
~/.config/sway-dock/config.tomlThe dock mode and size

Most of this can also be changed without editing a file, in Settings: each panel writes only its own keys in these same files and keeps your comments. The keyboard and mouse you pick there go into ~/.config/sway/config.d/80-input.conf, which wins over 50-local.conf.

Before 0.1.4, the swaydesk folders were called sway-desktop: ~/.config/sway-desktop, and the same in ~/.local/share and ~/.local/state. The first login on 0.1.4 moves them to swaydesk and leaves the old names as links to the new folders, so the old paths keep working. If a file is in both the old and the new folder, nothing moves, the old folder stays in use, and the session log says so (grep kept: ~/.local/state/sway/sway.log); merge the two folders by hand to switch.

Desktop settings

~/.config/swaydesk/config.toml applies to every piece of Swaydesk. The easiest way to change the theme and the color is the Desktop Theme app, which writes this file for you. From a terminal, swaydesk-theme does the same:

swaydesk-theme families                  # the installed theme families
swaydesk-theme pick Adwaita dark teal    # family, light or dark, and color
swaydesk-theme current                   # the theme, icons and color in use
swaydesk-theme cursor 32                 # the cursor size; with no number, the sizes the cursor theme has

The colors are the Papirus folder colors; swaydesk-theme colors lists them all.

The cursor size is in the app too, in the Cursor size list below the icons, which shows only the sizes your cursor theme has. A choice applies at once, without Apply: GTK 4 and Qt 6 apps follow right away, and older ones (GTK 3, Qt 5, Electron and X11 apps) when you open them again. A seat line of your own in ~/.config/sway/config.d/50-local.conf wins, and comes back at the next reload or login.

Here’s a sample file with the keys you can change by hand:

# Language for text, dates and the weather. Empty: the system language
locale = "en_US"

# City for the weather forecast. Empty: based on your IP address
weather_location = "Lisbon"

# Country for calendar holidays. Empty: from the language. "none": no holidays
holidays = "US"

# GTK theme, icons and accent color
gtk_theme = "Adwaita-dark"
icon_theme = "Papirus-Dark"
accent = "#199ca8"

# true: the accent color comes from the wallpaper and changes with it. Without this key, it's on while the
# accent is the default and there's a wallpaper, and off otherwise
accent_auto = true

# Papirus folder color, such as "teal". Empty: the closest to the accent
folder_color = ""

# File manager for Ctrl+Alt+E, the app grid and the dock. Empty: the first one installed
file_manager = "thunar"

# Power profiles in the System popup: "auto" (the default) only without a battery, "always" or "never"
power_profiles_in_system = "auto"

# Cursor size in pixels, from 16 to 96 (24 by default)
cursor_size = 24

# Cursor theme: any installed one (a folder with cursors/). Empty: the automatic one (Bibata on Debian and
# Ubuntu, Capitaine on Arch)
cursor_theme = ""

Programs read the file when they start. After editing it by hand:

A bad value doesn’t break anything: that piece just uses the default for that key.

On a computer without a battery, the battery icon leaves the bar, and with it the profile buttons of its popup. So the System popup gets a Power profile row with the profiles power-profiles-daemon offers (Power saver, Balanced and, where the hardware supports it, Performance): a click changes the profile without closing the popup. Without the daemon, the row doesn’t show. With "always" it shows on laptops too; the battery popup keeps its buttons either way.

Turning components off

Every Swaydesk component starts on, except the input method (below). The Desktop panel of Settings has a switch for each. To turn one off by hand, set its key to false in the [enabled] section of ~/.config/swaydesk/config.toml; the bar modules go in [enabled.bar]:

[enabled]
dock = false            # the dock
bing_wallpaper = false  # the wallpaper of the day

[enabled.bar]
weather = false         # the weather on the bar
[enabled] keyWhat it turns off
dockThe dock
app_gridThe app grid (tapping Super)
switcherThe Alt+Tab card
notificationsThe notification service
osdThe volume and brightness indicator
clipboard_historyThe clipboard history
nightlightThe night light
bing_wallpaperThe wallpaper of the day
polkit_agentThe polkit agent (the administrator password)
update_notifierThe update notifier
displaysThe automatic screen profiles; the Displays app stays
autostartThe apps in ~/.config/autostart and /etc/xdg/autostart (see below)
input_methodOff unless set to true: then the session starts the fcitx5 input method (see below)

The [enabled.bar] keys are the bar modules: weather, clock, media, recording, notifications, clipboard, language, system, brightness, caffeine, bluetooth, network, volume, battery, power and, on Arch, updates. The workspaces and the tray are always there.

A change applies at your next login. A missing key stays on (except input_method), and a mistake in the file never turns anything off. In the Help (Super+F1), the card of a component that’s off says “Turned off” and how to turn it back on. The Components page shows each one’s key.

Apps that start at login

The session starts the apps of the XDG autostart folders, ~/.config/autostart and /etc/xdg/autostart, as GNOME and KDE do, and closes them when you log out. The entries for what Swaydesk already covers (blueman, nm-applet, the mate and lxpolkit polkit agents, xapp-sn-watcher) are skipped, only in the Swaydesk session: GNOME or KDE on the same account still start them. PulseAudio’s own entry is skipped there too, but only when PipeWire is the sound server, where it would just fail.

To keep one app from starting, put a copy of its .desktop file in ~/.config/autostart with Hidden=true, or with NotShowIn=sway; to skip it only in Sway sessions, so GNOME or KDE still start it. To turn all of them off, set autostart = false in [enabled]. A config.toml from an earlier version doesn’t have that key: add the line inside [enabled], before the [enabled.bar] part, since a line below [enabled.bar] belongs to the bar.

Input method (fcitx5)

On Wayland, Chromium, Chrome, Vivaldi, Brave and Electron apps (VS Code, Slack, Discord) ignore ~/.XCompose and compose accents with a table of their own, the en_US one, where ' + c gives ć. The fcitx5 input method gives them ç. With input_method = true in [enabled] and the fcitx5 package installed, the login starts fcitx5 with its own shortcuts, tray icon and notices off, set to the session’s keyboard (the first layout). It follows the keyboard when you change it in 50-local.conf, until you change fcitx5’s input methods yourself (in fcitx5-configtool, for example). Sway still switches the layout with Super+Space, and GTK apps keep composing on their own.

The key is off on a system that installed the packages, and on in the Debian 13 and Arch install images, through /etc/swaydesk/config.toml, which only holds the system’s defaults for [enabled]. A line in your own config.toml wins.

The browsers also need two options, --enable-wayland-ime --wayland-text-input-version=3:

Nothing starts if another input method is set up (GTK_IM_MODULE, QT_IM_MODULE or XMODIFIERS pointing to another one, such as the ibus that Linux Mint’s im-config exports) or if ibus-daemon is already running. If you start ibus from 50-local.conf, turn input_method off. On Linux Mint, to use fcitx5, pick it with im-config -n fcitx5 (with the fcitx5-frontend-gtk3 and fcitx5-frontend-gtk4 packages) and turn the key on.

To turn it off, set input_method = false: it applies at the next login, and the files it created stay. On Arch, the fcitx5 package’s own autostart entry still starts it, as in any session: remove the package, or put a copy of /etc/xdg/autostart/org.fcitx.Fcitx5.desktop in ~/.config/autostart with NotShowIn=sway; (only in Swaydesk) or Hidden=true (in every desktop of the account). On Debian, im-config exports GTK_IM_MODULE=fcitx in every Wayland session while fcitx5 is installed, on any desktop; im-config -n none (or removing fcitx5) goes back to the default.

Machine settings

Sway reads the files in ~/.config/sway/config.d/ last, so whatever is there wins over the package configuration. The first login creates 50-local.conf with commented examples and the system keyboard layout. Edit it and apply with Super+R (or swaymsg reload).

A filled-in example:

# Display: get the output name from `swaymsg -t get_outputs`
output eDP-1 mode 1920x1080@60Hz scale 1

# Keyboard: Brazilian ABNT2 and US International, switched with Super+Space
input type:keyboard {
    xkb_layout  br,us
    xkb_variant abnt2,intl
}

# Mouse: left-handed with natural scrolling
input type:pointer {
    left_handed    enabled
    natural_scroll enabled
}

# Apps to start at login that have no autostart entry (the ones in ~/.config/autostart already start)
exec foot --server

# App workspaces: the app opens there, and you stay where you are
assign [app_id="^org.mozilla.firefox$"] workspace number 2
assign [app_id="^thunderbird$"]         workspace number 9

# To change a shortcut that already exists, use --no-warn
bindsym --no-warn Ctrl+Alt+t exec foot

A few tips:

Keyboard and accents

Launcher searches

The searches in the launcher’s Web tab can be changed in ~/.config/swaydesk/launcher.conf, one key = value per line (# starts a comment):

# a prefix and the search address; %s is the text you type
search = gh https://github.com/search?q=%s
# the search for text without a prefix (without this line, Google)
default = d

A search line with a new prefix adds a search, and one with an existing prefix (g, d, w, yt, gt, cl, gpt) replaces it. The address must start with http:// or https://, contain %s and have no spaces, or the line is ignored; a default with an unknown prefix falls back to Google. The change takes effect the next time you open the launcher.

Displays

The easiest way to set up your screens is the Displays app, in the app grid. Drag the screens on the map, pick each one’s resolution, refresh rate, scale and rotation, and click Apply. Without a click on Keep within 15 seconds, everything goes back to how it was.

Each set of monitors (the laptop alone, the laptop with the office monitor…) keeps its own layout in ~/.config/swaydesk/displays.json, applied by itself when you plug or unplug a screen. With the lid closed and an external monitor on, the laptop screen turns off. The last layout you kept also goes to ~/.config/sway/config.d/90-displays.conf, read after 50-local.conf, so it wins over an output line there. Don’t edit that file by hand: the next Keep rewrites it.

The dock

The dock reads ~/.config/sway-dock/config.toml, which doesn’t exist at first: create it with only what you want to change. After editing, run swaydesk-dock reload.

# overlap: hides when a window needs its space
# auto-hide: hidden until you push the pointer against the edge
# always: always visible
mode = "auto-hide"

icon_size = 40          # from 16 to 128
hide_delay_ms = 400     # delay before hiding, in milliseconds
animation_ms = 200      # slide duration; 0 turns it off

ignore = []             # app_ids that never show on the dock
outputs = ["eDP-1"]     # monitors with a dock; empty: all of them

Pinned apps are listed in ~/.local/share/sway-dock/pinned, but it’s simpler to pin them with a right-click on the dock or in the app grid. The app grid keeps its groups and favorites in ~/.local/share/sway-drawer/.

Updates on Arch

On Arch, the store’s updates part (GNOME Software) is turned off, because the Swaydesk notice takes care of everything: the official repositories, the AUR (through paru or yay, if you already have one installed), Flatpak apps and firmware (fwupd). It checks in the background, shows an icon with the count in the bar and sends a notification when there is something new; nothing is updated on its own. A click (or the notification’s Update button) opens a terminal with the update.

SwayFX on Arch (optional)

SwayFX is Sway with rounded corners, blur and shadows. On Arch it can take Sway’s place, with the same configuration. It comes from the AUR, through an AUR helper:

yay -S swayfx           # or: paru -S swayfx; pacman swaps sway for it
sudo pacman -S sway     # to go back to Sway

swaydesk-desktop stays installed either way, because swayfx provides sway.

Warning: SwayFX comes from the AUR and is maintained by third parties, outside the project’s support. It can lag behind Sway releases, and a pacman -Syu that brings a new wlroots can break it until the AUR catches up. If the session doesn’t start after an update, go back to Sway with sudo pacman -S sway from a text console (Ctrl+Alt+F2).

Swaydesk turns the effects on by itself at the next login. It notices SwayFX and writes ~/.config/sway/config.d/10-effects.conf; with plain Sway the file holds only a comment. The file is written again at every login, when the theme changes, and with swaydesk-desktop-config generate (then run swaymsg reload).

The effects live in the [effects] section of ~/.config/swaydesk/config.toml. A missing key keeps its default:

[effects]
corner_radius = 10      # window and layer corners, in pixels, from 0 (square) to 30
blur = true             # blur behind transparent windows
shadows = true          # a light shadow on windows
layer_blur = false      # blur behind the bar, the dock, popups, notifications and menus
dim_inactive = 0.0      # darken unfocused windows, from 0.0 (not at all) to 1.0

The blur behind the bar, the dock and the popups is off by default, because it showed visual garbage in a virtual machine (virgl). Turn it on with layer_blur = true. Two things never get blur: the invisible layer that closes popups when you click outside them, and the screenshot picker, which has to show the screen sharp.

The login screen

With swaydesk-greeter, the login screen has its own settings, for the whole machine: