This commit is contained in:
billy 2024-10-11 12:35:48 -04:00
commit fd55d9844e
5 changed files with 238 additions and 0 deletions

5
README.md Normal file
View File

@ -0,0 +1,5 @@
install programs and configs for debian & gnome
(will probably work with debian-family distros: ubuntu, mint, popos, ...)
```bash
./debian.sh
```

43
colloid-gtk-theme.sh Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
# credit: https://github.com/drewgrif/bookworm-scripts
# Function to check if a directory exists
check_directory() {
if [ -d "$1" ]; then
return 0 # Directory exists
else
return 1 # Directory does not exist
fi
}
# Check if Colloid-icon-theme is installed
if check_directory "$HOME/.local/share/icons/Colloid-Dark"; then
echo "Colloid-icon-theme is already installed."
else
echo "Installing Colloid-icon-theme..."
cd ~/Downloads || exit
if [ -d "Colloid-icon-theme" ]; then
echo "Colloid-icon-theme repository already cloned. Skipping clone step."
else
git clone https://github.com/vinceliuice/Colloid-icon-theme.git
fi
cd Colloid-icon-theme || exit
./install.sh -t default -s default
rm -rf ~/Downloads/Colloid-icon-theme/
fi
# Check if Colloid-gtk-theme is installed
if check_directory "$HOME/.themes/Colloid-Dark"; then
echo "Colloid-gtk-theme is already installed."
else
echo "Installing Colloid-gtk-theme..."
cd ~/Downloads || exit
if [ -d "Colloid-gtk-theme" ]; then
echo "Colloid-gtk-theme repository already cloned. Skipping clone step."
else
git clone https://github.com/vinceliuice/Colloid-gtk-theme.git
fi
cd Colloid-gtk-theme || exit
yes | ./install.sh -c dark -t default --tweaks black
rm -rf ~/Downloads/Colloid-gtk-theme
fi

92
debian.sh Executable file
View File

@ -0,0 +1,92 @@
#!/bin/bash
scriptdir=$PWD
confirm() {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
case "$response" in
[yY][eE][sS]|[yY])
true
;;
*)
false
;;
esac
}
check_dir_exists() {
dir=$1
if [ -d dir ]; then
return 1 # Dir exists
else
return 0 # Dir does not exist
fi
}
is_macbook=false
confirm "Swap Left Super & Left Control? (Mac keyboard)" && is_macbook=true
sudo apt update
sudo apt upgrade
sudo apt install vim git cifs-utils nfs-common ripgrep stow virtualenv wget npm zip unzip kitty libfuse-dev python3-pip pipx nemo breeze-icon-theme gnome-tweaks
sudo apt purge nano evolution nautilus
# erdfonts
bash nerdfonts.sh
# themes
# user theme directory
mkdir -p ~/.themes
bash colloid-gtk-theme.sh
bash lavanda-gtk-theme.sh
# adds ~/.local/bin to PATH
pipx ensurepath
# default gnome stuff
gsettings set org.gnome.desktop.interface gtk-theme Lavanda-Sea-Dark
gsettings set org.gnome.shell.extensions.user-theme name Lavanda-Sea-Dark
gsettings set org.gnome.desktop.interface icon-theme breeze
xdg-mime default nemo.desktop inode/directory
gsettings set org.gnome.desktop.default-applications.terminal exec kitty
if $is_macbook; then
echo "Swapping left Super & left Control"
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:swap_lwin_lctl']"
fi
# install gnome extensions manager, cli
# https://github.com/essembeh/gnome-extensions-cli
pipx install gnome-extensions-cli --system-site-packages
# install gnome extensions
gext install dash-to-dock@micxgx.gmail.com user-theme@gnome-shell-extensions.gcampax.github.com openbar@neuromorph emoji-copy@felipeftn tiling-assistant@leleat-on-github Vitals@CoreCoding.com compiz-windows-effect@hermes83.github.com
# enable gnome extensions
gext enable dash-to-dock@micxgx.gmail.com user-theme@gnome-shell-extensions.gcampax.github.com openbar@neuromorph emoji-copy@felipeftn tiling-assistant@leleat-on-github Vitals@CoreCoding.com compiz-windows-effect@hermes83.github.com
# install neovim
mkdir -p ~/applications
wget -q --show-progress https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
if check_dir_exists ~/applications/nvim-linux64/; then
mv ~/applications/nvim-linux64/ ~/applications/nvim-linux64.old/
fi
tar xzf nvim-linux64.tar.gz
mv nvim-linux64 ~/applications/
rm nvim-linux64.tar.gz
rm -r ~/applications/nvim-linux64.old
if ! grep -q "alias vim" ~/.bash_aliases; then echo alias vim=“~/applications/nvim-linux64/bin/nvim” >> ~/.bash_aliases; fi
echo "Installed latest neovim"
# install my dotfiles
if check_dir_exists ~/code/dotfiles; then
cd ~/code/dotfiles
git pull
echo "Pulled billypom/dotfiles from github"
else
mkdir -p ~/code
cd ~/code
git clone https://github.com/billypom/dotfiles.git
echo "Cloned billypom/dotfiles from github"
fi
cd ~/code
stow --adopt dotfiles/
echo "Stowed dotfiles"
# repository setup
if ! grep -q "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" /etc/apt/sources.list; then echo "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" >> /etc/apt/sources.list; fi
if ! grep -q "deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" /etc/apt/sources.list; then echo "deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" >> /etc/apt/sources.list; fi
echo -e "\e[0;32m--- debian install script finished running ---\e[0m"

