This commit is contained in:
billy 2025-08-10 10:34:14 -04:00
parent eeb882b3ae
commit 3f0e041fe5
5 changed files with 138 additions and 142 deletions

View File

@ -52,17 +52,14 @@ is_macbook=false
is_server=true is_server=true
install_themes=false install_themes=false
install_nerdfonts=false install_nerdfonts=false
install_neovim=false
install_dotfiles=false install_dotfiles=false
install_gnome_configs=false install_gnome_configs=false
include_debian_backports=false
echo "${fg_blue}" echo "${fg_blue}"
cat ascii.txt cat ascii.txt
echo "${reset}" echo "${reset}"
cecho "----debian install script-----" fg_cyan cecho "----debian install script-----" fg_cyan
confirm "Is this a server? (Y/N)" && is_server=true confirm "Is this a server? (Y/N)" && is_server=true
# confirm "Include debian backports in apt package manager? (Y/N)" && include_debian_backports=true
confirm "Swap Left Super & Left Control <for mac keyboard> (Y/N)" && is_macbook=true confirm "Swap Left Super & Left Control <for mac keyboard> (Y/N)" && is_macbook=true
if $is_server; then if $is_server; then
@ -75,17 +72,16 @@ else
fi fi
confirm "Install Nerd Fonts? (Y/N)" && install_nerdfonts=true confirm "Install Nerd Fonts? (Y/N)" && install_nerdfonts=true
confirm "Install billypom dotfiles? - includes .bash_aliases file, tmux, kitty, and nvim configs (Y/N)" && install_dotfiles=true confirm "Install billypom dotfiles? - includes .bash_aliases file, tmux, kitty, and nvim configs (Y/N)" && install_dotfiles=true
confirm "Install Neovim? (Y/N)" && install_neovim=true
cecho "Updating package manager" fg_cyan cecho "Updating package manager" fg_cyan
sudo apt update sudo apt update
cecho "Purging yucky packages" fg_cyan cecho "Purging yucky packages" fg_cyan
sudo apt purge nano evolution nautilus sudo apt purge nano evolution
cecho "Installing yummy packages" fg_cyan cecho "Installing yummy packages" fg_cyan
if $is_server; then if $is_server; then
sudo apt install vim git cifs-utils nfs-common ripgrep stow virtualenv wget zip unzip kitty python3-pip ncdu tldr htop sudo apt install vim neovim git cifs-utils nfs-common ripgrep stow virtualenv wget zip unzip kitty python3-pip ncdu htop python3-venv curl
else else
sudo apt install vim git cifs-utils nfs-common ripgrep stow virtualenv wget zip unzip kitty python3-pip ncdu tldr htop libfuse-dev nemo sudo apt install vim git cifs-utils nfs-common ripgrep stow virtualenv wget zip unzip kitty python3-pip ncdu htop libfuse-dev nemo python3-venv curl irssi
fi fi
# themes # themes
@ -122,14 +118,32 @@ if $install_nerdfonts; then
bash options/nerdfonts.sh bash options/nerdfonts.sh
fi fi
# set default file manager # xdg defaults
xdg-mime default nemo.desktop inode/directory xdg-mime default nemo.desktop inode/directory
xdg-mime default nvim.desktop text/plain
sed -i "s/^DESKTOP=.*/DESKTOP=desktop/" /etc/xdg/user-dirs.conf
sed -i "s/^DOWNLOAD=.*/DOWNLOAD=downloads/" /etc/xdg/user-dirs.conf
sed -i "s/^TEMPLATES=.*/TEMPLATES=templates/" /etc/xdg/user-dirs.conf
sed -i "s/^PUBLICSHARE=.*/PUBLICSHARE=public/" /etc/xdg/user-dirs.conf
sed -i "s/^DOCUMENTS=.*/DOCUMENTS=documents/" /etc/xdg/user-dirs.conf
sed -i "s/^MUSIC=.*/MUSIC=music/" /etc/xdg/user-dirs.conf
sed -i "s/^PICTURES=.*/PICTURES=pictures/" /etc/xdg/user-dirs.conf
sed -i "s/^VIDEOS=.*/VIDEOS=videos/" /etc/xdg/user-dirs.conf
# gamecube adapter udev rule
# obsidian
# private internet access
# soulseek
# renoise
# yabridge
# synthv
# ilok license manager
# vital synth?
# super right click resize
# super click move
# tiling manager
# install neovim
if $install_neovim; then
cecho "Installing neovim" fg_cyan
bash options/neovim.sh
fi
# install my dotfiles # install my dotfiles
if $install_dotfiles; then if $install_dotfiles; then
@ -137,14 +151,10 @@ if $install_dotfiles; then
bash options/dotfiles.sh bash options/dotfiles.sh
fi fi
# apt repositories setup # librewolf
# this wont work because of permissions...hmmm sudo apt install extrepo -y
# 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 sudo extrepo enable librewolf
# sudo apt update
# 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 sudo apt install librewolf
# if $include_debian_backports; then
# if ! grep -q "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" /etc/apt/sources.list; then echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list; fi
#
# if ! grep -q "deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" /etc/apt/sources.list; then echo "deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list; fi
# fi
echo "\e[0;32m--- debian install script finished running ---\e[0m" echo "\e[0;32m--- debian install script finished running ---\e[0m"

