Update dotfiles/.local/bin/install-dotfiles

This commit is contained in:
Brian Zalewski 2022-11-01 06:35:01 +00:00
parent 3d5591a549
commit 552475467e

View file

@ -3,7 +3,7 @@
if [ -f '/etc/qubes-release' ]; then if [ -f '/etc/qubes-release' ]; then
# Qubes dom0 # Qubes dom0
qvm-create --label red --template debian-11 provision &> /dev/null || EXIT_CODE=$? qvm-create --label red --template debian-11 provision &> /dev/null || EXIT_CODE=$?
qvm-run --pass-io provision 'if [ -d ~/Downloads/professor-dotfiles ]; then cd ~/Downloads/professor-dotfiles && git config pull.rebase false && git pull origin master; else git clone https://gitlab.com/megabyte-labs/dotfiles.git ~/Downloads/professor-dotfiles; fi; cd ~/Downloads; tar -zcvf /tmp/professor-dotfiles.tar.gz professor-dotfiles' qvm-run --pass-io provision 'if [ -d ~/Downloads/professor-dotfiles ]; then cd ~/Downloads/professor-dotfiles && git config pull.rebase false && rm -rf dotfiles/.local/asdf && git clone https://github.com/asdf-vm/asdf.git dotfiles/.local/asdf --branch v0.10.2 && git pull origin master; else git clone https://gitlab.com/megabyte-labs/dotfiles.git ~/Downloads/professor-dotfiles; git clone https://github.com/asdf-vm/asdf.git ~/Downloads/professor-dotfiles/dotfiles/.local/asdf --branch v0.10.2; fi; cd ~/Downloads; tar -zcvf /tmp/professor-dotfiles.tar.gz professor-dotfiles'
qvm-run --pass-io provision "cat /tmp/professor-dotfiles.tar.gz" > "/tmp/dotfiles.tar.gz" qvm-run --pass-io provision "cat /tmp/professor-dotfiles.tar.gz" > "/tmp/dotfiles.tar.gz"
tar -xzf "/tmp/dotfiles.tar.gz" -C "$HOME" tar -xzf "/tmp/dotfiles.tar.gz" -C "$HOME"
rm -f "/tmp/dotfiles.tar.gz" rm -f "/tmp/dotfiles.tar.gz"
@ -16,12 +16,15 @@ else
if [ -d /usr/local/src/professor-dotfiles/.git ]; then if [ -d /usr/local/src/professor-dotfiles/.git ]; then
cd /usr/local/src/professor-dotfiles cd /usr/local/src/professor-dotfiles
${SUDO_PREFIX} git config pull.rebase false ${SUDO_PREFIX} git config pull.rebase false
${SUDO_PREFIX} rm -rf dotfiles/.local/asdf
${SUDO_PREFIX} git clone https://github.com/asdf-vm/asdf.git dotfiles/.local/asdf --branch v0.10.2
${SUDO_PREFIX} git pull origin master ${SUDO_PREFIX} git pull origin master
${SUDO_PREFIX} chown -Rf "$USER":"$(id -g -n)" /usr/local/src/professor-dotfiles ${SUDO_PREFIX} chown -Rf "$USER":"$(id -g -n)" /usr/local/src/professor-dotfiles
cd ~/ cd ~/
else else
${SUDO_PREFIX} rm -rf /usr/local/src/professor-dotfiles ${SUDO_PREFIX} rm -rf /usr/local/src/professor-dotfiles
${SUDO_PREFIX} git clone https://gitlab.com/megabyte-labs/dotfiles.git /usr/local/src/professor-dotfiles ${SUDO_PREFIX} git clone https://gitlab.com/megabyte-labs/dotfiles.git /usr/local/src/professor-dotfiles
${SUDO_PREFIX} git clone https://github.com/asdf-vm/asdf.git /usr/local/src/professor-dotfiles/dotfiles/.local/asdf --branch v0.10.2
${SUDO_PREFIX} chown -Rf "$USER":"$(id -g -n)" /usr/local/src/professor-dotfiles ${SUDO_PREFIX} chown -Rf "$USER":"$(id -g -n)" /usr/local/src/professor-dotfiles
fi fi
fi fi
@ -54,10 +57,10 @@ if [ -d /Applications ] && [ -d /System ]; then
plutil -replace Window\ Settings.Betelgeuse -xml "$theme" ~/Library/Preferences/com.apple.Terminal.plist plutil -replace Window\ Settings.Betelgeuse -xml "$theme" ~/Library/Preferences/com.apple.Terminal.plist
defaults write com.apple.Terminal "Default Window Settings" -string "Betelgeuse" defaults write com.apple.Terminal "Default Window Settings" -string "Betelgeuse"
defaults write com.apple.Terminal "Startup Window Settings" -string "Betelgeuse" defaults write com.apple.Terminal "Startup Window Settings" -string "Betelgeuse"
/usr/libexec/PlistBuddy -c "Delete :Window\ Settings:Betelgeuse:columnCount" ~/Library/Preferences/com.apple.Terminal.plist /usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betelgeuse:columnCount integer 124" ~/Library/Preferences/com.apple.Terminal.plist
/usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betelgeuse:columnCount integer 35" ~/Library/Preferences/com.apple.Terminal.plist /usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betelgeuse:rowCount integer 35" ~/Library/Preferences/com.apple.Terminal.plist
/usr/libexec/PlistBuddy -c "Delete :Window\ Settings:Betelgeuse:rowCount" ~/Library/Preferences/com.apple.Terminal.plist /usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betelgeuse\ (Bash):columnCount integer 124" ~/Library/Preferences/com.apple.Terminal.plist
/usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betelgeuse:rowCount integer 124" ~/Library/Preferences/com.apple.Terminal.plist /usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betelgeuse\ (Bash):rowCount integer 35" ~/Library/Preferences/com.apple.Terminal.plist
# Desktop background # Desktop background
curl -sSL https://gitlab.com/megabyte-labs/misc/betelgeuse/-/raw/master/share/wallpapers/Next/contents/source.jpg > "$HOME/.local/theme/background.jpg" curl -sSL https://gitlab.com/megabyte-labs/misc/betelgeuse/-/raw/master/share/wallpapers/Next/contents/source.jpg > "$HOME/.local/theme/background.jpg"