-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
79 lines (67 loc) · 2.28 KB
/
setup.sh
File metadata and controls
79 lines (67 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env bash
#fancy title
cat <<"HI"
____ _
/ ___| ___| |_ _ _ _ __
\___ \ / _ \ __| | | | '_ \
___) | __/ |_| |_| | |_) |
|____/ \___|\__|\__,_| .__/
|_|
HI
set -euo pipefail
#================================================================
# Hyprland Dotfiles Setup
#================================================================
bold=$(tput bold)
normal=$(tput sgr0)
# Where your repo lives (after running install script)
INSTALL_DIR="$HOME/.local/share/Mine_Hyprland_dots"
DOTFILES_DIR="$INSTALL_DIR/DOTFILES/.config"
# Verify the repo is present
if [[ ! -d "$DOTFILES_DIR" ]]; then
echo "${bold}Error:${normal} Dotfiles directory not found at $DOTFILES_DIR"
echo "Please run the install script first."
exit 1
fi
echo "${bold}Starting setup of Hyprland dotfiles...${normal}"
# List of sub‑folders in .config to install
declare -a apps=(hypr waybar swaync rofi scripts kitty wlogout nvim gtk-3.0 wallpapers)
for app in "${apps[@]}"; do
SRC="$DOTFILES_DIR/$app"
DEST="$HOME/.config/$app"
# Ensure source exists
if [[ ! -d "$SRC" ]]; then
echo "${bold}Warning:${normal} Source folder '$SRC' not found—skipping."
continue
fi
# Backup existing config if present
if [[ -d "$DEST" ]]; then
ts=$(date +%Y%m%d-%H%M%S)
BACKUP="$HOME/.config/${app}-backup-$ts"
echo "Backing up existing '$app' → $BACKUP"
mv "$DEST" "$BACKUP"
fi
# Create target and copy
echo "Installing '$app' configs → $DEST"
mkdir -p "$DEST"
cp -r "$SRC"/. "$DEST"/
done
cat <<"BYE-SETUP"
____ _
/ ___| ___| |_ _ _ _ __ __ ____ _ ___
\___ \ / _ \ __| | | | '_ \ \ \ /\ / / _` / __|
___) | __/ |_| |_| | |_) | \ V V / (_| \__ \
|____/ \___|\__|\__,_| .__/ \_/\_/ \__,_|___/
|_|
__ _
___ _ _ ___ ___ ___ ___ ___ / _|_ _| |
/ __| | | |/ __/ __/ _ \/ __/ __| |_| | | | |
\__ \ |_| | (_| (_| __/\__ \__ \ _| |_| | |
|___/\__,_|\___\___\___||___/___/_| \__,_|_|
BYE-SETUP
echo
echo "${bold}Setup complete!${normal}"
echo "Your configs live in ~/.config/{${apps[*]}}"
echo "Old versions (if any) backed up as *-backup-<timestamp>."
echo "run following commend to chose which network interface to use for waybar module"
echo "bash ~/.config/scripts/set_waybar_iface.sh"