Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
16 changes: 0 additions & 16 deletions .config/libreoffice/4/user/config/javasettings_Linux_X86_64.xml

This file was deleted.

13 changes: 3 additions & 10 deletions .config/zsh/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,12 @@ if [[ "$OSTYPE" == "linux"* ]]; then
fi

if [[ "$DISTRO" == "arch" || "$DISTRO" == "manjaro" ]]; then
flags="-S --noconfirm --needed"
# shellcheck disable=SC2139
alias \$pac="sudo pacman $flags"
# shellcheck disable=SC2139
alias \$yay="yay $flags"
\$pac() { sudo pacman -S --noconfirm --needed "$@"; }
\$yay() { yay -S --noconfirm --needed "$@"; }
fi

if [[ "$DISTRO" == "ubuntu"* ]]; then
# This works, its generally not recomended since now i cannot access variable with the same name, but that does not matter to me
flags="-y"
apt="sudo apt-get $flags install"
# shellcheck disable=SC2139,SC2086
alias \$apt="$apt"
\$apt() { sudo apt-get -y install "$@"; }
fi
fi

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@
.config/libreoffice/4/user/GraphicsRenderTests.log
.config/libreoffice/4/user/autotext/
.config/libreoffice/4/user/basic/
.config/libreoffice/4/user/config/javasettings_Linux_X86_64.xml
.config/libreoffice/4/user/database/
.config/libreoffice/4/user/extensions/
.config/libreoffice/4/user/gallery/
Expand Down
1 change: 1 addition & 0 deletions .local/scripts/bootstrap/arch_functions
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ base_install () {
gcc # C++
gdb # Debugging C++
git
github-cli # GitHub CLI
npm
python
python-pipenv
Expand Down
1 change: 1 addition & 0 deletions .local/scripts/bootstrap/mac_functions
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ mac_install () {
eza # ls on steroids (exa replacement)
flex
fzf # Fuzzy finder
gh # GitHub CLI
git
go
gpg
Expand Down
8 changes: 0 additions & 8 deletions .local/scripts/bootstrap/tmp/emacs_ubuntu.sh

This file was deleted.

1 change: 1 addition & 0 deletions .local/scripts/bootstrap/ubuntu_functions
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ base_install () {
file
fonts-powerline
fzf # Fuzzy finder
gh # GitHub CLI
git
git-lfs
gnome-shell
Expand Down
28 changes: 28 additions & 0 deletions .local/scripts/bootstrap/uninstall_arch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Arch bootstrap UNINSTALL
# Author: https://github.com/cuberhaus
set -euo pipefail

### VARIABLES
scripts="$HOME/.local/scripts"
source "$scripts/bootstrap/base_functions"
source "$scripts/bootstrap/uninstall_tui"
source "$scripts/bootstrap/uninstall_arch_functions"

### UNINSTALLATION
run_selected_uninstalls "Arch Uninstaller" \
base_uninstall "Base packages (cmake, bat, fzf, kitty, vim, ...)" OFF \
arch_uninstall "Arch drivers & services (NVIDIA, CUPS, Bluetooth)" OFF \
i3_uninstall "i3 window manager (i3-gaps, i3blocks, rofi, ...)" OFF \
xmonad_uninstall "xmonad window manager (xmobar, trayer, dmenu)" OFF \
vim_uninstall "Vim / Neovim extras (ctags, formatters, ...)" OFF \
laptop_uninstall "Laptop packages (TLP)" OFF \
dwall_uninstall "Dynamic wallpapers" OFF \
papirus_uninstall "Papirus folder icons" OFF \
emacs_uninstall "Emacs & Doom Emacs" OFF

if [ "$(basename "$SHELL")" == "zsh" ]; then
info "Currently using zsh. To revert to bash, run: chsh -s \$(which bash)"
fi

info "Uninstallation complete. A system reboot is recommended."
151 changes: 151 additions & 0 deletions .local/scripts/bootstrap/uninstall_arch_functions
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
#! /usr/bin/env bash
# Arch bootstrap UNINSTALL functions
# Author: https://github.com/cuberhaus

pac_remove="sudo pacman -Rns --noconfirm"
yay_remove="yay -Rns --noconfirm"

###############################################################
# => Base packages uninstall
###############################################################
base_uninstall() {
info "Uninstalling base packages..."

$pac_remove cmake opencl-headers bazel cudnn cuda conky \
adapta-gtk-theme arc-gtk-theme arc-icon-theme \
bat biber breeze calibre cron dconf-editor dex discord dnsutils github-cli \
dunst eza exfat-utils file-roller firefox fzf gcc gdb \
gnome-calculator gnome-font-viewer gnome-keyring gtk2 gtk3 \
gucharmap gvim hardinfo cpu-x htop inotify-tools kcolorchooser \
kdiff3 kitty kvantum-qt5 laptop-detect \
libmythes mythes-en mythes-es \
libreoffice-still libreoffice-still-ca lxappearance ncdu \
nemo nemo-fileroller nemo-preview nemo-seahorse nemo-share \
net-tools nilfs-utils nomacs noto-fonts-emoji npm ntfs-3g \
okular papirus-icon-theme partitionmanager perl-file-mimeinfo \
playerctl polkit polkit-gnome python python-pipenv python3 \
qt5ct ranger rclone reflector remmina freerdp libvncserver \
ruby seahorse speedcrunch stow svn the_silver_searcher \
thunderbird tmux transmission-gtk trash-cli \
ttf-dejavu ttf-liberation ttf-droid ttf-ubuntu-font-family ttf-roboto noto-fonts \
tumbler ffmpegthumbnailer raw-thumbnailer udftools udiskie \
dolphin udisks2 vlc w3m wget wireshark wmctrl xclip xdg-user-dirs \
xfce4-clipman-plugin xorg xorg-xinit xss-lock yarn zsh \
zathura-cb zathura-djvu zathura-pdf-mupdf zathura-ps zathura \
kalk solaar telegram obsidian virt-viewer || true

# AUR packages
$yay_remove caffeine-ng florence downgrade balena-etcher-appimage \
woeusb-ng betterlockscreen google-chrome microsoft-edge-stable-bin \
libreoffice-extension-languagetool timeshift tomighty ttf-ms-fonts || true

git config --global --unset credential.helper || true
}

###############################################################
# => Arch-specific packages uninstall
###############################################################
arch_uninstall() {
info "Uninstalling Arch-specific packages..."

$pac_remove xorg-xrandr arandr autorandr \
linux-headers nvidia nvidia-utils xf86-video-intel mesa lib32-mesa \
lib32-nvidia-utils nvidia-settings \
cups system-config-printer \
bluez bluez-utils blueberry \
lightdm-gtk-greeter lightdm lightdm-gtk-greeter-settings \
networkmanager nm-connection-editor || true

$yay_remove pulseaudio-modules-bt || true

# Disable services (ignore errors if already disabled)
sudo systemctl disable org.cups.cupsd.service 2>/dev/null || true
sudo systemctl disable bluetooth.service 2>/dev/null || true
sudo systemctl disable lightdm.service 2>/dev/null || true
sudo systemctl disable NetworkManager.service 2>/dev/null || true
}

###############################################################
# => i3 uninstall
###############################################################
i3_uninstall() {
info "Uninstalling i3..."

$pac_remove acpi awk bc upower feh flameshot i3-gaps i3blocks \
light picom rofi yad xdotool zenity \
perl-anyevent-i3 python-dbus || true

$yay_remove cava kbdd-git || true
}

###############################################################
# => xmonad uninstall
###############################################################
xmonad_uninstall() {
info "Uninstalling xmonad..."

$pac_remove dmenu trayer xmobar xmonad-contrib xorg-xmessage || true

sudo rm -f /etc/pacman.d/hooks/xmonad.hook
}

###############################################################
# => Vim/neovim uninstall
###############################################################
vim_uninstall() {
info "Uninstalling vim/neovim extras..."

$pac_remove neovim ctags astyle autopep8 yapf cmake-format shfmt \
stylish-haskell tidy python-pip || true

sudo npm uninstall -g neovim js-beautify remark-cli 2>/dev/null || true
sudo gem uninstall neovim 2>/dev/null || true
}

###############################################################
# => Laptop packages uninstall
###############################################################
laptop_uninstall() {
info "Uninstalling laptop packages..."

$pac_remove tlp || true
sudo systemctl disable tlp.service 2>/dev/null || true
}

###############################################################
# => Dynamic wallpapers uninstall
###############################################################
dwall_uninstall() {
info "Removing dynamic wallpapers..."
sudo rm -rf /usr/share/dynamic-wallpaper 2>/dev/null || true
rm -rf "$HOME/.local/share/dynamic-wallpaper" 2>/dev/null || true
}

###############################################################
# => Papirus folders uninstall
###############################################################
papirus_uninstall() {
info "Removing papirus-folders..."
if [ -x /usr/local/bin/papirus-folders ]; then
wget -qO- https://git.io/papirus-folders-install | env uninstall=true sh || true
fi
}

###############################################################
# => Emacs uninstall
###############################################################
emacs_uninstall() {
info "Uninstalling Emacs..."

systemctl --user disable emacs 2>/dev/null || true

$pac_remove emacs-nativecomp aspell aspell-ca aspell-de aspell-en aspell-es \
ispell pandoc languagetool mplayer shellcheck python-pipenv prettier \
ripgrep fd || true

sudo npm uninstall -g markdownlint textlint 2>/dev/null || true

rm -rf "$HOME/.emacs.d" 2>/dev/null || true
rm -rf "$HOME/.config/doom-emacs" 2>/dev/null || true
rm -f "$HOME/.config/chemacs/profile" 2>/dev/null || true
}
22 changes: 22 additions & 0 deletions .local/scripts/bootstrap/uninstall_mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# macOS bootstrap UNINSTALL
# Author: https://github.com/cuberhaus
set -euo pipefail

### VARIABLES
scripts="$HOME/.local/scripts"
source "$scripts/bootstrap/base_functions"
source "$scripts/bootstrap/uninstall_tui"
source "$scripts/bootstrap/uninstall_mac_functions"

### UNINSTALLATION
run_selected_uninstalls "macOS Uninstaller" \
cli_uninstall "CLI tools (bat, fzf, ripgrep, stow, ...)" OFF \
fonts_uninstall "Nerd Fonts (Fira Code, Iosevka, Meslo, ...)" OFF \
gui_apps_uninstall "GUI applications (Chrome, Spotify, VS Code, ...)" OFF \
vim_uninstall "Vim / Neovim (macvim, neovim, plugins)" OFF \
brew_cleanup "Run brew cleanup" OFF

info "Uninstallation complete."
info "To fully remove Homebrew itself, run:"
info " /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)\""
78 changes: 78 additions & 0 deletions .local/scripts/bootstrap/uninstall_mac_functions
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#! /usr/bin/env bash
# macOS bootstrap UNINSTALL functions
# Author: https://github.com/cuberhaus

###############################################################
# => CLI tools uninstall
###############################################################
cli_uninstall() {
info "Uninstalling CLI tools..."

local formulae=(
ack astyle bat bison cmake eza flex fzf gh git go gpg htop llvm mono
ncdu neofetch p7zip pinentry-mac pkg-config ranger w3m rclone
ripgrep smimesign sox stow swig the_silver_searcher unrar wget yarn
)

for pkg in "${formulae[@]}"; do
brew uninstall "$pkg" 2>/dev/null || true
done
}

###############################################################
# => Fonts uninstall
###############################################################
fonts_uninstall() {
info "Uninstalling fonts..."

local fonts=(
font-fira-code-nerd-font
font-inconsolata-nerd-font
font-iosevka-nerd-font
font-meslo-lg-nerd-font
)

for font in "${fonts[@]}"; do
brew uninstall "$font" 2>/dev/null || true
done
}

###############################################################
# => GUI applications uninstall
###############################################################
gui_apps_uninstall() {
info "Uninstalling GUI applications..."

local casks=(
caffeine ballast calibre ccleaner discord google-chrome
karabiner-elements kitty mos rectangle spotify sublime-text
texstudio the-unarchiver tomighty transmission visual-studio-code
vlc whatsapp anki notion notion-calendar obsidian todoist
)

for cask in "${casks[@]}"; do
brew uninstall --cask "$cask" 2>/dev/null || true
done
}

###############################################################
# => Vim/neovim uninstall
###############################################################
vim_uninstall() {
info "Uninstalling vim/neovim..."

brew uninstall macvim 2>/dev/null || true
brew uninstall neovim 2>/dev/null || true

sudo npm uninstall -g neovim 2>/dev/null || true
python3 -m pip uninstall -y pynvim 2>/dev/null || true
sudo gem uninstall neovim 2>/dev/null || true
}

###############################################################
# => Homebrew cleanup
###############################################################
brew_cleanup() {
info "Running brew cleanup..."
brew cleanup --prune=all 2>/dev/null || true
}
29 changes: 29 additions & 0 deletions .local/scripts/bootstrap/uninstall_manjaro
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Manjaro bootstrap UNINSTALL
# Author: https://github.com/cuberhaus
set -euo pipefail

### VARIABLES
scripts="$HOME/.local/scripts"
source "$scripts/bootstrap/base_functions"
source "$scripts/bootstrap/uninstall_tui"
source "$scripts/bootstrap/uninstall_arch_functions"
source "$scripts/bootstrap/uninstall_manjaro_functions"

### UNINSTALLATION
run_selected_uninstalls "Manjaro Uninstaller" \
base_uninstall "Base packages (cmake, bat, fzf, kitty, vim, ...)" OFF \
arch_uninstall "Arch drivers & services (NVIDIA, CUPS, Bluetooth)" OFF \
arch_and_manjaro_uninstall "Shared Arch/Manjaro (printers, Samba)" OFF \
manjaro_uninstall "Manjaro snaps & packages (IDEs, Spotify, ...)" OFF \
i3_uninstall "i3 window manager (i3-gaps, i3blocks, rofi, ...)" OFF \
xmonad_uninstall "xmonad window manager (xmobar, trayer, dmenu)" OFF \
vim_uninstall "Vim / Neovim extras (ctags, formatters, ...)" OFF \
emacs_uninstall "Emacs & Doom Emacs" OFF \
laptop_uninstall "Laptop packages (TLP)" OFF

if [ "$(basename "$SHELL")" == "zsh" ]; then
info "Currently using zsh. To revert to bash, run: chsh -s \$(which bash)"
fi

info "Uninstallation complete. A system reboot is recommended."
Loading
Loading