Migrate full DMS personalization on Ubuntu 24.04
This commit is contained in:
+22
-3
@@ -6,6 +6,9 @@ state_home="${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||
backup_root="$state_home/niri-beyond-glass/backups"
|
||||
original_root="$state_home/niri-beyond-glass/original"
|
||||
latest=""
|
||||
profile="$state_home/niri-beyond-glass/nix-profile"
|
||||
|
||||
systemctl --user disable --now dms.service 2>/dev/null || true
|
||||
|
||||
if [[ -e "$original_root/.captured" ]]; then
|
||||
latest="$original_root"
|
||||
@@ -19,8 +22,23 @@ rm -rf \
|
||||
"$config_home/fuzzel" \
|
||||
"$config_home/mako" \
|
||||
"$config_home/swaylock" \
|
||||
"$config_home/niri-beyond-glass"
|
||||
rm -f "$HOME/.local/bin/niri-beyond-wallpaper"
|
||||
"$config_home/niri-beyond-glass" \
|
||||
"$config_home/DankMaterialShell" \
|
||||
"$config_home/alacritty"
|
||||
rm -f "$config_home/systemd/user/dms.service"
|
||||
rm -rf "$state_home/DankMaterialShell"
|
||||
|
||||
for binary in dms quickshell qs matugen dgop dsearch; do
|
||||
link="$HOME/.local/bin/$binary"
|
||||
if [[ -L "$link" && "$(readlink "$link")" == "$profile/"* ]]; then
|
||||
rm -f "$link"
|
||||
fi
|
||||
done
|
||||
rm -f \
|
||||
"$HOME/.local/bin/niri-beyond-wallpaper" \
|
||||
"$HOME/.local/bin/niri-beyond-browser" \
|
||||
"$HOME/.local/bin/niri-beyond-refresh"
|
||||
rm -f "$state_home/niri-beyond-glass"/nix-profile*
|
||||
|
||||
if [[ -n "$latest" && -d "$latest/config" ]]; then
|
||||
cp -a "$latest/config/." "$config_home/"
|
||||
@@ -29,4 +47,5 @@ else
|
||||
printf '配置已移除;没有找到可恢复的备份。\n'
|
||||
fi
|
||||
|
||||
printf 'Niri 和系统软件包被保留。GNOME/GDM 未修改。\n'
|
||||
systemctl --user daemon-reload 2>/dev/null || true
|
||||
printf '已移除项目专用 DMS 运行层。Niri 和系统软件包被保留,GNOME/GDM 未修改。\n'
|
||||
|
||||
Reference in New Issue
Block a user