mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
sway: deploy start-sway system-wide and fix runtime warnings
- Move start-sway to /usr/local/bin so emptty resolves it without a user PATH (it runs the launcher with an absolute path). The role copies the script as root; the user dotfile entry is removed. - Fix runtime errors / deprecations in sway/config: tiling_drag accepts only enable|disable|toggle; new_window / new_float have been superseded by default_border / default_floating_border. - Simplify workspace names to numeric only; waybar already maps them to roman numerals via format-icons. - Update cleanup-sway.sh to remove /usr/local/bin/start-sway and the emptty session entry together as system files. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -22,11 +22,13 @@ xorg-server-xwayland
|
||||
SWAY_DOTFILES="
|
||||
$HOME/.config/sway
|
||||
$HOME/.config/waybar
|
||||
$HOME/.local/bin/start-sway
|
||||
$HOME/.cache/cliphist
|
||||
"
|
||||
|
||||
EMPTTY_SESSION=/etc/emptty/wayland-sessions/sway.desktop
|
||||
SWAY_SYSTEM_FILES="
|
||||
/etc/emptty/wayland-sessions/sway.desktop
|
||||
/usr/local/bin/start-sway
|
||||
"
|
||||
|
||||
confirm() {
|
||||
printf '%s [y/N] ' "$1"
|
||||
@@ -65,12 +67,12 @@ for d in $SWAY_DOTFILES; do
|
||||
printf ' %s\n' "$d"
|
||||
fi
|
||||
done
|
||||
printf '\nEmptty session entry:\n'
|
||||
if [ -e "$EMPTTY_SESSION" ]; then
|
||||
printf ' %s\n' "$EMPTTY_SESSION"
|
||||
else
|
||||
printf ' (absent)\n'
|
||||
fi
|
||||
printf '\nSystem files to remove:\n'
|
||||
for f in $SWAY_SYSTEM_FILES; do
|
||||
if [ -e "$f" ] || [ -L "$f" ]; then
|
||||
printf ' %s\n' "$f"
|
||||
fi
|
||||
done
|
||||
printf '\nShared (NOT removed): dunst, rofi, alacritty, xfce4-screenshooter and their configs.\n\n'
|
||||
|
||||
confirm 'Proceed?' || { printf 'Aborted.\n'; exit 0; }
|
||||
@@ -86,8 +88,10 @@ for d in $SWAY_DOTFILES; do
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -e "$EMPTTY_SESSION" ]; then
|
||||
sudo rm -f -- "$EMPTTY_SESSION"
|
||||
fi
|
||||
for f in $SWAY_SYSTEM_FILES; do
|
||||
if [ -e "$f" ] || [ -L "$f" ]; then
|
||||
sudo rm -f -- "$f"
|
||||
fi
|
||||
done
|
||||
|
||||
printf '\nDone.\n'
|
||||
|
||||
Reference in New Issue
Block a user