mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
Remove i3 desktop profile and st terminal
Elimina completamente la sessione desktop i3 (X11), ormai non più usata (gli host espongono solo sway e Hyprland su Wayland): - ruolo profile_desktop_i3 e voce emptty i3.desktop - desktop_i3_packages e i guard 'i3' in desktop_sessions_enabled - desktop_i3_dotfiles e host_i3_dotfiles (autorandr X11) - dotfiles i3/X11: .xinitrc, i3, i3blocks, picom, polybar, autorandr - task host-specifici i3 (copy dotfiles, wrap prime-run su nymph) - rimuove st (terminale X11 da sorgente) da desktop_void_source_tools - consolida lo script live in scripts/remove_i3.sh, elimina cleanup-i3.sh - aggiorna la documentazione (README/AGENTS/CLAUDE/knowledge) Config Emacs lasciata invariata di proposito. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,103 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
# Remove i3 session artifacts: exclusive packages, dotfiles and the emptty
|
||||
# xsessions entry. Shared resources with sway (dunst, rofi, alacritty,
|
||||
# xfce4-screenshooter) are left untouched.
|
||||
|
||||
set -eu
|
||||
|
||||
I3_PACKAGES="
|
||||
arandr
|
||||
autorandr
|
||||
feh
|
||||
i3
|
||||
i3blocks
|
||||
i3blocks-blocklets
|
||||
i3lock-color
|
||||
i3status
|
||||
picom
|
||||
polybar
|
||||
scrot
|
||||
setxkbmap
|
||||
volumeicon
|
||||
xclip
|
||||
xfce4-clipman-plugin
|
||||
xkbutils
|
||||
xorg-fonts
|
||||
xorg-minimal
|
||||
xss-lock
|
||||
xdotool
|
||||
"
|
||||
|
||||
I3_DOTFILES="
|
||||
$HOME/.config/i3
|
||||
$HOME/.config/i3blocks
|
||||
$HOME/.config/picom
|
||||
$HOME/.config/polybar
|
||||
$HOME/.xinitrc
|
||||
"
|
||||
|
||||
EMPTTY_SESSION=/etc/emptty/xsessions/i3.desktop
|
||||
|
||||
confirm() {
|
||||
printf '%s [y/N] ' "$1"
|
||||
read -r answer
|
||||
case "$answer" in
|
||||
y|Y|yes|YES) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
filter_installed() {
|
||||
for p in $1; do
|
||||
if xbps-query -p pkgver "$p" >/dev/null 2>&1; then
|
||||
printf '%s\n' "$p"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if ! command -v xbps-remove >/dev/null 2>&1; then
|
||||
printf 'Error: xbps-remove not found (not a Void host?)\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
installed=$(filter_installed "$I3_PACKAGES" | tr '\n' ' ' | sed 's/ *$//')
|
||||
|
||||
printf '== i3 cleanup ==\n\n'
|
||||
printf 'Packages to remove (installed only):\n'
|
||||
if [ -n "$installed" ]; then
|
||||
printf ' %s\n' $installed
|
||||
else
|
||||
printf ' (none)\n'
|
||||
fi
|
||||
printf '\nDotfiles to remove:\n'
|
||||
for d in $I3_DOTFILES; do
|
||||
if [ -e "$d" ] || [ -L "$d" ]; then
|
||||
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 '\nShared (NOT removed): dunst, rofi, alacritty, xfce4-screenshooter and their configs.\n\n'
|
||||
|
||||
confirm 'Proceed?' || { printf 'Aborted.\n'; exit 0; }
|
||||
|
||||
if [ -n "$installed" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
sudo xbps-remove -Ry $installed
|
||||
fi
|
||||
|
||||
for d in $I3_DOTFILES; do
|
||||
if [ -e "$d" ] || [ -L "$d" ]; then
|
||||
rm -rf -- "$d"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -e "$EMPTTY_SESSION" ]; then
|
||||
sudo rm -f -- "$EMPTTY_SESSION"
|
||||
fi
|
||||
|
||||
printf '\nDone.\n'
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/bin/sh
|
||||
# Rimuove i3 e relativi dotfiles dall'host corrente.
|
||||
# Eseguire dopo aver verificato che sway funzioni correttamente.
|
||||
# Rimuove i3 (sessione X11) e relativi artefatti dall'host Void corrente:
|
||||
# pacchetti i3-only, dotfiles, voce emptty e profili autorandr host-specifici.
|
||||
# Eseguire dopo aver verificato che sway/Hyprland funzionino correttamente.
|
||||
# I pacchetti condivisi con sway/Hyprland (dunst, rofi, alacritty) NON vengono rimossi.
|
||||
set -e
|
||||
|
||||
HOSTNAME=$(hostname)
|
||||
|
||||
# Pacchetti i3-only (dunst e rofi sono condivisi con sway, non rimossi)
|
||||
# Pacchetti i3-only (X11). dunst/rofi/alacritty sono condivisi e non vengono rimossi.
|
||||
sudo xbps-remove -R arandr autorandr feh i3 i3blocks i3blocks-blocklets \
|
||||
i3lock-color i3status picom polybar scrot setxkbmap volumeicon xclip \
|
||||
xfce4-clipman-plugin xfce4-screenshooter xkbutils xorg-fonts xorg-minimal \
|
||||
@@ -14,15 +16,15 @@ sudo xbps-remove -R arandr autorandr feh i3 i3blocks i3blocks-blocklets \
|
||||
# Dotfiles i3-only
|
||||
rm -rf ~/.config/i3 ~/.config/i3blocks
|
||||
rm -f ~/.config/picom/picom.conf
|
||||
rmdir --ignore-fail-on-non-empty ~/.config/picom
|
||||
rmdir --ignore-fail-on-non-empty ~/.config/picom 2>/dev/null || true
|
||||
rm -f ~/.config/polybar/config.ini ~/.config/polybar/launch.sh
|
||||
rmdir --ignore-fail-on-non-empty ~/.config/polybar
|
||||
rmdir --ignore-fail-on-non-empty ~/.config/polybar 2>/dev/null || true
|
||||
rm -f ~/.xinitrc
|
||||
|
||||
# Session file emptty
|
||||
# Session file emptty (X11)
|
||||
sudo rm -f /etc/emptty/xsessions/i3.desktop
|
||||
|
||||
# Dotfiles host-specifici
|
||||
# Dotfiles host-specifici (autorandr = multi-monitor X11)
|
||||
case "$HOSTNAME" in
|
||||
ikaros|nymph)
|
||||
rm -rf ~/.config/autorandr
|
||||
|
||||
Reference in New Issue
Block a user