diff --git a/host/bin/swaylock-1.7.tar.gz b/configs/host/bin/swaylock-1.7.tar.gz similarity index 100% rename from host/bin/swaylock-1.7.tar.gz rename to configs/host/bin/swaylock-1.7.tar.gz diff --git a/host/bin/swww-0.8.2.tar.gz b/configs/host/bin/swww-0.8.2.tar.gz similarity index 100% rename from host/bin/swww-0.8.2.tar.gz rename to configs/host/bin/swww-0.8.2.tar.gz diff --git a/host/ui/cursors/Bibata-Modern-Ice.tar.xz b/configs/host/ui/cursors/Bibata-Modern-Ice.tar.xz similarity index 100% rename from host/ui/cursors/Bibata-Modern-Ice.tar.xz rename to configs/host/ui/cursors/Bibata-Modern-Ice.tar.xz diff --git a/host/ui/fonts/GrapeNuts-Regular.ttf b/configs/host/ui/fonts/GrapeNuts-Regular.ttf similarity index 100% rename from host/ui/fonts/GrapeNuts-Regular.ttf rename to configs/host/ui/fonts/GrapeNuts-Regular.ttf diff --git a/host/ui/fonts/Icomoon-Feather.ttf b/configs/host/ui/fonts/Icomoon-Feather.ttf similarity index 100% rename from host/ui/fonts/Icomoon-Feather.ttf rename to configs/host/ui/fonts/Icomoon-Feather.ttf diff --git a/host/ui/fonts/Iosevka-Nerd-Font-Complete.ttf b/configs/host/ui/fonts/Iosevka-Nerd-Font-Complete.ttf similarity index 100% rename from host/ui/fonts/Iosevka-Nerd-Font-Complete.ttf rename to configs/host/ui/fonts/Iosevka-Nerd-Font-Complete.ttf diff --git a/host/ui/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf b/configs/host/ui/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf similarity index 100% rename from host/ui/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf rename to configs/host/ui/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf diff --git a/host/ui/icons/McMojave-circle.tar.xz b/configs/host/ui/icons/McMojave-circle.tar.xz similarity index 100% rename from host/ui/icons/McMojave-circle.tar.xz rename to configs/host/ui/icons/McMojave-circle.tar.xz diff --git a/host/ui/themes/Colloid.tar.xz b/configs/host/ui/themes/Colloid.tar.xz similarity index 100% rename from host/ui/themes/Colloid.tar.xz rename to configs/host/ui/themes/Colloid.tar.xz diff --git a/host/ui/themes/Orchis.tar.xz b/configs/host/ui/themes/Orchis.tar.xz similarity index 100% rename from host/ui/themes/Orchis.tar.xz rename to configs/host/ui/themes/Orchis.tar.xz diff --git a/scripts/fonts-installer.sh b/scripts/fonts-installer.sh index 48db225..2c32d88 100755 --- a/scripts/fonts-installer.sh +++ b/scripts/fonts-installer.sh @@ -1,10 +1,17 @@ #!/bin/bash -install_ttf_font() { +source ./utils.sh + +FONTS_DIR="../configs/host/ui/fonts" + +install_ttf_fonts() { sudo cp *.ttf /usr/share/fonts/TTF sudo fc-cache -f -v + + log "Fonts installed successfully!" } -cd ../host/ui/fonts +check_sudo -install_ttf_font +cd $FONTS_DIR +install_ttf_fonts diff --git a/scripts/pkgs-installer.sh b/scripts/pkgs-installer.sh index e658901..af14d31 100755 --- a/scripts/pkgs-installer.sh +++ b/scripts/pkgs-installer.sh @@ -26,13 +26,6 @@ declare SERVICES=( exec 1> >(tee "../hyprland_setup_log") -check_sudo() { - if [ "$(id -u)" != 0 ]; then - echo "Please run the script with sudo." - exit 1 - fi -} - check() { if [ "$1" != 0 ]; then echo "$2 error : $1" | tee -a ../hyprland_setup_log diff --git a/scripts/utils.sh b/scripts/utils.sh index 89734bf..2a64b8a 100755 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -6,3 +6,10 @@ log() { echo -e "\n$message" } + +check_sudo() { + if [ "$(id -u)" != 0 ]; then + echo "Please run the script with sudo." + exit 1 + fi +} diff --git a/stow.sh b/stow.sh index e826a71..fc9b1cf 100755 --- a/stow.sh +++ b/stow.sh @@ -2,11 +2,11 @@ source ./scripts/utils.sh -configs_dir="$(pwd)/configs" -dotfiles_dir="$configs_dir/dotfiles" -shell_dir="$configs_dir/shell" -shortcuts_dir="$configs_dir/shortcuts" -hyprland_dir="$configs_dir/hyprland" +CONFIGS_DIR="$(pwd)/configs" +DOTFILES_DIR="$CONFIGS_DIR/dotfiles" +SHELL_DIR="$CONFIGS_DIR/shell" +SHORTCUTS_DIR="$CONFIGS_DIR/shortcuts" +HYPRLAND_DIR="$CONFIGS_DIR/hyprland" display_help() { echo "Usage: [-s | -u] [-h]" @@ -57,20 +57,20 @@ create_target_dir() { } stow_shortcuts() { - create_symlinks $shortcuts_dir ~/.local/share/applications + create_symlinks $SHORTCUTS_DIR ~/.local/share/applications log "Shortcuts stowed successfully!" } stow_dotfiles() { - create_symlinks $dotfiles_dir ~/.config - create_symlinks $shell_dir ~/ + create_symlinks $DOTFILES_DIR ~/.config + create_symlinks $SHELL_DIR ~/ log "Dotfiles stowed successfully!" } stow_hyprland() { - create_symlinks $hyprland_dir ~/.config + create_symlinks $HYPRLAND_DIR ~/.config log "Hyprland stowed successfully!" } @@ -83,7 +83,7 @@ stow() { } unstow_shell() { - for config in $shell_dir/.*; do + for config in $SHELL_DIR/.*; do if [ -f $config ]; then local file_name=$(basename $config) local target_file=~/$file_name @@ -111,9 +111,9 @@ unstow_shell() { unstow() { unstow_shell - delete_symlinks $dotfiles_dir ~/.config - delete_symlinks $shortcuts_dir ~/.local/share/applications - delete_symlinks $hyprland_dir ~/.config + delete_symlinks $DOTFILES_DIR ~/.config + delete_symlinks $SHORTCUTS_DIR ~/.local/share/applications + delete_symlinks $HYPRLAND_DIR ~/.config log "All configs ustowed successfully !" }