this commit adds a lot of shit, look at the shit, too much sorry
Signed-off-by: Menno van Leeuwen <menno@vleeuwen.me>
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
|
||||
source ~/dotfiles/bin/helpers/functions.sh
|
||||
|
||||
printfe "%s\n" "cyan" "Exporting Gnome Terminal preferences"
|
||||
dconf dump /org/gnome/terminal/ > ~/dotfiles/config/gterminal.preferences
|
||||
printfe "%s\n" "cyan" "Exporting GNOME extensions"
|
||||
source ~/dotfiles/bin/helpers/gnome_extensions.sh
|
||||
export_gnome_extensions
|
||||
|
||||
printfe "%s\n" "cyan" "Exporting VSCode extensions"
|
||||
code --list-extensions | jq -R -s -c 'split("\n")[:-1]' > ~/dotfiles/vscode/extensions.json
|
||||
|
@@ -26,7 +26,13 @@ if [[ "$2" == "decrypt" ]]; then
|
||||
|
||||
for file in ~/.ssh/config.d/*.gpg; do
|
||||
filename=$(basename $file .gpg)
|
||||
gpg --quiet --batch --yes --decrypt --passphrase="$password" --output ~/.ssh/config.d/$filename.conf $file
|
||||
|
||||
# Add .conf to the filename but only if it doesn't already have it
|
||||
if [[ $filename != *.conf ]]; then
|
||||
filename="$filename.conf"
|
||||
fi
|
||||
|
||||
gpg --quiet --batch --yes --decrypt --passphrase="$password" --output ~/.ssh/config.d/$filename $file
|
||||
done
|
||||
elif [[ "$2" == "encrypt" ]]; then
|
||||
printfe "%s\n" "cyan" "Encrypting .ssh/config.d/ files..."
|
||||
|
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
source ~/dotfiles/bin/helpers/functions.sh
|
||||
source ~/dotfiles/bin/helpers/keyboard_shortcuts.sh
|
||||
source ~/dotfiles/bin/helpers/apt_packages.sh
|
||||
source ~/dotfiles/bin/helpers/vscode-extensions.sh
|
||||
source ~/dotfiles/bin/helpers/pipx_packages.sh
|
||||
source ~/dotfiles/bin/helpers/cargo_packages.sh
|
||||
source ~/dotfiles/bin/helpers/flatpak_packages.sh
|
||||
source ~/dotfiles/bin/helpers/keyboard_shortcuts.sh
|
||||
source ~/dotfiles/bin/helpers/vscode-extensions.sh
|
||||
source ~/dotfiles/bin/helpers/fonts.sh
|
||||
|
||||
# Check if parameter --verbose was passed
|
||||
if [ "$2" = "--verbose" ]; then
|
||||
@@ -17,7 +19,9 @@ fi
|
||||
echo -e "\n"
|
||||
|
||||
print_keyboard_shortcuts_status
|
||||
print_fonts_status
|
||||
print_apt_status
|
||||
print_pipx_status
|
||||
print_cargo_status
|
||||
print_flatpak_status
|
||||
print_vsc_status
|
||||
|
@@ -10,6 +10,14 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if --verbose was passed
|
||||
if [ "$2" = "--verbose" ]; then
|
||||
export verbose=true
|
||||
printfe "%s\n" "yellow" "Verbose mode enabled"
|
||||
else
|
||||
export verbose=false
|
||||
fi
|
||||
|
||||
####################################################################################################
|
||||
# Update symlinks
|
||||
####################################################################################################
|
||||
@@ -29,11 +37,32 @@ check_or_make_symlink ~/.ssh/config ~/dotfiles/config/ssh/config
|
||||
check_or_make_symlink ~/.ssh/config.d ~/dotfiles/config/ssh/config.d
|
||||
check_or_make_symlink ~/.wezterm.lua ~/dotfiles/config/wezterm.lua
|
||||
|
||||
####################################################################################################
|
||||
# Update system packages
|
||||
####################################################################################################
|
||||
|
||||
printfe "%s\n" "cyan" "Updating system packages..."
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
brew update
|
||||
brew upgrade
|
||||
brew cleanup
|
||||
else
|
||||
sudo nala upgrade -y
|
||||
sudo nala autoremove -y --purge
|
||||
fi
|
||||
|
||||
####################################################################################################
|
||||
# Update packages
|
||||
####################################################################################################
|
||||
|
||||
printfe "%s\n" "cyan" "Oh My Zsh update..."
|
||||
source ~/dotfiles/bin/helpers/ohmyzsh.sh
|
||||
ensure_ohmyzsh_installed
|
||||
|
||||
printfe "%s\n" "cyan" "Rust update..."
|
||||
source ~/dotfiles/bin/helpers/rust.sh
|
||||
ensure_rust_installed
|
||||
|
||||
printfe "%s\n" "cyan" "Ensuring APT repositories are added..."
|
||||
source ~/dotfiles/bin/helpers/apt_packages.sh
|
||||
ensure_repositories
|
||||
@@ -41,6 +70,14 @@ ensure_repositories
|
||||
printfe "%s\n" "cyan" "Ensuring APT packages are installed..."
|
||||
ensure_apt_packages_installed
|
||||
|
||||
printfe "%s\n" "cyan" "Ensuring pipx packages are installed..."
|
||||
source ~/dotfiles/bin/helpers/pipx_packages.sh
|
||||
ensure_pipx_packages_installed
|
||||
|
||||
printfe "%s\n" "cyan" "Ensuring GNOME Extensions are installed..."
|
||||
source ~/dotfiles/bin/helpers/gnome_extensions.sh
|
||||
ensure_gnome_extensions_installed
|
||||
|
||||
printfe "%s\n" "cyan" "Ensuring Cargo packages are installed..."
|
||||
source ~/dotfiles/bin/helpers/cargo_packages.sh
|
||||
ensure_cargo_packages_installed
|
||||
@@ -64,8 +101,9 @@ printfe "%s\n" "cyan" "Setting up keyboard shortcuts..."
|
||||
source ~/dotfiles/bin/helpers/keyboard_shortcuts.sh
|
||||
ensure_keyboard_shortcuts
|
||||
|
||||
# printfe "%s\n" "cyan" "Importing Gnome Terminal preferences..."
|
||||
# cat ~/dotfiles/config/gterminal.preferences | dconf load /org/gnome/terminal/legacy/profiles:/
|
||||
printfe "%s\n" "cyan" "Ensuring fonts are installed..."
|
||||
source ~/dotfiles/bin/helpers/fonts.sh
|
||||
ensure_fonts_installed
|
||||
|
||||
printfe "%s\n" "cyan" "Setting wezterm as default terminal..."
|
||||
if [ ! -f /usr/bin/wezterm ]; then
|
||||
@@ -81,3 +119,13 @@ if [ "$current_terminal" != "/usr/bin/wezterm" ]; then
|
||||
else
|
||||
printfe "%s\n" "green" " - wezterm is already the default terminal"
|
||||
fi
|
||||
|
||||
printfe "%s\n" "cyan" "Setting zsh as default shell..."
|
||||
if [ "$SHELL" != "/usr/bin/zsh" ]; then
|
||||
printfe "%s\n" "yellow" " - Setting zsh as default shell"
|
||||
chsh -s /usr/bin/zsh
|
||||
else
|
||||
printfe "%s\n" "green" " - zsh is already the default shell"
|
||||
fi
|
||||
|
||||
printfe "%s\n" "green" "Update complete!"
|
Reference in New Issue
Block a user