i3 Desktop Part 1: A Curated Session

I curate i3 autostart.

A normal desktop starts many background processes. Some are useful. Others are tray icons, duplicate daemons, or GNOME services. These are not needed in a small i3 session.

The i3 config runs .local/bin/i3-autostart with exec_always. This script sets the session shape. It exports the desktop identity as i3. It sets the default browser to qutebrowser. It sets the terminal to kitty. It sets the editor to nvim. It sets the visual editor to code. It pushes these values into D-Bus activation. Later applications see the same values.

This prevents inconsistent defaults. GUI apps may inherit wrong session data from the login manager. A terminal may know the right browser. A notification action may not. The autostart script provides one set of defaults.

Applying the desktop shape

After setting the environment, i3-autostart calls i3-apply-theme.

This script sets the GTK theme, icon theme, cursor theme, and fonts. It sets the Qt platform theme and cursor settings. It updates gsettings. It merges X resources with xrdb. It starts xsettingsd. This makes GTK applications behave consistently outside GNOME.

The theme applies through mechanisms apps already understand.

The i3 config then starts these desktop pieces:

  • monitor layout with i3-monitor-layout auto --quiet
  • keyboard layout with i3-keyboard-layout apply --quiet
  • wallpaper with i3-wallpaper
  • dunst for notifications
  • CopyQ through i3-start-copyq
  • picom through i3-start-picom
  • xss-lock through i3-start-xss-lock

The order is simple. Set the environment. Apply the system look. Start the services.

Why not only start everything

Adding autostart lines for every annoyance creates problems. The session becomes cluttered. Tray icons appear from unknown packages. Notification daemons compete. A compositor starts twice. A theme applies to only half the apps. Old services keep running.

I start only what this desktop intentionally uses.

Network and Bluetooth are good examples. I do not start tray applets for them. I control them through rofi menus. These menus use nmcli and bluetoothctl. The menu can open the full GUI editor if needed. The daily path stays clean.

CopyQ is another example. I want clipboard history. I do not want the tray icon. The startup wrapper ensures the server runs. It configures CopyQ to hide the tray and main window.

Session recovery

The i3 config uses exec_always for startup pieces. Reloading i3 repairs the desktop.

If I change the config and reload, the theme reapplies. Monitor and keyboard layouts are checked. The wallpaper returns. CopyQ and picom restart safely. xss-lock resets. The helper scripts tolerate being run again.

This makes i3 reload a recovery tool. I do not need to log out for a service error.

There is a tradeoff. exec_always items must avoid duplication. Wrappers like i3-start-picom, i3-start-copyq, and i3-start-xss-lock handle this. They stop or check existing processes before starting new ones.

The desktop as a small system

i3 feels like a desktop, not only a config file.

The window manager handles windows. The autostart script handles the session. The theme script handles appearance. The status bar has its own scripts. Menus wrap command-line tools.

Separating these concerns makes changes easier. I edit the lock script to adjust lock behaviour. I edit autostart to change startup defaults. I add new control centre entries without touching monitor layout or notifications.

This separation keeps the setup understandable.

The desktop starts with a small promise. I start only the things I use. Each part is obvious enough for me to fix later.