View File

@ -41,19 +41,114 @@ if $is_macbook; then
cecho "Swapping left Super & left Control" fg_cyan cecho "Swapping left Super & left Control" fg_cyan
bash options/toggle-gnome-macbook-keyboard.sh 1 bash options/toggle-gnome-macbook-keyboard.sh 1
fi fi
# i dont rly care about extensions
sudo apt install -y pipx sudo apt install -y pipx
# adds ~/.local/bin to PATH # # adds ~/.local/bin to PATH
pipx ensurepath pipx ensurepath
# https://github.com/essembeh/gnome-extensions-cli # # https://github.com/essembeh/gnome-extensions-cli
pipx install gnome-extensions-cli --system-site-packages pipx install gnome-extensions-cli --system-site-packages
# install gnome extensions # # 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 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 # # 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 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
#
#
# this is the worst script in the world
# "name|command|binding"
keybindings=(
"Terminal|kitty|<Super>Return"
"wallpaper|~/utils/gnome-wallpaper/wallpaper.sh|Launch7"
"wallpaper2|~/utils/gnome-wallpaper/my_wallpaper.sh|<Control>Launch7"
"browser|librewolf|<Super>Shift"
)
bash gnome-keybinds.sh # Get the current list of custom keybindings
current_keybindings=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
current_keybindings=$(echo "$current_keybindings" | sed "s/^\[\(.*\)\]$/\1/")
if [ "$current_keybindings" == "@as []" ]; then
echo "Current keybinds are empty"
next_index=0
else
# Get the highest index currently used
existing_indices=$(echo "$current_keybindings" | tr ',' '\n' | grep -o 'custom[0-9]\+' | sed 's/custom//' | sort -n)
if [ -z "$existing_indices" ]; then
next_index=0
else
last_index=$(echo "$existing_indices" | tail -n 1)
next_index=$((last_index + 1))
fi
# Store new paths to update the keybinding list
new_keybinding_paths=()
# Get all existing bindings for comparison (just the binding part)
existing_bindings=()
for keybinding in $(echo "$current_keybindings" | tr ',' '\n'); do
binding_path=$(echo "$keybinding" | sed "s/^'//;s/'$//")
binding_command=$(gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:$binding_path binding)
existing_bindings+=("$(echo $binding_command | sed "s/^'//;s/'$//")") # Remove quotes
done
fi
# Loop over keybindings and add them
for entry in "${keybindings[@]}"; do
IFS='|' read -r name command binding <<< "$entry"
# Check if the binding already exists
if [ "$current_keybindings" == "@as []" ]; then
echo "Current keybinds are empty"
else
if [[ " ${existing_bindings[@]} " =~ " $binding " ]]; then
# If binding exists, prompt user to overwrite
echo "Keybinding '$binding' already exists for another action."
read -p "Do you want to overwrite it? (y/n): " overwrite
if [[ "$overwrite" != "y" && "$overwrite" != "Y" ]]; then
echo "Skipping '$binding'."
continue
fi
fi
fi
# Define the new keybinding path
new_path="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom$next_index/"
new_keybinding_paths+=("'$new_path'") # Wrap paths in single quotes
# Set individual keybinding settings
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$new_path" name "$name"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$new_path" command "$command"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$new_path" binding "$binding"
echo "Added keybinding: $name ($binding) -> $command"
next_index=$((next_index + 1))
done
# Now merge old and new keybindings properly
# First, join the keybinding paths with commas, ensuring proper quoting
if [ "$current_keybindings" == "@as []" ]; then
echo "Current keybinds are empty"
all_keybindings=""
else
all_keybindings="$current_keybindings"
fi
for path in "${new_keybinding_paths[@]}"; do
# Add each new keybinding path to the list, ensuring proper formatting
if [ -z "$all_keybindings" ]; then
all_keybindings="$path"
else
all_keybindings="$all_keybindings,$path"
fi
done
# Ensure the list is properly wrapped in square brackets
all_keybindings="[$all_keybindings]"
# Update the system keybinding list
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$all_keybindings"
echo "Keybindings updated successfully!"

View File

@ -1,97 +0,0 @@
#!/bin/bash
# this is the worst script in the world
# "name|command|binding"
keybindings=(
"Terminal|kitty|<Super>Return"
"wallpaper|~/utils/gnome-wallpaper/wallpaper.sh|Launch7"
"wallpaper2|~/utils/gnome-wallpaper/my_wallpaper.sh|<Control>Launch7"
"browser|librewolf|<Super>Shift"
)
# Get the current list of custom keybindings
current_keybindings=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
current_keybindings=$(echo "$current_keybindings" | sed "s/^\[\(.*\)\]$/\1/")
if [ "$current_keybindings" == "@as []" ]; then
echo "Current keybinds are empty"
next_index=0
else
# Get the highest index currently used
existing_indices=$(echo "$current_keybindings" | tr ',' '\n' | grep -o 'custom[0-9]\+' | sed 's/custom//' | sort -n)
if [ -z "$existing_indices" ]; then
next_index=0
else
last_index=$(echo "$existing_indices" | tail -n 1)
next_index=$((last_index + 1))
fi
# Store new paths to update the keybinding list
new_keybinding_paths=()
# Get all existing bindings for comparison (just the binding part)
existing_bindings=()
for keybinding in $(echo "$current_keybindings" | tr ',' '\n'); do
binding_path=$(echo "$keybinding" | sed "s/^'//;s/'$//")
binding_command=$(gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:$binding_path binding)
existing_bindings+=("$(echo $binding_command | sed "s/^'//;s/'$//")") # Remove quotes
done
fi
# Loop over keybindings and add them
for entry in "${keybindings[@]}"; do
IFS='|' read -r name command binding <<< "$entry"
# Check if the binding already exists
if [ "$current_keybindings" == "@as []" ]; then
echo "Current keybinds are empty"
else
if [[ " ${existing_bindings[@]} " =~ " $binding " ]]; then
# If binding exists, prompt user to overwrite
echo "Keybinding '$binding' already exists for another action."
read -p "Do you want to overwrite it? (y/n): " overwrite
if [[ "$overwrite" != "y" && "$overwrite" != "Y" ]]; then
echo "Skipping '$binding'."
continue
fi
fi
fi
# Define the new keybinding path
new_path="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom$next_index/"
new_keybinding_paths+=("'$new_path'") # Wrap paths in single quotes
# Set individual keybinding settings
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$new_path" name "$name"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$new_path" command "$command"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$new_path" binding "$binding"
echo "Added keybinding: $name ($binding) -> $command"
next_index=$((next_index + 1))
done
# Now merge old and new keybindings properly
# First, join the keybinding paths with commas, ensuring proper quoting
if [ "$current_keybindings" == "@as []" ]; then
echo "Current keybinds are empty"
all_keybindings=""
else
all_keybindings="$current_keybindings"
fi
for path in "${new_keybinding_paths[@]}"; do
# Add each new keybinding path to the list, ensuring proper formatting
if [ -z "$all_keybindings" ]; then
all_keybindings="$path"
else
all_keybindings="$all_keybindings,$path"
fi
done
# Ensure the list is properly wrapped in square brackets
all_keybindings="[$all_keybindings]"
# Update the system keybinding list
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$all_keybindings"
echo "Keybindings updated successfully!"

View File

@ -18,10 +18,11 @@ else
DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$(xdg-user-dir DOWNLOAD)}" DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$(xdg-user-dir DOWNLOAD)}"
cd $DOWNLOAD_DIR || exit cd $DOWNLOAD_DIR || exit
git clone https://github.com/bikass/kora.git git clone https://github.com/bikass/kora.git
mkdir -p ~/.icons
cd kora || exit cd kora || exit
cp -r kora ~/.icons/kora cp -r kora ~/.icons
cp -r kora-light ~/.icons/kora-light cp -r kora-light ~/.icons
cp -r kora-light-panel ~/.icons/kora-light-panel cp -r kora-light-panel ~/.icons
cp -r kora-pgrey ~/.icons/kora-pgrey cp -r kora-pgrey ~/.icons
rm -rf $DOWNLOAD_DIR/kora rm -rf $DOWNLOAD_DIR/kora
fi fi

View File

@ -1,13 +0,0 @@
sudo apt install npm
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
mkdir -p ~/applications
wget -q --show-progress https://github.com/neovim/neovim/releases/download/v0.10.4/nvim-linux-x86_64.tar.gz
if check_dir_exists ~/applications/nvim-linux-x86_64/; then
mv ~/applications/nvim-linux-x86_64/ ~/applications/nvim-linux-x86_64.old/
fi
tar xzf nvim-linux-x86_64.tar.gz
mv nvim-linux-x86_64 ~/applications/
rm nvim-linux-x86_64.tar.gz
rm -r ~/applications/nvim-linux-x86_64.old
if ! grep -q "alias vim" ~/.bash_aliases; then echo "alias vim='~/applications/nvim-linux-x86_64/bin/nvim'" >> ~/.bash_aliases; fi
echo "Installed latest neovim"