-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
195 lines (168 loc) · 5.74 KB
/
Copy pathinstall.sh
File metadata and controls
195 lines (168 loc) · 5.74 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#!/bin/bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}╔══════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ Welcome to eehcx dotfiles installation! ║${NC}"
echo -e "${GREEN}╚══════════════════════════════════════════╝${NC}"
echo " ";
echo " ______ ______ __ _ ______ __ __ ";
echo " | ___|| ___|| |_| || ___| \\ \` / ";
echo " | ___|| ___|| _ || |__ / \\ ";
echo " |______||______||__| |_||______|/__/\\_\\ ";
echo " ";
echo " ";
echo -e "${GREEN}Starting installation...${NC}"
# Function to check if command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Backup existing configs
backup_config() {
if [ -d "$1" ] || [ -f "$1" ]; then
echo -e "${YELLOW}Backing up $1 to $1.backup${NC}"
cp -r "$1" "$1.backup" 2>/dev/null
fi
}
# Install packages based on package manager
if command_exists pacman; then
echo -e "${GREEN}Detected Arch Linux. Installing packages...${NC}"
sudo pacman -S --needed \
hyprland \
foot \
waybar \
rofi \
rofi-emoji \
grim \
slurp \
gvim \
nemo \
hyprpaper \
playerctl \
brightnessctl \
wireplumber \
pipewire \
wlogout \
socat \
python \
rustup \
ratbagd
# Install wallust via cargo (needed for dynamic theming)
if ! command_exists wallust; then
echo -e "${GREEN}Installing wallust via cargo...${NC}"
rustup install stable 2>/dev/null || true
cargo install wallust
fi
elif command_exists apt; then
echo -e "${GREEN}Detected Debian/Ubuntu. Installing packages...${NC}"
sudo apt update
sudo apt install -y \
foot \
waybar \
rofi \
grim \
slurp \
vim-gtk3 \
nemo \
playerctl \
brightnessctl \
wireplumber \
pipewire \
wlogout \
socat \
python3
echo -e "${YELLOW}Note: Hyprland may need to be installed manually on Debian/Ubuntu${NC}"
echo -e "${YELLOW}Note: wallust must be installed via cargo: cargo install wallust${NC}"
fi
# Create config directories
mkdir -p ~/.config/hypr
mkdir -p ~/.config/hypr/scripts
mkdir -p ~/.config/waybar
mkdir -p ~/.config/waybar/scripts
mkdir -p ~/.config/rofi
mkdir -p ~/.config/rofi/themes
mkdir -p ~/.config/wallust
mkdir -p ~/.config/wallust/templates
mkdir -p ~/.config/wlogout
mkdir -p ~/.config/wlogout/icons
mkdir -p ~/.config/gtk-3.0
mkdir -p ~/.local/bin
mkdir -p ~/.vim/plugged
mkdir -p ~/.wallpapers
# Backup existing configs
backup_config ~/.config/hypr
backup_config ~/.config/waybar
backup_config ~/.config/rofi
backup_config ~/.config/wallust
backup_config ~/.config/wlogout
backup_config ~/.config/gtk-3.0
backup_config ~/.vimrc
# Install Vim plugins
echo -e "${GREEN}Installing Vim plugins...${NC}"
if command_exists vim; then
vim +PlugInstall +qall
elif command_exists nvim; then
nvim +PlugInstall +qall
fi
# Copy dotfiles
echo -e "${GREEN}Copying configuration files...${NC}"
# Hyprland configs
cp hypr/hyprland.conf ~/.config/hypr/
cp hypr/hyprpaper.conf ~/.config/hypr/
cp hypr/scripts/* ~/.config/hypr/scripts/
# Waybar config
cp waybar/config.jsonc ~/.config/waybar/
cp waybar/scripts/* ~/.config/waybar/scripts/
# Rofi config
cp rofi/config.rasi ~/.config/rofi/
cp -r rofi/themes/* ~/.config/rofi/themes/
# Wallust config (dynamic theming from wallpaper)
cp -r wallust/* ~/.config/wallust/
# Wlogout config
cp wlogout/style.css ~/.config/wlogout/
cp wlogout/icons/* ~/.config/wlogout/icons/
# Scripts
cp -r local/bin/* ~/.local/bin/
# Wallpapers (opcional — si existen en el repo)
if [ -d wallpapers ] && [ "$(ls -A wallpapers/ 2>/dev/null)" ]; then
cp wallpapers/* ~/.wallpapers/
echo -e "${GREEN}Wallpapers copiados a ~/.wallpapers/${NC}"
fi
# Vim config
cp .vimrc ~/
cp -r vim/* ~/.vim/
# Make scripts executable
chmod +x ~/.config/hypr/scripts/* 2>/dev/null || true
chmod +x ~/.config/waybar/scripts/* 2>/dev/null || true
chmod +x ~/.local/bin/* 2>/dev/null || true
# Set up optional dependencies
echo -e "${YELLOW}Optional dependencies you might want:${NC}"
echo "- warp-cli: For VPN (already in autostart)"
echo "- emote: For emoji picker (Super + .)"
echo "- ratbagd: For mouse configuration"
echo "- nm-applet: Network manager (commented in config)"
echo "- otf-terminus-nerd: For font icons in waybar/rofi"
# Enable services
if command_exists systemctl; then
echo -e "${GREEN}Enabling services...${NC}"
systemctl --user enable wireplumber 2>/dev/null || true
sudo systemctl enable ratbagd 2>/dev/null || true
fi
echo -e "${GREEN}Installation complete!${NC}"
echo -e "${YELLOW}Post-install steps:${NC}"
echo "1. Run 'theme-switch <path>' to generate the first theme (this runs wallust)"
echo " Or run 'theme-switch' for the rofi menu with your wallpapers"
echo "3. Or run 'wallust run <path>' directly"
echo "4. Restart Hyprland (Super + M) or reboot"
echo "5. Install missing fonts if any UI elements look broken"
echo "6. The first waybar run: restart it once so 'reload_style_on_change' takes effect:"
echo " pkill waybar && sleep 0.3 && setsid waybar &"
# Check for common issues
if ! command_exists foot; then
echo -e "${RED}Warning: foot terminal not found. Update hyprland.conf terminal.${NC}"
fi
if ! command_exists wallust; then
echo -e "${RED}Warning: wallust not found. Install via 'cargo install wallust'.${NC}"
fi