From fd512ffcd1206260e8cf17e8bed0273c64658d30 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:42 +0100 Subject: feat(sway): enable swayr auto-tile via systemd user unit Vanilla sway only has splith/splitv with no auto-orientation, so new windows always split along whatever axis the parent container is set to (default splith). The result: opening a third window in a workspace that's already split horizontally just keeps stacking horizontally, even when each pane is now narrower than it is tall. swayr's daemon (swayrd) subscribes to sway IPC and, with [layout].auto_tile = true, issues splith or splitv on the focused container based on its width-vs-height before sway places the next window. The result is the i3/awesome-style spiral tiling: each new window splits the focused pane along its longest side. Run swayrd as a systemd user service bound to sway-session.target so it starts/stops with the session (matching the pattern used by waybar, swayidle, mako, etc.). No keybind changes; only the placement algorithm. --- dot_config/systemd/user/swayrd.service | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dot_config/systemd/user/swayrd.service (limited to 'dot_config/systemd/user') diff --git a/dot_config/systemd/user/swayrd.service b/dot_config/systemd/user/swayrd.service new file mode 100644 index 0000000..82e4164 --- /dev/null +++ b/dot_config/systemd/user/swayrd.service @@ -0,0 +1,15 @@ +[Unit] +Description=swayr daemon (auto-tile + window-switcher IPC client) +Documentation=https://sr.ht/~tsdh/swayr/ +PartOf=graphical-session.target +After=graphical-session.target +ConditionEnvironment=SWAYSOCK + +[Service] +Type=simple +ExecStart=/usr/bin/swayrd +Restart=on-failure +RestartSec=2s + +[Install] +WantedBy=sway-session.target -- cgit v1.3.1