diff options
| author | 2026-05-13 13:43:38 +0100 | |
|---|---|---|
| committer | 2026-05-13 13:43:38 +0100 | |
| commit | af84673c80ae02091009a901770b505e756d002e (patch) | |
| tree | 772269c115c0fb41a32870f19df1c3d404b748d8 /dot_config/sway/config | |
| parent | 2098f17c701b28ce2d0725a1e4837d628f4beb1d (diff) | |
| download | dotfiles-af84673c80ae02091009a901770b505e756d002e.tar.gz dotfiles-af84673c80ae02091009a901770b505e756d002e.tar.bz2 dotfiles-af84673c80ae02091009a901770b505e756d002e.zip | |
refactor(sway): apply display layout natively via include file
Persist the layout as a sway-include file (~/.config/sway/outputs.conf)
so sway's own parser applies output directives natively on every
reload. Eliminates the side-by-side flash that came from sway's
default "enable everything side-by-side" before exec_always could
override it.
- display-toggle.sh: write outputs.conf alongside the live swaymsg
commands, mirroring the same enable/disable/pos directives.
- sway/config: `include ~/.config/sway/outputs.conf` next to the
background line; downgrade exec_always back to plain exec since the
include handles reloads now (script only needs to run once at
startup to bootstrap the include file on first boot).
Diffstat (limited to 'dot_config/sway/config')
| -rw-r--r-- | dot_config/sway/config | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dot_config/sway/config b/dot_config/sway/config index 73283c9..ac7acb3 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -40,6 +40,10 @@ seat * xcursor_theme Adwaita 24 # ── Output ──────────────────────────────────────────────────────────────────── output * bg #282828 solid_color +# Per-output enable/disable/position is written by display-toggle.sh and +# re-read by sway on every reload. Sway's `include` silently no-ops if the +# file doesn't exist (first boot, before the script has run). +include ~/.config/sway/outputs.conf # ── Window rules ────────────────────────────────────────────────────────────── for_window [class="feh"] floating enable @@ -238,7 +242,7 @@ bindsym $mod+t exec ~/.config/sway/tb-toggle.sh # ── Autostart ───────────────────────────────────────────────────────────────── exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP PASSWORD_STORE_DIR exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP PASSWORD_STORE_DIR -exec_always "sleep 2 && ~/.config/sway/display-toggle.sh apply" +exec "sleep 2 && ~/.config/sway/display-toggle.sh apply" exec systemctl --user start sway-session.target exec ~/.config/sway/tb-autostart.sh |
