-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpost-install.sh
More file actions
executable file
·68 lines (53 loc) · 1.58 KB
/
post-install.sh
File metadata and controls
executable file
·68 lines (53 loc) · 1.58 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
#!/usr/bin/env bash
# ==========================================
# Kenso Post-Install Cleanup + Font Install
# ==========================================
set -euo pipefail
# -----------------------------
# Paths to clean
# -----------------------------
CLEAN_TARGETS=(
"$HOME/.config"
"$HOME/Pictures/wallpapers"
"$HOME/.local/share/icons"
)
# ==================================================
# 1️⃣ Remove stray .git directories
# ==================================================
echo "🧹 Cleaning stray .git directories..."
for dir in "${CLEAN_TARGETS[@]}"; do
if [[ ! -d "$dir" ]]; then
echo "⚠ Skipping missing directory: $dir"
continue
fi
echo "🔍 Scanning: $dir"
find "$dir" -type d -name ".git" 2>/dev/null | while read -r gitdir; do
echo "🗑 Removing: $gitdir"
rm -rf "$gitdir"
done
done
echo "✔ Git cleanup complete"
# ==========================================
# Fonts (Apple + Google Sans Flex)
# Source: HyprKenso/fonts/*
# Target: ~/.local/share/fonts/HyprKenso
# ==========================================
echo "🔤 Installing fonts..."
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FONT_SRC="$SCRIPT_DIR/fonts"
FONT_DST="$HOME/.local/share/fonts/HyprKenso"
if [[ ! -d "$FONT_SRC" ]]; then
echo "⚠ fonts directory not found, skipping fonts"
else
mkdir -p "$FONT_DST"
rsync -a \
--exclude='.git*' \
--exclude='README*' \
"$FONT_SRC/" \
"$FONT_DST/"
fi
echo "🔄 Refreshing font cache..."
fc-cache -fv >/dev/null
echo "✔ Fonts installed"
fc-list | grep -i "Google Sans"
fc-list | grep -i "SF Pro"