-
Notifications
You must be signed in to change notification settings - Fork 13
/
install.sh
executable file
·55 lines (36 loc) · 1.44 KB
/
install.sh
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
#!/bin/sh
# This script is used to install hyprload, in a known location
progress() {
echo -e "\033[1;32m$1\033[0m"
}
HYPRLOAD_PATH=$HOME/.local/share/hyprload
HYPRLOAD_SOURCE_PATH="$HYPRLOAD_PATH/src"
progress "[1/7] Cloning hyprload to $HYPRLOAD_SOURCE_PATH"
if [ -d "$HYPRLOAD_SOURCE_PATH" ]; then
git -C "$HYPRLOAD_SOURCE_PATH" pull
else
git clone https://github.com/duckonaut/hyprload.git "$HYPRLOAD_SOURCE_PATH" --depth 1
fi
progress "[2/7] Cloned hyprload source to $HYPRLOAD_SOURCE_PATH"
HYPRLAND_PATH="$HYPRLOAD_PATH/include/hyprland"
progress "[3/7] Setting up hyprland source in $HYPRLAND_PATH"
if [ -d "$HYPRLAND_PATH" ]; then
git -C "$HYPRLAND_PATH" pull
else
git clone https://github.com/hyprwm/Hyprland.git "$HYPRLAND_PATH" --recursive
fi
HYPRLAND_COMMIT=""
if [ -z $(which hyprctl) ]; then
HYPRLAND_COMMIT=$(git -C "$HYPRLAND_PATH" rev-parse HEAD)
else
HYPRLAND_COMMIT=$(hyprctl version | grep "commit" | cut -d " " -f 8 | sed 's/dirty$//')
git -C "$HYPRLAND_PATH" checkout "$HYPRLAND_COMMIT"
fi
progress "[4/7] Set up hyprland source in $HYPRLAND_PATH at commit $HYPRLAND_COMMIT"
progress "[5/7] Setting up hyprland plugin environment"
make -C "$HYPRLAND_PATH" all
export HYPRLAND_COMMIT="$HYPRLAND_COMMIT"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig"
progress "[6/7] Installing hyprload"
make -C "$HYPRLOAD_SOURCE_PATH" install -j $(nproc)
progress "[7/7] Installed hyprload!"