diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-07-19 17:27:14 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-07-19 17:27:14 +0900 |
| commit | 3c1cc04020678b76a622a1a7a28a2c1e529f7665 (patch) | |
| tree | c191782fc9e8c9eee61f64450726c77a3cae65ed /copy.sh | |
| parent | ef1b52470a5fd2ec4b5b24ea6c1d56ca62c3c9fa (diff) | |
updated copy.sh and still added ags
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 60 |
1 files changed, 60 insertions, 0 deletions
@@ -235,13 +235,37 @@ 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 + + # Uncomment the ags overview keybind (tolerates spaces/tabs) + sed -i '/^\s*#\s*bind\s*=\s*\$mainMod,\s*A,\s*exec,\s*pkill rofi\s*\|\|\s*true\s*&&\s*ags\s*-t\s*'\''overview'\''/s/^\s*#\s*//' config/hypr/UserConfigs/UserKeybinds.conf + + # Comment the quickshell line if not already commented (tolerates spaces/tabs) + sed -i '/^\s*bind\s*=\s*\$mainMod,\s*A,\s*global,\s*quickshell:overviewToggle/{ + s/^\s*/#/ + }' config/hypr/UserConfigs/UserKeybinds.conf +fi + # 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 + + # Uncomment the quickshell keybind line (tolerates spaces/tabs) + sed -i '/^\s*#\s*bind\s*=\s*\$mainMod,\s*A,\s*global,\s*quickshell:overviewToggle/s/^\s*#\s*//' config/hypr/UserConfigs/UserKeybinds.conf + + # Ensure the ags overview keybind is commented (tolerates spaces/tabs) + sed -i '/^\s*bind\s*=\s*\$mainMod,\s*A,\s*exec,\s*pkill rofi\s*\|\|\s*true\s*&&\s*ags\s*-t\s*'\''overview'\''/{ + s/^\s*/#/ + }' config/hypr/UserConfigs/UserKeybinds.conf fi + printf "\n%.0s" {1..1} # Checking if neovim or vim is installed and offer user if they want to make as default editor @@ -665,6 +689,42 @@ done printf "\n%.0s" {1..1} +# ags config +# Check if ags is installed +if command -v ags >/dev/null 2>&1; then + echo -e "${NOTE} - ${YELLOW}ags${RESET} is detected as installed" + + DIRPATH_AGS="$HOME/.config/ags" + + if [ ! -d "$DIRPATH_AGS" ]; then + echo "${INFO} - ags config not found, copying new config." + if [ -d "config/ags" ]; then + cp -r "config/ags/" "$DIRPATH_AGS" 2>&1 | tee -a "$LOG" + fi + else + read -p "${CAT} Do you want to overwrite your existing ${YELLOW}ags${RESET} config? [y/N] " answer_ags + case "$answer_ags" in + [Yy]* ) + BACKUP_DIR=$(get_backup_dirname) + mv "$DIRPATH_AGS" "$DIRPATH_AGS-backup-$BACKUP_DIR" 2>&1 | tee -a "$LOG" + echo -e "${NOTE} - Backed up ags config to $DIRPATH_AGS-backup-$BACKUP_DIR" + + if cp -r "config/ags/" "$DIRPATH_AGS" 2>&1 | tee -a "$LOG"; then + echo "${OK} - ${YELLOW}ags configs${RESET} overwritten successfully." + else + echo "${ERROR} - Failed to copy ${YELLOW}ags${RESET} config." + exit 1 + fi + ;; + * ) + echo "${NOTE} - Skipping overwrite of ags config." + ;; + esac + fi +fi + +printf "\n%.0s" {1..1} + # quickshell (ags alternative) # Check if quickshell is installed if command -v qs >/dev/null 2>&1; then |
