forked from Axenide/Ax-Shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·144 lines (122 loc) · 3.28 KB
/
install.sh
File metadata and controls
executable file
·144 lines (122 loc) · 3.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
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
#!/bin/bash
set -e
set -u
set -o pipefail
REPO_URL="https://github.com/awareness10/Aw-Shell.git"
INSTALL_DIR="$HOME/.config/aw-shell"
PACKAGES=(
awww-git
brightnessctl
cava
cliphist
ddcutil
fabric-cli-git
gnome-bluetooth-3.0
gobject-introspection
gpu-screen-recorder
hypridle
hyprlock
hyprpicker
hyprshot
hyprsunset
imagemagick
libnotify
matugen-bin
network-manager-applet
networkmanager
nm-connection-editor
noto-fonts-emoji
nvtop
playerctl
power-profiles-daemon
swappy
tesseract
tesseract-data-eng
tesseract-data-spa
tmux
ttf-nerd-fonts-symbols-mono
unzip
upower
uwsm
vte3
webp-pixbuf-loader
wl-clipboard
)
if [ "$(id -u)" -eq 0 ]; then
echo "Please do not run this script as root."
exit 1
fi
aur_helper="yay"
if command -v paru &>/dev/null; then
aur_helper="paru"
elif ! command -v yay &>/dev/null; then
echo "Installing yay-bin..."
tmpdir=$(mktemp -d)
git clone --depth=1 https://aur.archlinux.org/yay-bin.git "$tmpdir/yay-bin"
(cd "$tmpdir/yay-bin" && makepkg -si --noconfirm)
rm -rf "$tmpdir"
fi
if [ -d "$INSTALL_DIR" ]; then
echo "Updating Aw-Shell..."
git -C "$INSTALL_DIR" pull
else
echo "Cloning Aw-Shell..."
git clone --depth=1 "$REPO_URL" "$INSTALL_DIR"
fi
echo "Installing required packages..."
$aur_helper -Syy --needed --devel --noconfirm "${PACKAGES[@]}" || true
echo "Installing gray-git..."
yes | $aur_helper -Syy --needed --devel --noconfirm gray-git || true
echo "Installing uv..."
if ! command -v uv &>/dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
echo "Installing Python dependencies..."
(cd "$INSTALL_DIR" && uv sync)
echo "Installing required fonts..."
FONT_URL="https://github.com/zed-industries/zed-fonts/releases/download/1.2.0/zed-sans-1.2.0.zip"
FONT_DIR="$HOME/.fonts/zed-sans"
TEMP_ZIP="/tmp/zed-sans-1.2.0.zip"
if [ ! -d "$FONT_DIR" ]; then
echo "Downloading fonts from $FONT_URL..."
curl -L -o "$TEMP_ZIP" "$FONT_URL"
echo "Extracting fonts to $FONT_DIR..."
mkdir -p "$FONT_DIR"
unzip -o "$TEMP_ZIP" -d "$FONT_DIR"
echo "Cleaning up..."
rm "$TEMP_ZIP"
else
echo "Fonts are already installed. Skipping download and extraction."
fi
echo "Configuring network services..."
if systemctl is-enabled --quiet iwd 2>/dev/null || systemctl is-active --quiet iwd 2>/dev/null; then
echo "Disabling iwd..."
sudo systemctl disable --now iwd
else
echo "iwd is already disabled."
fi
if ! systemctl is-enabled --quiet NetworkManager 2>/dev/null; then
echo "Enabling NetworkManager..."
sudo systemctl enable NetworkManager
else
echo "NetworkManager is already enabled."
fi
if ! systemctl is-active --quiet NetworkManager 2>/dev/null; then
echo "Starting NetworkManager..."
sudo systemctl start NetworkManager
else
echo "NetworkManager is already running."
fi
if [ ! -d "$HOME/.fonts/tabler-icons" ]; then
echo "Copying local fonts to $HOME/.fonts/tabler-icons..."
mkdir -p "$HOME/.fonts/tabler-icons"
cp -r "$INSTALL_DIR/assets/fonts/"* "$HOME/.fonts"
else
echo "Local fonts are already installed. Skipping copy."
fi
(cd "$INSTALL_DIR" && uv run python config/config.py)
echo "Starting Aw-Shell..."
killall aw-shell 2>/dev/null || true
uwsm app -- "$INSTALL_DIR/.venv/bin/python" "$INSTALL_DIR/main.py" >/dev/null 2>&1 &
disown
echo "Installation complete."