diff --git a/configs/shell/zsh/.scripts/dns-changer.sh b/configs/shell/zsh/.scripts/dns-changer.sh deleted file mode 100755 index a3d4c59..0000000 --- a/configs/shell/zsh/.scripts/dns-changer.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -declare -A dns_servers=( - ["Google"]="8.8.8.8,8.8.4.4" - ["Cloudflare"]="1.1.1.1" - ["403"]="10.202.10.202,10.202.10.102" - ["Shecan"]="178.22.122.100,185.51.200.2" -) - -display_dns_list() { - echo "Available DNS Servers:" - i=1 - for dns_name in "${!dns_servers[@]}"; do - echo "$i. ${dns_name}" - ((i++)) - done -} - -select_dns() { - read -p "Select a DNS server (enter the name or number): " selected_input - - if [[ $selected_input =~ ^[0-9]+$ ]]; then - if ((selected_input >= 1 && selected_input <= ${#dns_servers[@]})); then - selected_name=$(echo "${!dns_servers[@]}" | cut -d ' ' -f $selected_input) - selected_dns=${dns_servers[$selected_name]} - echo "Selected DNS server: $selected_dns" - else - echo "Invalid number. Please select a valid number." - select_dns - fi - else - if [[ -n ${dns_servers[$selected_input]} ]]; then - selected_dns=${dns_servers[$selected_input]} - echo "Selected DNS server: $selected_dns" - else - echo "Invalid name. Please select a valid name." - select_dns - fi - fi -} - -update_resolv_conf() { - sudo sh -c "echo '' > /etc/resolv.conf" - IFS=',' read -ra dns_array <<<"$1" - for dns in "${dns_array[@]}"; do - echo "nameserver $dns" | sudo tee -a /etc/resolv.conf >/dev/null - done - echo "Updated /etc/resolv.conf with DNS servers: $1" -} - -display_dns_list -select_dns -update_resolv_conf "$selected_dns" diff --git a/configs/shell/zsh/.scripts/utils/main.sh b/configs/shell/zsh/.scripts/utils/main.sh deleted file mode 100755 index eee75ab..0000000 --- a/configs/shell/zsh/.scripts/utils/main.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -check_sudo() { - if [ "$(id -u)" != 0 ]; then - echo "Please run the script with sudo." - exit 1 - fi -} - -ask_prompt() { - local question="$1" - while true; do - read -p "$question (Y/N): " choice - case "$choice" in - [Yy]) return 0 ;; - [Nn]) return 1 ;; - *) echo "Please enter Y or N." ;; - esac - done -} diff --git a/configs/shell/zsh/.zshenv b/configs/shell/zsh/.zshenv index 08ed7b9..2dd4ab8 100644 --- a/configs/shell/zsh/.zshenv +++ b/configs/shell/zsh/.zshenv @@ -7,7 +7,7 @@ export NEKORAY_PATH=/opt/nekoray/nekoray export CODE_PATH=/opt/vscode/code export DOTFILES=$HOME/.dots-hyprland export VOID_PACKAGES_PATH=$HOME/.local/pkgs/void-packages -export DNS_CHANGER=$HOME/.scripts/dns-changer.sh +export DNS_CHANGER=$HOME/.scripts/dns-changer/main.sh export STEAM_OS=$HOME/.steam-os/main.sh if [ -d "/home/$USER/platform-tools" ]; then diff --git a/configs/shell/zsh/.gamescope/configs.sh b/configs/utils/.gamescope/configs.sh similarity index 100% rename from configs/shell/zsh/.gamescope/configs.sh rename to configs/utils/.gamescope/configs.sh diff --git a/configs/shell/zsh/.gamescope/pcsx2.sh b/configs/utils/.gamescope/pcsx2/main.sh similarity index 100% rename from configs/shell/zsh/.gamescope/pcsx2.sh rename to configs/utils/.gamescope/pcsx2/main.sh diff --git a/configs/shell/zsh/.gamescope/rpcs3.sh b/configs/utils/.gamescope/rpcs3/main.sh similarity index 100% rename from configs/shell/zsh/.gamescope/rpcs3.sh rename to configs/utils/.gamescope/rpcs3/main.sh diff --git a/configs/shell/zsh/.gamescope/steam.sh b/configs/utils/.gamescope/steam/main.sh similarity index 100% rename from configs/shell/zsh/.gamescope/steam.sh rename to configs/utils/.gamescope/steam/main.sh diff --git a/configs/shell/zsh/.gamescope/utils/main.sh b/configs/utils/.gamescope/utils/main.sh similarity index 100% rename from configs/shell/zsh/.gamescope/utils/main.sh rename to configs/utils/.gamescope/utils/main.sh diff --git a/configs/host/bin/rofi-1.7.5.tar.gz b/host/bin/rofi-1.7.5.tar.gz similarity index 100% rename from configs/host/bin/rofi-1.7.5.tar.gz rename to host/bin/rofi-1.7.5.tar.gz diff --git a/configs/host/bin/swaylock-1.7.tar.gz b/host/bin/swaylock-1.7.tar.gz similarity index 100% rename from configs/host/bin/swaylock-1.7.tar.gz rename to host/bin/swaylock-1.7.tar.gz diff --git a/configs/host/bin/swww-0.8.2.tar.gz b/host/bin/swww-0.8.2.tar.gz similarity index 100% rename from configs/host/bin/swww-0.8.2.tar.gz rename to host/bin/swww-0.8.2.tar.gz diff --git a/configs/host/ui/cursors/Bibata-Modern-Ice.tar.xz b/host/ui/cursors/Bibata-Modern-Ice.tar.xz similarity index 100% rename from configs/host/ui/cursors/Bibata-Modern-Ice.tar.xz rename to host/ui/cursors/Bibata-Modern-Ice.tar.xz diff --git a/configs/host/ui/fonts/GrapeNuts-Regular.ttf b/host/ui/fonts/GrapeNuts-Regular.ttf similarity index 100% rename from configs/host/ui/fonts/GrapeNuts-Regular.ttf rename to host/ui/fonts/GrapeNuts-Regular.ttf diff --git a/configs/host/ui/fonts/Icomoon-Feather.ttf b/host/ui/fonts/Icomoon-Feather.ttf similarity index 100% rename from configs/host/ui/fonts/Icomoon-Feather.ttf rename to host/ui/fonts/Icomoon-Feather.ttf diff --git a/configs/host/ui/fonts/Iosevka-Nerd-Font-Complete.ttf b/host/ui/fonts/Iosevka-Nerd-Font-Complete.ttf similarity index 100% rename from configs/host/ui/fonts/Iosevka-Nerd-Font-Complete.ttf rename to host/ui/fonts/Iosevka-Nerd-Font-Complete.ttf diff --git a/configs/host/ui/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf b/host/ui/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf similarity index 100% rename from configs/host/ui/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf rename to host/ui/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf diff --git a/configs/host/ui/icons/McMojave-circle.tar.xz b/host/ui/icons/McMojave-circle.tar.xz similarity index 100% rename from configs/host/ui/icons/McMojave-circle.tar.xz rename to host/ui/icons/McMojave-circle.tar.xz diff --git a/configs/host/ui/themes/Colloid.tar.xz b/host/ui/themes/Colloid.tar.xz similarity index 100% rename from configs/host/ui/themes/Colloid.tar.xz rename to host/ui/themes/Colloid.tar.xz diff --git a/configs/host/ui/themes/Orchis.tar.xz b/host/ui/themes/Orchis.tar.xz similarity index 100% rename from configs/host/ui/themes/Orchis.tar.xz rename to host/ui/themes/Orchis.tar.xz diff --git a/stow.sh b/stow.sh index 5a8cb51..fac931e 100755 --- a/stow.sh +++ b/stow.sh @@ -6,8 +6,9 @@ source ./scripts/utils/helpers.sh CONFIGS_DIR="$(pwd)/configs" DOTFILES_DIR="$CONFIGS_DIR/dotfiles" SHELL_DIR="$CONFIGS_DIR/shell/zsh" -SHORTCUTS_DIR="$CONFIGS_DIR/shortcuts" +UTILS_DIR="$CONFIGS_DIR/utils" HYPRLAND_DIR="$CONFIGS_DIR/hyprland" +SHORTCUTS_DIR="$CONFIGS_DIR/shortcuts" display_help() { echo "Usage: [-s | -u] [-h]" @@ -21,37 +22,29 @@ create_target_dir() { mkdir -p ~/.config } -stow_shortcuts() { - create_symlinks $SHORTCUTS_DIR ~/.local/share/applications - - log "Shortcuts stowed successfully!" -} - -stow_dotfiles() { - create_symlinks $DOTFILES_DIR ~/.config - create_symlinks $SHELL_DIR ~ - - log "Dotfiles stowed successfully!" -} - -stow_hyprland() { - create_symlinks $HYPRLAND_DIR ~/.config - - log "Hyprland stowed successfully!" -} - stow() { create_target_dir - stow_dotfiles - stow_shortcuts - stow_hyprland + + create_symlinks $SHELL_DIR ~ + create_symlinks $DOTFILES_DIR ~/.config + log "Dotfiles stowed successfully!" + + create_symlinks $HYPRLAND_DIR ~/.config + log "Hyprland stowed successfully!" + + create_symlinks $SHORTCUTS_DIR ~/.local/share/applications + log "Shortcuts stowed successfully!" + + create_symlinks $UTILS_DIR ~ + log "Utilities stowed successfully!" } unstow() { delete_symlinks $SHELL_DIR ~ delete_symlinks $DOTFILES_DIR ~/.config - delete_symlinks $SHORTCUTS_DIR ~/.local/share/applications delete_symlinks $HYPRLAND_DIR ~/.config + delete_symlinks $SHORTCUTS_DIR ~/.local/share/applications + delete_symlinks $UTILS_DIR ~ log "All configs ustowed successfully !" }