28
lavanda-gtk-theme.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
# credit: https://github.com/drewgrif/bookworm-scripts
# Function to check if a directory exists
check_directory() {
if [ -d "$1" ]; then
return 0 # Directory exists
else
return 1 # Directory does not exist
fi
}
# Check if Lavanda-gtk-theme is installed
if check_directory "$HOME/.themes/Lavanda-Dark"; then
echo "Lavanda gtk theme is already installed."
else
echo "Installing Lavanda-gtk-theme..."
cd ~/Downloads || exit
if [ -d "Lavanda-gtk-theme" ]; then
echo "Lavanda-gtk-theme repository already cloned. Skipping clone step."
else
git clone https://github.com/vinceliuice/Lavanda-gtk-theme
cd Lavanda-gtk-theme
bash install.sh
fi
rm -rf ~/Downloads/Lavanda-gtk-theme
echo "Finished installing Lavanda-gtk-theme"
fi

70
nerdfonts.sh Executable file
View File

@ -0,0 +1,70 @@
# credit: https://github.com/drewgrif/bookworm-scripts
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Check if unzip is installed; if not, install it
if ! command_exists unzip; then
echo "Installing unzip..."
sudo apt install unzip -y
fi
# Create directory for fonts if it doesn't exist
mkdir -p ~/.fonts
# Array of font names
fonts=(
"CascadiaCode"
"FiraCode"
"Hack"
"Inconsolata"
"JetBrainsMono"
"Meslo"
"Mononoki"
"RobotoMono"
"SourceCodePro"
"UbuntuMono"
# Add additional fonts here if needed
)
# Function to check if font directory exists
check_font_installed() {
font_name=$1
if [ -d ~/.fonts/$font_name ]; then
echo "Font $font_name is already installed. Skipping."
return 0 # Font already installed
else
return 1 # Font not installed
fi
}
# Loop through each font, check if installed, and install if not
for font in "${fonts[@]}"
do
if check_font_installed "$font"; then
echo "Skipping installation of font: $font"
continue # Skip installation if font is already installed
fi
echo "Installing font: $font"
wget -q --show-progress "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/$font.zip" -P /tmp
if [ $? -ne 0 ]; then
echo "Failed to download font: $font"
continue
fi
unzip -q /tmp/$font.zip -d ~/.fonts/$font/
if [ $? -ne 0 ]; then
echo "Failed to extract font: $font"
continue
fi
rm /tmp/$font.zip
done
# Update font cache
fc-cache -f
echo "Fonts installation completed."