diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-02-23 18:47:47 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2026-02-23 18:47:47 -0500 |
| commit | 59e87cbf4482efb6d7c8ff766f80b0286a20732b (patch) | |
| tree | 7b2bdf7ae6c399a54e154896b78dfef9ec0dd2b7 /copy.sh | |
| parent | c8767dfaa8c9efbeeec0293ffe4287a40c02b34c (diff) | |
| parent | c1ae43efc9196eca55c59cc43dd8f85975d84206 (diff) | |
Merge branch 'development'
Conflicts:
README.md
config/fastfetch/config-compact.jsonc
config/fastfetch/config.jsonc
config/hypr/scripts/Tak0-Per-Window-Switch.sh
i18n/README/README.de.md
i18n/README/README.jp.md
i18n/README/README.ro.md
i18n/README/README.ru.md
i18n/README/README.ua.md
It looks like you may be committing a merge.
If this is not correct, please run
git update-ref -d MERGE_HEAD
and try again.
Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
On branch main
Your branch is up to date with 'origin/main'.
All conflicts fixed but you are still merging.
Changes to be committed:
modified: CHANGELOG.md
modified: README.md
renamed: update-dots.sh -> archive/update-dots.sh
new file: assets/waybar-weather.gz
new file: config/fastfetch/config-compact-legacy.jsonc
modified: config/fastfetch/config-compact.jsonc
modified: config/fastfetch/config.jsonc
new file: config/fastfetch/config.legacy.jsonc
modified: config/hypr/UserConfigs/WindowRules.conf
new file: config/hypr/UserScripts/RainbowBorders-low-cpu.sh
modified: config/hypr/configs/ENVariables.conf
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/configs/Startup_Apps.conf
modified: config/hypr/configs/WindowRules-config-v3.conf
modified: config/hypr/configs/WindowRules.conf
modified: config/hypr/monitors.conf
modified: config/hypr/scripts/Kitty_themes.sh
modified: config/hypr/scripts/Kool_Quick_Settings.sh
new file: config/hypr/scripts/PortalHyprlandUbuntu2604.sh
modified: config/hypr/scripts/Refresh.sh
modified: config/hypr/scripts/Tak0-Per-Window-Switch.sh
new file: config/hypr/scripts/Toggle-Active-Window-Audio.sh
new file: config/hypr/scripts/Toggle-weather-waybar-units.sh
modified: config/hypr/scripts/WallustSwww.sh
modified: config/hypr/scripts/WaybarCava.sh
new file: config/hypr/scripts/dots-tui
new file: config/hypr/scripts/dots-tui-ubuntu-2404
new file: config/hypr/scripts/hyprshot.sh
new file: config/hypr/scripts/install-uv.sh
renamed: config/hypr/v2.3.20 -> config/hypr/v2.3.21
modified: config/hypr/wallpaper_effects/.wallpaper_current
modified: config/kitty/kitty.conf
new file: config/rofi/00-terminal.rasi
modified: config/rofi/config.rasi
modified: config/wallust/templates/colors-waybar.css
new file: config/wallust/wallust-kitty.toml
modified: config/wallust/wallust.toml
new file: config/waybar-weather/cityname.txt
new file: config/waybar-weather/config.toml
new file: config/waybar-weather/geolocation.txt
modified: config/waybar/ModulesCustom
modified: config/waybar/config
renamed: config/waybar/configs/[BOT & Left] SouthWest -> config/waybar/configs/BOT-&-Left-SouthWest
renamed: config/waybar/configs/[BOT & Right] SouthEast -> config/waybar/configs/BOT-&-Right-SouthEast
renamed: config/waybar/configs/[BOT] Camellia -> config/waybar/configs/BOT-Camellia
renamed: config/waybar/configs/[BOT] Chrysanthemum -> config/waybar/configs/BOT-Chrysanthemum
renamed: config/waybar/configs/[BOT] Default -> config/waybar/configs/BOT-Default
renamed: config/waybar/configs/[BOT] Default Laptop -> config/waybar/configs/BOT-Default-Laptop
renamed: config/waybar/configs/[BOT] Gardenia -> config/waybar/configs/BOT-Gardenia
renamed: config/waybar/configs/[BOT] Peony -> config/waybar/configs/BOT-Peony
renamed: config/waybar/configs/[BOT] Simple -> config/waybar/configs/BOT-Simple
renamed: config/waybar/configs/[BOT] Sleek -> config/waybar/configs/BOT-Sleek
renamed: config/waybar/configs/[LEFT] WestWing -> config/waybar/configs/LEFT-WestWing
renamed: config/waybar/configs/[LEFT] WestWing v2 -> config/waybar/configs/LEFT-WestWing-v2
renamed: config/waybar/configs/[RIGHT] EastWing -> config/waybar/configs/RIGHT-EastWing
renamed: config/waybar/configs/[RIGHT] EastWing v2 -> config/waybar/configs/RIGHT-EastWing-v2
renamed: config/waybar/configs/[TOP & BOT] SummitSplit -> config/waybar/configs/TOP-&-BOT-SummitSplit
renamed: config/waybar/configs/[TOP & BOT] SummitSplit-glass -> config/waybar/configs/TOP-&-BOT-SummitSplit-glass
renamed: config/waybar/configs/[TOP & BOT] SummitSplit v2 -> config/waybar/configs/TOP-&-BOT-SummitSplit-v2
new file: config/waybar/configs/TOP-&-BOT-SummitSplit-v3
renamed: config/waybar/configs/[TOP & Left] NorthWest -> config/waybar/configs/TOP-&-Left-NorthWest
renamed: config/waybar/configs/[TOP & Right] NorthEast -> config/waybar/configs/TOP-&-Right-NorthEast
renamed: config/waybar/configs/[TOP] 0-Ja-0 -> config/waybar/configs/TOP-0-Ja-0
renamed: config/waybar/configs/[TOP] Arrow -> config/waybar/configs/TOP-Arrow
renamed: config/waybar/configs/[TOP] Camellia -> config/waybar/configs/TOP-Camellia
renamed: config/waybar/configs/[TOP] Chrysanthemum -> config/waybar/configs/TOP-Chrysanthemum
renamed: config/waybar/configs/[TOP] Default -> config/waybar/configs/TOP-Default
renamed: config/waybar/configs/[TOP] Default Laptop -> config/waybar/configs/TOP-Default-Laptop
renamed: config/waybar/configs/[TOP] Default Laptop-glass -> config/waybar/configs/TOP-Default-Laptop-glass
renamed: config/waybar/configs/[TOP] Default Laptop (old v1) -> config/waybar/configs/TOP-Default-Laptop-old-v1
renamed: config/waybar/configs/[TOP] Default Laptop (old v2) -> config/waybar/configs/TOP-Default-Laptop-old-v2
renamed: config/waybar/configs/[TOP] Default Laptop (old v3) -> config/waybar/configs/TOP-Default-Laptop-old-v3
renamed: config/waybar/configs/[TOP] Default Laptop (old v4) -> config/waybar/configs/TOP-Default-Laptop-old-v4
renamed: config/waybar/configs/[TOP] Default Laptop (old v5) -> config/waybar/configs/TOP-Default-Laptop-old-v5
renamed: config/waybar/configs/[TOP] Default (old v1) -> config/waybar/configs/TOP-Default-old-v1
renamed: config/waybar/configs/[TOP] Default (old v2) -> config/waybar/configs/TOP-Default-old-v2
renamed: config/waybar/configs/[TOP] Default (old v3) -> config/waybar/configs/TOP-Default-old-v3
renamed: config/waybar/configs/[TOP] Default (old v4) -> config/waybar/configs/TOP-Default-old-v4
renamed: config/waybar/configs/[TOP] Everforest -> config/waybar/configs/TOP-Everforest
renamed: config/waybar/configs/[TOP] Everforest-glass -> config/waybar/configs/TOP-Everforest-glass
renamed: config/waybar/configs/[TOP] Gardenia -> config/waybar/configs/TOP-Gardenia
renamed: config/waybar/configs/[TOP] Minimal - Long -> config/waybar/configs/TOP-Minimal-Long
renamed: config/waybar/configs/[TOP] Minimal - Short -> config/waybar/configs/TOP-Minimal-Short
renamed: config/waybar/configs/[TOP] Peony -> config/waybar/configs/TOP-Peony
renamed: config/waybar/configs/[TOP] Simple -> config/waybar/configs/TOP-Simple
renamed: config/waybar/configs/[TOP] Simpliest -> config/waybar/configs/TOP-Simpliest
renamed: config/waybar/configs/[TOP] Sleek -> config/waybar/configs/TOP-Sleek
new file: config/waybar/configs/TOP-ddubs-simple-bar
modified: config/waybar/style.css
renamed: config/waybar/style/[0 VERTICAL] [Catpuccin] Mocha.css -> config/waybar/style/0-VERTICAL-Catpuccin-Mocha.css
renamed: config/waybar/style/[0 VERTICAL] Golden Noir.css -> config/waybar/style/0-VERTICAL-Golden-Noir.css
renamed: config/waybar/style/[0 VERTICAL] Oglo Chicklets.css -> config/waybar/style/0-VERTICAL-Oglo-Chicklets.css
renamed: config/waybar/style/[Black & White] Monochrome.css -> config/waybar/style/Black-&-White-Monochrome.css
renamed: config/waybar/style/[Catppuccin] Frappe.css -> config/waybar/style/Catppuccin-Frappe.css
renamed: config/waybar/style/[Catppuccin] Latte.css -> config/waybar/style/Catppuccin-Latte.css
renamed: config/waybar/style/[Catppuccin] Mocha.css -> config/waybar/style/Catppuccin-Mocha.css
renamed: config/waybar/style/[Colored] Chroma Glow.css -> config/waybar/style/Colored-Chroma-Glow.css
renamed: config/waybar/style/[Colored] Translucent.css -> config/waybar/style/Colored-Translucent.css
renamed: config/waybar/style/[Colorful] Aurora Blossom.css -> config/waybar/style/Colorful-Aurora-Blossom.css
renamed: config/waybar/style/[Colorful] Aurora.css -> config/waybar/style/Colorful-Aurora.css
renamed: config/waybar/style/[Colorful] Oglo Chicklets.css -> config/waybar/style/Colorful-Oglo-Chicklets.css
renamed: config/waybar/style/[Colorful] Rainbow Spectrum.css -> config/waybar/style/Colorful-Rainbow-Spectrum.css
renamed: config/waybar/style/[Colorful] stolen-style.css -> config/waybar/style/Colorful-stolen-style.css
renamed: config/waybar/style/Crystal Clear Glass.css -> config/waybar/style/Crystal-Clear-Glass.css
renamed: config/waybar/style/[Dark] Golden Eclipse.css -> config/waybar/style/Dark-Golden-Eclipse.css
renamed: config/waybar/style/[Dark] Golden Noir.css -> config/waybar/style/Dark-Golden-Noir.css
renamed: config/waybar/style/[Dark] Half-Moon.css -> config/waybar/style/Dark-Half-Moon.css
renamed: config/waybar/style/[Dark] Latte-Wallust combined v2.css -> config/waybar/style/Dark-Latte-Wallust-combined-v2.css
renamed: config/waybar/style/[Dark] Latte-Wallust combined.css -> config/waybar/style/Dark-Latte-Wallust-combined.css
renamed: config/waybar/style/[Dark] Purpl.css -> config/waybar/style/Dark-Purpl.css
renamed: config/waybar/style/[Dark] Wallust Obsidian Edge.css -> config/waybar/style/Dark-Wallust-Obsidian-Edge.css
renamed: config/waybar/style/[Extra] Arrow.css -> config/waybar/style/Extra-Arrow.css
renamed: config/waybar/style/[Extra] Crimson.css -> config/waybar/style/Extra-Crimson.css
renamed: config/waybar/style/[Extra] EverForest.css -> config/waybar/style/Extra-EverForest.css
renamed: config/waybar/style/[Extra] ML4W starter.css -> config/waybar/style/Extra-ML4W-starter.css
renamed: config/waybar/style/[Extra] Mauve.css -> config/waybar/style/Extra-Mauve.css
renamed: config/waybar/style/[Extra] Modern-Combined - Transparent.css -> config/waybar/style/Extra-Modern-Combined-Transparent.css
renamed: config/waybar/style/[Extra] Modern-Combined.css -> config/waybar/style/Extra-Modern-Combined.css
renamed: config/waybar/style/[Extra] Neon Circuit.css -> config/waybar/style/Extra-Neon-Circuit.css
renamed: config/waybar/style/[Extra] Prismatic Glow.css -> config/waybar/style/Extra-Prismatic-Glow.css
renamed: config/waybar/style/[Extra] Rose Pine.css -> config/waybar/style/Extra-Rose-Pine.css
renamed: config/waybar/style/[Extra] Simple Pink.css -> config/waybar/style/Extra-Simple-Pink.css
renamed: config/waybar/style/[Light] Monochrome Contrast.css -> config/waybar/style/Light-Monochrome-Contrast.css
renamed: config/waybar/style/[Light] Obsidian Glow.css -> config/waybar/style/Light-Obsidian-Glow.css
renamed: config/waybar/style/ML4W Glass-3d.css -> config/waybar/style/ML4W-Glass-3d.css
renamed: config/waybar/style/ML4W Glass.css -> config/waybar/style/ML4W-Glass.css
renamed: config/waybar/style/[Rainbow] RGB Bordered.css -> config/waybar/style/Rainbow-RGB-Bordered.css
renamed: config/waybar/style/[Retro] Simple Style.css -> config/waybar/style/Retro-Simple-Style.css
renamed: config/waybar/style/[Transparent] Crystal Clear.css -> config/waybar/style/Transparent-Crystal-Clear.css
renamed: config/waybar/style/[VERTICAL] [Catpuccin] Mocha.css -> config/waybar/style/VERTICAL-Catpuccin-Mocha.css
renamed: config/waybar/style/[Wallust Bordered] Chroma Fusion Edge.css -> config/waybar/style/Wallust-Bordered-Chroma-Fusion-Edge.css
renamed: config/waybar/style/[Wallust Bordered] Chroma Simple.css -> config/waybar/style/Wallust-Bordered-Chroma-Simple.css
renamed: config/waybar/style/[Wallust] Box type.css -> config/waybar/style/Wallust-Box-type.css
renamed: config/waybar/style/[Wallust] Chroma Edge.css -> config/waybar/style/Wallust-Chroma-Edge.css
renamed: config/waybar/style/[Wallust] Chroma Fusion.css -> config/waybar/style/Wallust-Chroma-Fusion.css
renamed: config/waybar/style/[Wallust] Chroma Tally V2.css -> config/waybar/style/Wallust-Chroma-Tally-V2.css
renamed: config/waybar/style/[Wallust] Chroma Tally.css -> config/waybar/style/Wallust-Chroma-Tally.css
renamed: config/waybar/style/[Wallust] Colored.css -> config/waybar/style/Wallust-Colored.css
renamed: config/waybar/style/[WALLUST] ML4W-modern-mixed.css -> config/waybar/style/Wallust-ML4W-modern-mixed.css
renamed: config/waybar/style/[WALLUST] ML4W-modern.css -> config/waybar/style/Wallust-ML4W-modern.css
renamed: config/waybar/style/[Wallust] Simple.css -> config/waybar/style/Wallust-Simple.css
renamed: config/waybar/style/[Wallust Transparent] Crystal Clear.css -> config/waybar/style/Wallust-Transparent-Crystal-Clear.css
modified: config/waybar/wallust/colors-waybar.css
modified: copy.sh
renamed: CODE_OF_CONDUCT.es.md -> i18n/CODE_OF_CONDUCT/CODE_OF_CONDUCT.es.md
new file: i18n/CODE_OF_CONDUCT/CODE_OF_CONDUCT.fr.md
renamed: COMMIT_MESSAGE_GUIDELINES.es.md -> i18n/COMMIT_MESSAGE_GUIDELINES/COMMIT_MESSAGE_GUIDELINES.es.md
new file: i18n/COMMIT_MESSAGE_GUIDELINES/COMMIT_MESSAGE_GUIDELINES.fr.md
renamed: CONTRIBUTING.es.md -> i18n/CONTRIBUTING/CONTRIBUTING.es.md
new file: i18n/CONTRIBUTING/CONTRIBUTING.fr.md
renamed: i18n/README.de.md -> i18n/README/README.de.md
new file: i18n/README/README.fr.md
renamed: i18n/README.jp.md -> i18n/README/README.jp.md
renamed: i18n/README.ro.md -> i18n/README/README.ro.md
renamed: i18n/README.ru.md -> i18n/README/README.ru.md
renamed: i18n/README.ua.md -> i18n/README/README.ua.md
modified: scripts/lib_apps.sh
modified: scripts/lib_copy.sh
modified: scripts/lib_prompts.sh
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 250 |
1 files changed, 181 insertions, 69 deletions
@@ -31,9 +31,10 @@ clear wallpaper=$HOME/.config/hypr/wallpaper_effects/.wallpaper_current -waybar_style="$HOME/.config/waybar/style/[Extra] Neon Circuit.css" -waybar_config="$HOME/.config/waybar/configs/[TOP] Default" -waybar_config_laptop="$HOME/.config/waybar/configs/[TOP] Default Laptop" +# Defaults updated to normalized names +waybar_style="$HOME/.config/waybar/style/Extra-Prismatic-Glow.css" +waybar_config="$HOME/.config/waybar/configs/TOP-Default" +waybar_config_laptop="$HOME/.config/waybar/configs/TOP-Default-Laptop" # Set some colors for output messages OK="$(tput setaf 2)[OK]$(tput sgr0)" @@ -52,6 +53,8 @@ SKY_BLUE="$(tput setaf 6)" RESET="$(tput sgr0)" MIN_EXPRESS_VERSION="2.3.18" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DOTFILES_DIR="$SCRIPT_DIR" +export DOTFILES_DIR MENU_HELPER="$SCRIPT_DIR/scripts/copy_menu.sh" BACKUP_HELPER="$SCRIPT_DIR/scripts/lib_backup.sh" DETECT_HELPER="$SCRIPT_DIR/scripts/lib_detect.sh" @@ -106,6 +109,9 @@ else exit 1 fi +# Ensure we operate from the dotfiles root so relative paths resolve. +cd "$SCRIPT_DIR" || { echo "${ERROR} Failed to cd to $SCRIPT_DIR"; exit 1; } + version_gte() { [ "$1" = "$(echo -e "$1\n$2" | sort -V | tail -n1)" ] } @@ -114,10 +120,10 @@ get_installed_dotfiles_version() { local hypr_dir="$HOME/.config/hypr" if [ -d "$hypr_dir" ]; then # Pick the highest semantic version among files named vX.Y.Z - find "$hypr_dir" -maxdepth 1 -type f -name 'v*.*.*' -printf '%f\n' 2>/dev/null \ - | sed 's/^v//' \ - | sort -V \ - | tail -n1 + find "$hypr_dir" -maxdepth 1 -type f -name 'v*.*.*' -printf '%f\n' 2>/dev/null | + sed 's/^v//' | + sort -V | + tail -n1 fi } @@ -136,6 +142,7 @@ Usage: copy.sh [--upgrade] [--express-upgrade] [--help] Options: --upgrade Run the script in upgrade mode (can still prompt for express). --express-upgrade Upgrade with express behavior (no restore prompts, trims backups). + --tty Force basic TTY prompts (no whiptail menu). -h, --help Show this help message and exit. EOF } @@ -155,6 +162,9 @@ while [[ $# -gt 0 ]]; do EXPRESS_MODE=1 RUN_MODE="express" ;; + --tty) + COPY_TUI_BACKEND="basic" + ;; -h | --help) print_usage exit 0 @@ -229,6 +239,11 @@ if [[ $EUID -eq 0 ]]; then printf "\n%.0s" {1..2} exit 1 fi +# Ensure rsync is available before proceeding +if ! command -v rsync >/dev/null 2>&1; then + echo "${ERROR} Required dependency 'rsync' is not installed. Please install rsync and rerun this script." + exit 1 +fi # Function to print colorful text print_color() { @@ -275,16 +290,21 @@ echo "${WARNING}A T T E N T I O N !${RESET}" echo "${MAGENTA}Kindly visit KooL Hyprland Own Wiki for changelogs${RESET}" printf "\n%.0s" {1..1} -# Create Directory for Copy Logs -if [ ! -d Copy-Logs ]; then - mkdir Copy-Logs +# Create Directory for Copy Logs (use script dir to avoid CWD issues) +LOG_DIR="$SCRIPT_DIR/Copy-Logs" +if [ ! -d "$LOG_DIR" ]; then + mkdir -p "$LOG_DIR" fi # 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" +LOG="$LOG_DIR/install-$(date +%d-%H%M%S)_dotfiles.log" -# update home directories -xdg-user-dirs-update 2>&1 | tee -a "$LOG" || true +# update home directories (guard if command missing) +if command -v xdg-user-dirs-update >/dev/null 2>&1; then + xdg-user-dirs-update 2>&1 | tee -a "$LOG" || true +else + echo "${WARN} xdg-user-dirs-update not found; skipping home dir update." 2>&1 | tee -a "$LOG" +fi echo "${INFO} Selected workflow: ${RUN_MODE}" 2>&1 | tee -a "$LOG" if [ "$UPGRADE_MODE" -eq 1 ]; then echo "${INFO} Upgrade mode enabled." 2>&1 | tee -a "$LOG" @@ -296,10 +316,20 @@ fi detect_nvidia_adjust "$LOG" detect_vm_adjust "$LOG" detect_nixos_adjust "$LOG" +# NixOS: report missing waybar-weather without attempting to install +is_nixos() { + grep -qi '^ID=nixos' /etc/os-release 2>/dev/null +} + +report_waybar_weather_missing() { + if ! command -v waybar-weather >/dev/null 2>&1; then + echo "${WARN} waybar-weather binary is missing." 2>&1 | tee -a "$LOG" + fi +} # activating hyprcursor on env by checking if the directory ~/.icons/Bibata-Modern-Ice/hyprcursors exists if [ -d "$HOME/.icons/Bibata-Modern-Ice/hyprcursors" ]; then - HYPRCURSOR_ENV_FILE="config/hypr/configs/ENVariables.conf" + HYPRCURSOR_ENV_FILE="$DOTFILES_DIR/config/hypr/configs/ENVariables.conf" echo "${INFO} Bibata-Hyprcursor directory detected. Activating Hyprcursor...." 2>&1 | tee -a "$LOG" || true sed -i 's/^#env = HYPRCURSOR_THEME,Bibata-Modern-Ice/env = HYPRCURSOR_THEME,Bibata-Modern-Ice/' "$HYPRCURSOR_ENV_FILE" sed -i 's/^#env = HYPRCURSOR_SIZE,24/env = HYPRCURSOR_SIZE,24/' "$HYPRCURSOR_ENV_FILE" @@ -315,7 +345,11 @@ enable_blueman "$LOG" enable_ags "$LOG" enable_quickshell "$LOG" ensure_keybinds_init "$LOG" - +if is_nixos; then + report_waybar_weather_missing +else + install_waybar_weather "$LOG" +fi printf "\n%.0s" {1..1} choose_default_editor "$LOG" @@ -327,26 +361,32 @@ while true; do echo -n "${CAT} Enter the number of your choice (1 or 2): " read -r choice case "$choice" in - 1) resolution="< 1440p"; break ;; - 2) resolution="≥ 1440p"; break ;; - *) echo "${ERROR} Invalid choice. Please enter 1 or 2.";; + 1) + resolution="< 1440p" + break + ;; + 2) + resolution="≥ 1440p" + break + ;; + *) echo "${ERROR} Invalid choice. Please enter 1 or 2." ;; esac done echo "${OK} You have chosen $resolution resolution." 2>&1 | tee -a "$LOG" if [ "$resolution" == "< 1440p" ]; then # kitty font size - sed -i 's/font_size 16.0/font_size 14.0/' config/kitty/kitty.conf + sed -i 's/font_size 16.0/font_size 14.0/' "$DOTFILES_DIR/config/kitty/kitty.conf" # hyprlock matters - if [ -f config/hypr/hyprlock.conf ]; then - mv config/hypr/hyprlock.conf config/hypr/hyprlock-2k.conf + if [ -f "$DOTFILES_DIR/config/hypr/hyprlock.conf" ]; then + mv "$DOTFILES_DIR/config/hypr/hyprlock.conf" "$DOTFILES_DIR/config/hypr/hyprlock-2k.conf" fi - if [ -f config/hypr/hyprlock-1080p.conf ]; then - mv config/hypr/hyprlock-1080p.conf config/hypr/hyprlock.conf + if [ -f "$DOTFILES_DIR/config/hypr/hyprlock-1080p.conf" ]; then + mv "$DOTFILES_DIR/config/hypr/hyprlock-1080p.conf" "$DOTFILES_DIR/config/hypr/hyprlock.conf" fi # rofi fonts reduction - rofi_config_file="config/rofi/0-shared-fonts.rasi" + rofi_config_file="$DOTFILES_DIR/config/rofi/0-shared-fonts.rasi" if [ -f "$rofi_config_file" ]; then sed -i '/element-text {/,/}/s/[[:space:]]*font: "JetBrainsMono Nerd Font SemiBold 13"/font: "JetBrainsMono Nerd Font SemiBold 11"/' "$rofi_config_file" 2>&1 | tee -a "$LOG" sed -i '/configuration {/,/}/s/[[:space:]]*font: "JetBrainsMono Nerd Font SemiBold 15"/font: "JetBrainsMono Nerd Font SemiBold 13"/' "$rofi_config_file" 2>&1 | tee -a "$LOG" @@ -368,13 +408,76 @@ if [ ! -d "$HOME/.config" ]; then fi printf "${INFO} - copying dotfiles ${SKY_BLUE}first${RESET} part\n" -copy_phase1 "$LOG" +copy_phase1 "$LOG" "$RUN_MODE" printf "\n%.0s" {1..1} copy_waybar "$LOG" printf "\n%.0s" {1..1} printf "${INFO} - Copying dotfiles ${SKY_BLUE}second${RESET} part\n" copy_phase2 "$LOG" printf "\\n%.0s" {1..1} +# waybar-weather config handling: +# - install (fresh copy): always overwrite and prompt for units +# - upgrade (non-express): copy only if missing; prompt only if copied +# - express: copy only if missing; never prompt +WAYBAR_WEATHER_SRC="$DOTFILES_DIR/config/waybar-weather" +WAYBAR_WEATHER_DEST="$HOME/.config/waybar-weather" +WAYBAR_WEATHER_COPIED=0 + +if [ "$RUN_MODE" = "install" ]; then + if [ -d "$WAYBAR_WEATHER_SRC" ]; then + echo "${INFO} - Copying waybar-weather config (fresh copy)" 2>&1 | tee -a "$LOG" + rm -rf "$WAYBAR_WEATHER_DEST" + mkdir -p "$WAYBAR_WEATHER_DEST" + cp -r "$WAYBAR_WEATHER_SRC/." "$WAYBAR_WEATHER_DEST/" 2>&1 | tee -a "$LOG" + WAYBAR_WEATHER_COPIED=1 + else + echo "${WARN} - waybar-weather config not found at $WAYBAR_WEATHER_SRC" 2>&1 | tee -a "$LOG" + fi +elif [ "$RUN_MODE" = "upgrade" ] || [ "$RUN_MODE" = "express" ]; then + if [ -d "$WAYBAR_WEATHER_DEST" ]; then + echo "${INFO} - waybar-weather config exists; skipping copy" 2>&1 | tee -a "$LOG" + else + if [ -d "$WAYBAR_WEATHER_SRC" ]; then + echo "${INFO} - Copying waybar-weather config" 2>&1 | tee -a "$LOG" + mkdir -p "$WAYBAR_WEATHER_DEST" + cp -r "$WAYBAR_WEATHER_SRC/." "$WAYBAR_WEATHER_DEST/" 2>&1 | tee -a "$LOG" + WAYBAR_WEATHER_COPIED=1 + else + echo "${WARN} - waybar-weather config not found at $WAYBAR_WEATHER_SRC" 2>&1 | tee -a "$LOG" + fi + fi +fi + +if [ "$EXPRESS_MODE" -eq 0 ] && [ "$WAYBAR_WEATHER_COPIED" -eq 1 ]; then + while true; do + read -r -p "${CAT} Use Fahrenheit (F) or Celsius (C)? [C]: " WEATHER_UNITS + WEATHER_UNITS=$(echo "${WEATHER_UNITS}" | tr '[:upper:]' '[:lower:]') + case "$WEATHER_UNITS" in + f|fahrenheit) + WEATHER_CFG="$WAYBAR_WEATHER_DEST/config.toml" + if [ -f "$WEATHER_CFG" ]; then + if grep -qE '^[[:space:]]*units[[:space:]]*=' "$WEATHER_CFG"; then + sed -i 's/^[[:space:]]*units[[:space:]]*=.*/units = "imperial"/' "$WEATHER_CFG" + elif grep -qE '^[[:space:]]*#\s*units[[:space:]]*=' "$WEATHER_CFG"; then + sed -i 's/^[[:space:]]*#\s*units[[:space:]]*=.*/units = "imperial"/' "$WEATHER_CFG" + else + printf '\nunits = "imperial"\n' >> "$WEATHER_CFG" + fi + echo "${OK} - Set waybar-weather units to imperial" 2>&1 | tee -a "$LOG" + else + echo "${WARN} - waybar-weather config not found at $WEATHER_CFG" 2>&1 | tee -a "$LOG" + fi + break + ;; + c|celsius|"") + # Default config already uses metric; no change needed + break + ;; + *) + echo "${WARN} Please enter 'F' or 'C'." ;; + esac + done +fi # ags config # Check if ags is installed @@ -385,8 +488,8 @@ if command -v ags >/dev/null 2>&1; then 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" + if [ -d "$DOTFILES_DIR/config/ags" ]; then + cp -r "$DOTFILES_DIR/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 @@ -396,7 +499,7 @@ if command -v ags >/dev/null 2>&1; then 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 + if cp -r "$DOTFILES_DIR/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." @@ -426,8 +529,8 @@ if command -v qs >/dev/null 2>&1; then 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" + if [ -d "$DOTFILES_DIR/config/quickshell" ]; then + cp -r "$DOTFILES_DIR/config/quickshell/" "$DIRPATH_QS" 2>&1 | tee -a "$LOG" fi else # If default shell.qml exists, it blocks named config subdirectory detection @@ -436,7 +539,7 @@ if command -v qs >/dev/null 2>&1; then echo "${NOTE} - Removing default shell.qml to enable quickshell overview config detection" 2>&1 | tee -a "$LOG" rm "$DIRPATH_QS/shell.qml" fi - + read -p "${CAT} Do you want to overwrite your existing ${YELLOW}quickshell${RESET} config? [y/N] " answer_qs case "$answer_qs" in [Yy]*) @@ -444,7 +547,7 @@ if command -v qs >/dev/null 2>&1; then 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" + cp -r "$DOTFILES_DIR/config/quickshell/" "$DIRPATH_QS" 2>&1 | tee -a "$LOG" if [ $? -eq 0 ]; then echo "${OK} - ${YELLOW}quickshell${RESET} overwritten successfully." # Remove default shell.qml from new copy to enable overview detection @@ -459,15 +562,15 @@ if command -v qs >/dev/null 2>&1; then ;; esac fi - + # Ensure overview subdirectory exists and is up to date DIRPATH_OVERVIEW="$DIRPATH_QS/overview" - if [ ! -d "$DIRPATH_OVERVIEW" ] && [ -d "config/quickshell/overview" ]; then + if [ ! -d "$DIRPATH_OVERVIEW" ] && [ -d "$DOTFILES_DIR/config/quickshell/overview" ]; then echo "${INFO} - Copying quickshell overview config..." 2>&1 | tee -a "$LOG" - cp -r "config/quickshell/overview" "$DIRPATH_QS/" 2>&1 | tee -a "$LOG" + cp -r "$DOTFILES_DIR/config/quickshell/overview" "$DIRPATH_QS/" 2>&1 | tee -a "$LOG" echo "${OK} - Quickshell overview config copied successfully" 2>&1 | tee -a "$LOG" fi - + # Check for old quickshell startup commands and update them HYPR_STARTUP="$HOME/.config/hypr/configs/Startup_Apps.conf" if [ -f "$HYPR_STARTUP" ]; then @@ -517,12 +620,13 @@ printf "\n%.0s" {1..1} # wallpaper stuff PICTURES_DIR="$(xdg-user-dir PICTURES 2>/dev/null || echo "$HOME/Pictures")" mkdir -p "$PICTURES_DIR/wallpapers" -if cp -r wallpapers "$PICTURES_DIR/"; then +if cp -r "$SCRIPT_DIR/wallpapers" "$PICTURES_DIR/"; then echo "${OK} Some ${MAGENTA}wallpapers${RESET} copied successfully!" | tee -a "$LOG" else echo "${ERROR} Failed to copy some ${YELLOW}wallpapers${RESET}" | tee -a "$LOG" fi + # Set some files as executable chmod +x "$HOME/.config/hypr/scripts/"* 2>&1 | tee -a "$LOG" chmod +x "$HOME/.config/hypr/UserScripts/"* 2>&1 | tee -a "$LOG" @@ -538,9 +642,22 @@ else config_remove="" fi -# Check if ~/.config/waybar/config does not exist or is a symlink -if [ ! -e "$HOME/.config/waybar/config" ] || [ -L "$HOME/.config/waybar/config" ]; then - ln -sf "$config_file" "$HOME/.config/waybar/config" 2>&1 | tee -a "$LOG" +# Ensure waybar config uses the normalized default. +# - If the current path is not a symlink (regular file), convert it to a symlink. +# - If the symlink points somewhere else (or is broken), reset it to the new default. +WAYBAR_CONFIG_LINK="$HOME/.config/waybar/config" +WAYBAR_CONFIG_TARGET="$config_file" +if [ -e "$WAYBAR_CONFIG_TARGET" ]; then + if [ -L "$WAYBAR_CONFIG_LINK" ]; then + current_target=$(readlink "$WAYBAR_CONFIG_LINK" || true) + if [ "$current_target" != "$WAYBAR_CONFIG_TARGET" ] || [ ! -e "$WAYBAR_CONFIG_LINK" ]; then + ln -sf "$WAYBAR_CONFIG_TARGET" "$WAYBAR_CONFIG_LINK" 2>&1 | tee -a "$LOG" + fi + else + ln -sf "$WAYBAR_CONFIG_TARGET" "$WAYBAR_CONFIG_LINK" 2>&1 | tee -a "$LOG" + fi +else + echo "${WARN} Waybar default config target not found at $WAYBAR_CONFIG_TARGET; leaving $WAYBAR_CONFIG_LINK as-is." 2>&1 | tee -a "$LOG" fi # Remove inappropriate waybar configs @@ -555,32 +672,10 @@ printf "\n%.0s" {1..1} # for SDDM (simple_sddm_2) sddm_simple_sddm_2="/usr/share/sddm/themes/simple_sddm_2" -if [ -d "$sddm_simple_sddm_2" ] && [ "$EXPRESS_MODE" -eq 1 ]; then - echo "${NOTE} Express mode: skipping SDDM wallpaper prompt." 2>&1 | tee -a "$LOG" -elif [ -d "$sddm_simple_sddm_2" ]; then - while true; do - 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 - SDDM_WALL=$(echo "$SDDM_WALL" | tr -d '\n' | tr -d ' ') - - case $SDDM_WALL in - [Yy]) - # Copy the wallpaper, ignore errors if the file exists or fails - sudo -n 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 - ;; - [Nn]) - echo "${NOTE} You chose not to apply the current wallpaper to SDDM." 2>&1 | tee -a "$LOG" - break - ;; - *) - echo "Please enter 'y' or 'n' to proceed." - ;; - esac - done +if [ -d "$sddm_simple_sddm_2" ]; then + # Apply the current wallpaper as SDDM background without prompting + sudo -n cp -r "$DOTFILES_DIR/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" fi # additional wallpapers @@ -636,15 +731,32 @@ else cleanup_backups prompt "$LOG" fi -# Check if ~/.config/waybar/style.css does not exist or is a symlink -if [ ! -e "$HOME/.config/waybar/style.css" ] || [ -L "$HOME/.config/waybar/style.css" ]; then - ln -sf "$waybar_style" "$HOME/.config/waybar/style.css" 2>&1 | tee -a "$LOG" +# Ensure waybar style uses the normalized default. +# - If the current path is not a symlink (regular file), convert it to a symlink. +# - If the symlink points somewhere else (or is broken), reset it to the new default. +WAYBAR_STYLE_LINK="$HOME/.config/waybar/style.css" +WAYBAR_STYLE_TARGET="$waybar_style" +if [ -e "$WAYBAR_STYLE_TARGET" ]; then + if [ -L "$WAYBAR_STYLE_LINK" ]; then + current_target=$(readlink "$WAYBAR_STYLE_LINK" || true) + if [ "$current_target" != "$WAYBAR_STYLE_TARGET" ] || [ ! -e "$WAYBAR_STYLE_LINK" ]; then + ln -sf "$WAYBAR_STYLE_TARGET" "$WAYBAR_STYLE_LINK" 2>&1 | tee -a "$LOG" + fi + else + ln -sf "$WAYBAR_STYLE_TARGET" "$WAYBAR_STYLE_LINK" 2>&1 | tee -a "$LOG" + fi +else + echo "${WARN} Waybar default style target not found at $WAYBAR_STYLE_TARGET; leaving $WAYBAR_STYLE_LINK as-is." 2>&1 | tee -a "$LOG" fi printf "\n%.0s" {1..1} # initialize wallust to avoid config error on hyprland wallust run -s $wallpaper 2>&1 | tee -a "$LOG" +if is_nixos && ! command -v waybar-weather >/dev/null 2>&1; then + echo "${WARN} waybar-weather binary is missing." 2>&1 | tee -a "$LOG" + echo "Install the current NixOS-Hyprland version to install waybar-weather applet for Waybar" 2>&1 | tee -a "$LOG" +fi printf "\n%.0s" {1..2} printf "${OK} GREAT! KooL's Hyprland-Dots is now Loaded & Ready !!! " |
