Make migrations faster to skip if they've already been run

This commit is contained in:
David Heinemeier Hansson
2025-07-20 17:36:29 -05:00
parent 5b3c324350
commit 9b8569e537
16 changed files with 67 additions and 45 deletions

View File

@ -1,4 +1,6 @@
echo "Fixing persistent workspaces in waybar config"
sed -i 's/"persistent_workspaces":/"persistent-workspaces":/' ~/.config/waybar/config
pkill waybar
setsid waybar >/dev/null 2>&1 &
if [[ -f ~/.config/waybar/config ]]; then
sed -i 's/"persistent_workspaces":/"persistent-workspaces":/' ~/.config/waybar/config
pkill -SIGUSR2 waybar
fi

View File

@ -1,2 +1,5 @@
echo "Installing missing fd terminal tool for finding files"
yay -S --noconfirm --needed fd
if ! command -v fd &>/dev/null; then
yay -S --noconfirm --needed fd
fi

View File

@ -1,2 +1,5 @@
echo "Add LocalSend as new default application"
yay -S --noconfirm --needed localsend-bin
if ! command -v localsend &>/dev/null; then
yay -S --noconfirm --needed localsend-bin
fi

View File

@ -1,2 +1,5 @@
echo "Install ffmpegthumbnailer for video thumbnails in the file manager"
yay -S --noconfirm --needed ffmpegthumbnailer
if ! command -v ffmpegthumbnailer &>/dev/null; then
yay -S --noconfirm --needed ffmpegthumbnailer
fi

View File

@ -1,2 +1,5 @@
echo "Install bash-completion"
yay -S --noconfirm --needed bash-completion
if ! pacman -Q bash-completion &>/dev/null; then
yay -S --noconfirm --needed bash-completion
fi

View File

@ -1,2 +1,5 @@
echo "Adding gnome-keyring to make 1password work with 2FA codes"
yay -S --noconfirm --needed gnome-keyring
if ! command -v gnome-keyring &>/dev/null; then
yay -S --noconfirm --needed gnome-keyring
fi

View File

@ -1,18 +1,19 @@
echo "Update to use UWSM and seamless login"
sudo rm /etc/systemd/system/getty@tty1.service.d/override.conf
sudo rmdir /etc/systemd/system/getty@tty1.service.d/ 2>/dev/null || true
if ! command -v uwsm &>/dev/null; then
sudo rm -f /etc/systemd/system/getty@tty1.service.d/override.conf
sudo rmdir /etc/systemd/system/getty@tty1.service.d/ 2>/dev/null || true
if [ -f "$HOME/.bash_profile" ]; then
if [ -f "$HOME/.bash_profile" ]; then
# Remove the specific line
sed -i '/^\[\[ -z \$DISPLAY && \$(tty) == \/dev\/tty1 \]\] && exec Hyprland$/d' "$HOME/.bash_profile"
echo "Cleaned up .bash_profile"
fi
fi
if [ -f "$HOME/.config/environment.d/fcitx.conf" ]; then
if [ -f "$HOME/.config/environment.d/fcitx.conf" ]; then
echo "Removing GTK_IM_MODULE from fcitx config for Wayland..."
sed -i 's/^GTK_IM_MODULE=fcitx$//' "$HOME/.config/environment.d/fcitx.conf"
fi
omarchy-refresh-plymouth -y
source ~/.local/share/omarchy/install/login.sh
fi
omarchy-refresh-plymouth -y
source ~/.local/share/omarchy/install/login.sh

View File

@ -1,13 +1,5 @@
echo "Add new matte black theme"
BACKGROUNDS_DIR=~/.config/omarchy/backgrounds/
download_background_image() {
local url="$1"
local path="$2"
gum spin --title "Downloading $url as $path..." -- curl -sL -o "$BACKGROUNDS_DIR/$path" "$url"
}
if [[ ! -L "~/.config/omarchy/themes/matte-black" ]]; then
ln -snf ~/.local/share/omarchy/themes/matte-black ~/.config/omarchy/themes/
source ~/.local/share/omarchy/themes/matte-black/backgrounds.sh
fi

View File

@ -1,2 +0,0 @@
echo "Use latest Omarchy Waybar configuration"
omarchy-refresh-waybar

View File

@ -1,2 +1,5 @@
echo "Install missing docker-buildx package for out-of-the-box Kamal compatibility"
yay -S --noconfirm --needed docker-buildx
if ! docker buildx version &>/dev/null; then
yay -S --noconfirm --needed docker-buildx
fi

View File

@ -1,15 +1,17 @@
echo "Prevent docker from requiring network readiness on boot"
sudo mkdir -p /etc/systemd/system/docker.service.d/
sudo tee /etc/systemd/system/docker.service.d/no-block-boot.conf <<'EOF'
if [[ ! -f /etc/systemd/system/docker.service.d/no-block-boot.conf ]]; then
sudo mkdir -p /etc/systemd/system/docker.service.d/
sudo tee /etc/systemd/system/docker.service.d/no-block-boot.conf <<'EOF'
[Unit]
DefaultDependencies=no
EOF
sudo mkdir -p /etc/systemd/system/plymouth-quit.service.d/
sudo tee /etc/systemd/system/plymouth-quit.service.d/wait-for-graphical.conf <<'EOF'
sudo mkdir -p /etc/systemd/system/plymouth-quit.service.d/
sudo tee /etc/systemd/system/plymouth-quit.service.d/wait-for-graphical.conf <<'EOF'
[Unit]
After=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl mask plymouth-quit-wait.service
sudo systemctl daemon-reload
sudo systemctl mask plymouth-quit-wait.service
fi

View File

@ -1,2 +1,5 @@
echo "Install slurp + wl-screenrec for new ALT+PrintScreen screen recorder"
yay -S --noconfirm --needed slurp wl-screenrec
if ! command -v wl-screenrec &>/dev/null || ! command -v slurp &>/dev/null; then
yay -S --noconfirm --needed slurp wl-screenrec
fi

View File

@ -1,4 +1,4 @@
echo "Remove needless fcitx5-configtool package"
if command -v fcitx5-configtool &>/dev/null; then
if yay -Qe fcitx5-configtool &>/dev/null; then
yay -Rns --noconfirm fcitx5-configtool
fi

View File

@ -1,2 +1,5 @@
echo "Install satty for the new screenshot flow"
yay -S --noconfirm --needed satty
if ! command -v satty &>/dev/null; then
yay -S --noconfirm --needed satty
fi

View File

@ -1,2 +1,5 @@
echo "Add missing libappindicator-gtk3 for Dropbox icon tray to work right"
yay -S --noconfirm --needed libappindicator-gtk3
if ! pacman -Q libappindicator-gtk3 &>/dev/null; then
yay -S --noconfirm --needed libappindicator-gtk3
fi

View File

@ -1,6 +1,6 @@
echo "Replace wofi with walker as the default launcher"
if [[ ! -d ~/.config/walker ]]; then
if ! command -v walker &>/dev/null; then
yay -Sy --noconfirm --needed walker-bin libqalculate
yay -Rns --noconfirm wofi