-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·66 lines (55 loc) · 1.6 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·66 lines (55 loc) · 1.6 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
#!/usr/bin/env bash
set -euo pipefail
DOTFILES="$(cd "$(dirname "$0")" && pwd)"
ZSH_PLUGIN_DIR="$HOME/.local/share/zsh"
echo "Setting up dotfiles from $DOTFILES"
# Check stow is installed
if ! command -v stow &>/dev/null; then
echo "Error: GNU Stow is required. Install it with: pacman -S stow"
exit 1
fi
# Stow all packages
mkdir -p ~/.config
packages=(hypr kitty fuzzel mako eww awww matugen mise tmux vim zsh gtk-3.0 gtk-4.0 scripts systemd yazi fastfetch)
for pkg in "${packages[@]}"; do
if [ -d "$DOTFILES/$pkg" ]; then
stow -d "$DOTFILES" -t "$HOME" "$pkg"
echo " stowed $pkg"
else
echo " skipped $pkg (not found)"
fi
done
# Zsh plugins
mkdir -p "$ZSH_PLUGIN_DIR"
plugins=(
"romkatv/powerlevel10k"
"zsh-users/zsh-autosuggestions"
"zsh-users/zsh-syntax-highlighting"
)
for plugin in "${plugins[@]}"; do
name="${plugin##*/}"
dest="$ZSH_PLUGIN_DIR/$name"
if [ -d "$dest" ]; then
echo " $name already installed"
else
git clone --depth=1 "https://github.com/$plugin.git" "$dest"
echo " installed $name"
fi
done
# Wallpaper directory
mkdir -p "$HOME/Pictures/Wallpapers"
# Theme placeholder
touch "$HOME/.config/hypr/theme.lua"
# Pick up the stowed systemd user units without waiting for a re-login
if command -v systemctl &>/dev/null; then
systemctl --user daemon-reload
echo " reloaded systemd user units"
fi
# Dark mode
if command -v gsettings &>/dev/null; then
"$HOME/.local/bin/set-dark-mode"
echo " applied dark mode settings"
else
echo " skipped dark mode (gsettings not found)"
fi
echo "Done."