diff options
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 68 |
1 files changed, 50 insertions, 18 deletions
@@ -33,7 +33,7 @@ fi # Function to print colorful text print_color() { - printf "%b%s%b\n" "$1" "$2" "$CLEAR" + printf "%b%s%b\n" "$1" "$2" "$RESET" } # Check /etc/os-release to see if this is an Ubuntu or Debian based distro @@ -75,11 +75,6 @@ if [ ! -d Copy-Logs ]; then mkdir Copy-Logs fi -# Function to print colorful text -print_color() { - printf "%b%s%b\n" "$1" "$2" "$CLEAR" -} - # Set the name of the log file to include the current date and time LOG="Copy-Logs/install-$(date +%d-%H%M%S)_dotfiles.log" @@ -240,11 +235,11 @@ if command -v blueman-applet >/dev/null 2>&1; then sed -i '/^\s*#exec-once = blueman-applet/s/^#//' config/hypr/UserConfigs/Startup_Apps.conf fi -# Check if ags is installed edit ags behaviour on configs -if command -v ags >/dev/null 2>&1; then - sed -i '/^\s*#exec-once = ags/s/^#//' config/hypr/UserConfigs/Startup_Apps.conf - sed -i '/#ags -q && ags &/s/^#//' config/hypr/scripts/RefreshNoWaybar.sh - sed -i '/#ags -q && ags &/s/^#//' config/hypr/scripts/Refresh.sh +# Check if quickshell is installed edit quickshell behaviour on configs +if command -v qs >/dev/null 2>&1; then + sed -i '/^\s*#exec-once = qs/s/^#//' config/hypr/UserConfigs/Startup_Apps.conf + sed -i '/#pkill qs && qs &/s/^#//' config/hypr/scripts/RefreshNoWaybar.sh + sed -i '/#pkill qs && qs &/s/^#//' config/hypr/scripts/Refresh.sh fi printf "\n%.0s" {1..1} @@ -461,7 +456,7 @@ fi printf "${INFO} - copying dotfiles ${SKY_BLUE}first${RESET} part\n" # Config directories which will ask the user whether to replace or not -DIRS="ags fastfetch kitty rofi swaync" +DIRS="fastfetch kitty rofi swaync" for DIR2 in $DIRS; do DIRPATH="$HOME/.config/$DIR2" @@ -670,6 +665,43 @@ done printf "\n%.0s" {1..1} +# quickshell (ags alternative) +# Check if quickshell is installed +if command -v qs >/dev/null 2>&1; then + echo -e "${NOTE} - ${YELLOW}quickshell${RESET} is detected as installed" + + DIRPATH_QS="$HOME/.config/quickshell" + + if [ ! -d "$DIRPATH_QS" ]; then + echo "${INFO} - quickshell config not found, copying new config." + if [ -d "config/quickshell" ]; then + cp -r "config/quickshell/" "$DIRPATH_QS" 2>&1 | tee -a "$LOG" + fi + else + read -p "${CAT} Do you want to overwrite your existing ${YELLOW}quickshell${RESET} config? [y/N] " answer_qs + case "$answer_qs" in + [Yy]* ) + BACKUP_DIR=$(get_backup_dirname) + mv "$DIRPATH_QS" "$DIRPATH_QS-backup-$BACKUP_DIR" 2>&1 | tee -a "$LOG" + echo -e "${NOTE} - Backed up quickshell to $DIRPATH_QS-backup-$BACKUP_DIR" + + cp -r "config/quickshell/" "$DIRPATH_QS" 2>&1 | tee -a "$LOG" + if [ $? -eq 0 ]; then + echo "${OK} - ${YELLOW}quickshell${RESET} overwritten successfully." + else + echo "${ERROR} - Failed to copy ${YELLOW}quickshell${RESET} config." + exit 1 + fi + ;; + * ) + echo "${NOTE} - Skipping overwrite of quickshell config." + ;; + esac + fi +fi +printf "\n%.0s" {1..1} + + # Restore automatically Animations and Monitor-Profiles # including monitors.conf and workspaces.conf HYPR_DIR="$HOME/.config/hypr" @@ -897,11 +929,11 @@ rm -rf "$HOME/.config/waybar/configs/[TOP] Default$config_remove" \ printf "\n%.0s" {1..1} -# for SDDM (sequoia_2) -sddm_sequioa="/usr/share/sddm/themes/sequoia_2" -if [ -d "$sddm_sequioa" ]; then +# for SDDM (simple_sddm_2) +sddm_simple_sddm_2="/usr/share/sddm/themes/simple_sddm_2" +if [ -d "$sddm_simple_sddm_2" ]; then while true; do - echo -n "${CAT} SDDM sequoia_2 theme detected! Apply current wallpaper as SDDM background? (y/n): " + echo -n "${CAT} SDDM simple_sddm_2 theme detected! Apply current wallpaper as SDDM background? (y/n): " read SDDM_WALL # Remove any leading/trailing whitespace or newlines from input @@ -910,7 +942,7 @@ if [ -d "$sddm_sequioa" ]; then case $SDDM_WALL in [Yy]) # Copy the wallpaper, ignore errors if the file exists or fails - sudo cp -r "config/hypr/wallpaper_effects/.wallpaper_current" "/usr/share/sddm/themes/sequoia_2/backgrounds/default" || true + sudo cp -r "config/hypr/wallpaper_effects/.wallpaper_current" "/usr/share/sddm/themes/simple_sddm_2/Backgrounds/default" || true echo "${NOTE} Current wallpaper applied as default SDDM background" 2>&1 | tee -a "$LOG" break ;; @@ -1037,4 +1069,4 @@ printf "\n%.0s" {1..1} printf "${INFO} However, it is ${MAGENTA}HIGHLY SUGGESTED${RESET} to logout and re-login or better reboot to avoid any issues" printf "\n%.0s" {1..1} printf "${SKY_BLUE}Thank you${RESET} for using ${MAGENTA}KooL's Hyprland Configuration${RESET}... ${YELLOW}ENJOY!!!${RESET}" -printf "\n%.0s" {1..3} +printf "\n%.0s" {1..3}
\ No newline at end of file |
