Compare commits
No commits in common. "main" and "v0.42.0" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
libxcb-errors/
|
|
||||||
tomlplusplus/
|
|
||||||
2
Hyprland
2
Hyprland
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6ae89940c761d4ed4317df0af29e8df41d472091
|
Subproject commit 918d8340afd652b011b937d29d5eea0be08467f5
|
||||||
68
Makefile
68
Makefile
|
|
@ -10,19 +10,6 @@ COMPONENTS=hyprcursor hyprlang hyprlock hyprpaper hyprutils wl-clipboard \
|
||||||
# Set the default target to build
|
# Set the default target to build
|
||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
|
|
||||||
### Makefile variable definitions for targets ###
|
|
||||||
|
|
||||||
__Hyprlang = $(INCLUDE_SYS_PATH)/hyprlang.hpp
|
|
||||||
__Hyprcursor = $(INCLUDE_SYS_PATH)/hyprcursor
|
|
||||||
__Hyprutils = $(INCLUDE_SYS_PATH)/hyprutils
|
|
||||||
__Hyprwayland-scanner = /usr/lib64/cmake/hyprwayland-scanner
|
|
||||||
__Libxcb-errors = /usr/lib/pkgconfig/xcb-errors.pc
|
|
||||||
__Aquamarine = $(INCLUDE_SYS_PATH)/aquamarine
|
|
||||||
__Hyprland = Hyprland/build/Hyprland
|
|
||||||
__Hyprlock = hyprlock/build/hyprlock
|
|
||||||
__Hyprpaper = hyprpaper/build/hyprpaper
|
|
||||||
__Wl_clipboard = wl-clipboard/build/src
|
|
||||||
|
|
||||||
### Makefile targets for hyprwm libraries ###
|
### Makefile targets for hyprwm libraries ###
|
||||||
|
|
||||||
# Build and install tomlplusplus if it's not on the system
|
# Build and install tomlplusplus if it's not on the system
|
||||||
|
|
@ -35,8 +22,20 @@ $(__Tomlplusplus): tomlplusplus
|
||||||
ninja -C tomlplusplus/build
|
ninja -C tomlplusplus/build
|
||||||
sudo $(MESON) install -C tomlplusplus/build
|
sudo $(MESON) install -C tomlplusplus/build
|
||||||
|
|
||||||
|
# Build hyprcursor if the .hpp file is not installed (required hyprlang)
|
||||||
|
# Library for hyprwm
|
||||||
|
__Hyprcursor = $(INCLUDE_SYS_PATH)/hyprcursor/
|
||||||
|
$(__Hyprcursor): $(__Tomlplusplus) $(__Hyprlang) hyprcursor
|
||||||
|
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S ./hyprcursor -B ./hyprcursor/build
|
||||||
|
$(CMAKE) --build ./hyprcursor/build --config Release --target all \
|
||||||
|
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||||
|
@echo "Installing library hyprcursor..."
|
||||||
|
sudo $(CMAKE) --install hyprcursor/build
|
||||||
|
|
||||||
# Build hyprutils if the .hpp file is not installed
|
# Build hyprutils if the .hpp file is not installed
|
||||||
# Library for hyprwm
|
# Library for hyprwm
|
||||||
|
__Hyprutils = $(INCLUDE_SYS_PATH)/hyprutils
|
||||||
$(__Hyprutils): hyprutils
|
$(__Hyprutils): hyprutils
|
||||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S ./hyprutils -B ./hyprutils/build
|
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S ./hyprutils -B ./hyprutils/build
|
||||||
|
|
@ -46,7 +45,8 @@ $(__Hyprutils): hyprutils
|
||||||
|
|
||||||
# Build hyprlang if the .hpp file is not installed
|
# Build hyprlang if the .hpp file is not installed
|
||||||
# Library for hyprwm
|
# Library for hyprwm
|
||||||
$(__Hyprlang): $(__Hyprutils) hyprlang
|
__Hyprlang = $(INCLUDE_SYS_PATH)/hyprlang.hpp
|
||||||
|
$(__Hyprlang): $(__Hyprutils) $(__Hyprwayland-scanner) hyprlang
|
||||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S ./hyprlang -B ./hyprlang/build
|
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S ./hyprlang -B ./hyprlang/build
|
||||||
$(CMAKE) --build ./hyprlang/build --config Release --target hyprlang \
|
$(CMAKE) --build ./hyprlang/build --config Release --target hyprlang \
|
||||||
|
|
@ -55,16 +55,7 @@ $(__Hyprlang): $(__Hyprutils) hyprlang
|
||||||
@echo "Installing library hyprlang..."
|
@echo "Installing library hyprlang..."
|
||||||
sudo $(CMAKE) --install ./hyprlang/build
|
sudo $(CMAKE) --install ./hyprlang/build
|
||||||
|
|
||||||
# Build hyprcursor if the .hpp file is not installed (required hyprlang)
|
__Hyprwayland-scanner = /usr/lib64/cmake/hyprwayland-scanner
|
||||||
# Library for hyprwm
|
|
||||||
$(__Hyprcursor): $(__Tomlplusplus) $(__Hyprlang) hyprcursor
|
|
||||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr -S ./hyprcursor -B ./hyprcursor/build
|
|
||||||
$(CMAKE) --build ./hyprcursor/build --config Release --target all \
|
|
||||||
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
|
||||||
@echo "Installing library hyprcursor..."
|
|
||||||
sudo $(CMAKE) --install hyprcursor/build
|
|
||||||
|
|
||||||
$(__Hyprwayland-scanner): hyprwayland-scanner
|
$(__Hyprwayland-scanner): hyprwayland-scanner
|
||||||
$(CMAKE) -DCMAKE_INSTALL_PREFIX=/usr -S ./hyprwayland-scanner \
|
$(CMAKE) -DCMAKE_INSTALL_PREFIX=/usr -S ./hyprwayland-scanner \
|
||||||
-B hyprwayland-scanner/build
|
-B hyprwayland-scanner/build
|
||||||
|
|
@ -75,15 +66,17 @@ $(__Hyprwayland-scanner): hyprwayland-scanner
|
||||||
|
|
||||||
libxcb-errors:
|
libxcb-errors:
|
||||||
git clone https://gitlab.freedesktop.org/xorg/lib/libxcb-errors.git
|
git clone https://gitlab.freedesktop.org/xorg/lib/libxcb-errors.git
|
||||||
|
__Libxcb-errors = /usr/lib/pkgconfig/xcb-errors.pc
|
||||||
$(__Libxcb-errors): libxcb-errors
|
$(__Libxcb-errors): libxcb-errors
|
||||||
@echo "Building and installing library libxcb-errors..."
|
@echo "Building and installing library libxcb-errors..."
|
||||||
cd libxcb-errors && { \
|
cd libxcb-errors && { \
|
||||||
git submodule update --init ; \
|
git submodule update --init ; \
|
||||||
/bin/sh autogen.sh || /bin/sh autogen.sh ; \
|
/bin/sh autogen.sh ; \
|
||||||
/bin/sh configure --prefix=/usr ; }
|
/bin/sh configure --prefix=/usr ; \
|
||||||
make -C libxcb-errors && sudo make -C libxcb-errors install
|
make && sudo make install ; }
|
||||||
|
|
||||||
$(__Aquamarine): $(__Hyprwayland-scanner) $(__Hyprutils) aquamarine
|
__Aquamarine = $(INCLUDE_SYS_PATH)/aquamarine
|
||||||
|
$(__Aquamarine): $(__Hyprwayland-scanner) aquamarine
|
||||||
$(CMAKE) -DCMAKE_INSTALL_PREFIX=/usr -S ./aquamarine \
|
$(CMAKE) -DCMAKE_INSTALL_PREFIX=/usr -S ./aquamarine \
|
||||||
-B aquamarine/build
|
-B aquamarine/build
|
||||||
$(CMAKE) --build ./aquamarine/build -j \
|
$(CMAKE) --build ./aquamarine/build -j \
|
||||||
|
|
@ -94,12 +87,14 @@ $(__Aquamarine): $(__Hyprwayland-scanner) $(__Hyprutils) aquamarine
|
||||||
### Makefile targets for hyprwm apps ###
|
### Makefile targets for hyprwm apps ###
|
||||||
|
|
||||||
# Build Hyprland if it's not installed on the system
|
# Build Hyprland if it's not installed on the system
|
||||||
$(__Hyprland): $(__Hyprcursor) $(__Libxcb-errors) $(__Aquamarine)
|
__Hyprland = Hyprland/build/Hyprland
|
||||||
|
$(__Hyprland): $(__Hyprlang) $(__Hyprcursor) $(__Hyprwayland-scanner) \
|
||||||
|
$(__Libxcb-errors) $(__Aquamarine)
|
||||||
@echo "Building Hyprland..."
|
@echo "Building Hyprland..."
|
||||||
sudo $(MAKE) -C Hyprland all
|
sudo $(MAKE) -C Hyprland all
|
||||||
sudo chown -R $$USER:$$USER Hyprland/build
|
|
||||||
|
|
||||||
# Build hyprlock if it's not installed on the system
|
# Build hyprlock if it's not installed on the system
|
||||||
|
__Hyprlock = hyprlock/build/hyprlock
|
||||||
$(__Hyprlock): $(__Hyprlang)
|
$(__Hyprlock): $(__Hyprlang)
|
||||||
@echo "Building hyprlock..."
|
@echo "Building hyprlock..."
|
||||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||||
|
|
@ -108,6 +103,7 @@ $(__Hyprlock): $(__Hyprlang)
|
||||||
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||||
|
|
||||||
# Build hyprpaper if it's not installed on the system
|
# Build hyprpaper if it's not installed on the system
|
||||||
|
__Hyprpaper = hyprpaper/build/hyprpaper
|
||||||
$(__Hyprpaper): $(__Hyprlang)
|
$(__Hyprpaper): $(__Hyprlang)
|
||||||
@echo "Building hyprpaper..."
|
@echo "Building hyprpaper..."
|
||||||
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
$(CMAKE) --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release \
|
||||||
|
|
@ -116,6 +112,7 @@ $(__Hyprpaper): $(__Hyprlang)
|
||||||
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
-j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
|
||||||
|
|
||||||
# Build wl-clipboard if it's not installed on the system
|
# Build wl-clipboard if it's not installed on the system
|
||||||
|
__Wl_clipboard = wl-clipboard/build/src
|
||||||
$(__Wl_clipboard)/wl-copy $(__Wl_clipboard)/wl-paste &:
|
$(__Wl_clipboard)/wl-copy $(__Wl_clipboard)/wl-paste &:
|
||||||
cd wl-clipboard && $(MESON) setup --prefix=/usr build
|
cd wl-clipboard && $(MESON) setup --prefix=/usr build
|
||||||
ninja -C wl-clipboard/build
|
ninja -C wl-clipboard/build
|
||||||
|
|
@ -129,7 +126,7 @@ submodule update --init --recursive" ; exit 1 ;\
|
||||||
@cd Hyprland/subprojects && git submodule update --init
|
@cd Hyprland/subprojects && git submodule update --init
|
||||||
$(MAKE) build
|
$(MAKE) build
|
||||||
|
|
||||||
build: $(__Hyprland) $(__Wl_clipboard)/wl-copy $(__Hyprlock) $(__Hyprpaper)
|
build: $(__Hyprlock) $(__Hyprpaper) $(__Wl_clipboard)/wl-copy $(__Hyprland)
|
||||||
|
|
||||||
install: build
|
install: build
|
||||||
@echo "Installing hyprlock..."
|
@echo "Installing hyprlock..."
|
||||||
|
|
@ -143,17 +140,14 @@ install: build
|
||||||
|
|
||||||
update:
|
update:
|
||||||
@echo "Updating module components..."
|
@echo "Updating module components..."
|
||||||
-git submodule foreach \
|
git submodule foreach \
|
||||||
'[[ $$(basename $$(git rev-parse --show-toplevel)) != Hyprland ]] && git pull origin $$(git rev-parse --abbrev-ref HEAD)'
|
'git pull origin $$(git rev-parse --abbrev-ref HEAD)'
|
||||||
-cd Hyprland && git fetch origin --no-all --tags
|
|
||||||
# In case these libraries haven't been pulled yet, ignore the exit code
|
# In case these libraries haven't been pulled yet, ignore the exit code
|
||||||
-cd tomlplusplus && git pull origin $$(git rev-parse --abbrev-ref HEAD)
|
-cd tomlplusplus && git pull origin $$(git rev-parse --abbrev-ref HEAD)
|
||||||
-cd libxcb-errors && git pull origin $$(git rev-parse --abbrev-ref HEAD)
|
-cd libxcb-error && git pull origin $$(git rev-parse --abbrev-ref HEAD)
|
||||||
@echo "Please note that if tomlplusplus or libxcb-errors throw an error \
|
@echo "Please note that if tomlplusplus or libxcb-errors throw an error \
|
||||||
for not being found, this is defined behaviour since these libraries \
|
for not being found, this is defined behaviour since these libraries \
|
||||||
are cloned into the project later. You can safely ignore this."
|
are cloned into the project later. You can safely ignore this."
|
||||||
-cd Hyprland && git fetch origin --tags && git checkout $$(git tag --list \
|
|
||||||
| sort -V | tail -n1) && git pull origin $$(git rev-parse --abbrev-ref HEAD)
|
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
@echo "Be real, you don't want to do this, so we'll abort."
|
@echo "Be real, you don't want to do this, so we'll abort."
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 65dd97b5d21e917295159bbef1d52e06963f4eb0
|
Subproject commit 7c3565f9bedc7cb601cc0baa14792247e4dc1d5a
|
||||||
23
depends.txt
23
depends.txt
|
|
@ -1,23 +0,0 @@
|
||||||
libcairo-devel
|
|
||||||
file-devel
|
|
||||||
libdrm-devel
|
|
||||||
libglvnd-devel
|
|
||||||
libjpeg-turbo-devel
|
|
||||||
librsvg-devel
|
|
||||||
libwebp-devel
|
|
||||||
libzip-devel
|
|
||||||
mesalib-devel
|
|
||||||
pam-devel
|
|
||||||
pango-devel
|
|
||||||
waybar
|
|
||||||
wayland-devel
|
|
||||||
wayland-protocols-devel
|
|
||||||
wlroots-devel
|
|
||||||
libxkbcommon-devel
|
|
||||||
pugixml-devel
|
|
||||||
util-macros
|
|
||||||
xcb-proto
|
|
||||||
xcb-util-devel
|
|
||||||
libxcursor-devel
|
|
||||||
sdbus-cpp-devel
|
|
||||||
libjxl-devel
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 70fb494aa6672133354eef8442cd686313630039
|
Subproject commit 5a95d8512b3eda15a92e8cb932aa4049ec73dd55
|
||||||
2
hyprlang
2
hyprlang
|
|
@ -1 +1 @@
|
||||||
Subproject commit f054f2e44d6a0b74607a6bc0f52dba337a3db38e
|
Subproject commit adbefbf49664a6c2c8bf36b6487fd31e3eb68086
|
||||||
2
hyprlock
2
hyprlock
|
|
@ -1 +1 @@
|
||||||
Subproject commit eb63207ef051c62fa2ab010b3f89da263a397329
|
Subproject commit 8a89181e6994ae330f9281ebdbbea1f0560baefc
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1c18ad65032adb891b341292a1edf9e13adf4751
|
Subproject commit f1f7fc60f5ae2609a369964aeb7ddbf6f9277de7
|
||||||
176
hyprsolusctl
176
hyprsolusctl
|
|
@ -1,176 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [[ $(id -u) -eq 0 ]]
|
|
||||||
then
|
|
||||||
echo "Please don't run script with root privilages."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
HYPRSOLUS_PATH="/usr/src/hyprsolus"
|
|
||||||
[[ ! -d "$HYPRSOLUS_PATH" ]] && exit 1
|
|
||||||
|
|
||||||
# create cache folder for Hyprland metadata
|
|
||||||
cache="$HOME/.cache/hyprsolus"
|
|
||||||
[[ ! -d "$cache" ]] && mkdir -p "$cache" >/dev/null
|
|
||||||
|
|
||||||
check () {
|
|
||||||
>&2 echo "Checking for Hyprland upgrades..."
|
|
||||||
# ensure that Hyprland is even running
|
|
||||||
if ! pidof hyprland >/dev/null
|
|
||||||
then
|
|
||||||
>&2 echo "Could not find Hyprland process. Is it even running?"
|
|
||||||
exit 255
|
|
||||||
fi
|
|
||||||
# get the releases from the origin
|
|
||||||
origin=$(curl -sL \
|
|
||||||
https://api.github.com/repos/hyprwm/Hyprland/releases)
|
|
||||||
exit_code=$?
|
|
||||||
# check if the cURL was successful
|
|
||||||
if [[ $exit_code -ne 0 ]]
|
|
||||||
then
|
|
||||||
>&2 echo "Failed to contact GitHub API. Check Internet connection and \
|
|
||||||
try again."
|
|
||||||
exit 254
|
|
||||||
fi
|
|
||||||
# latest tag release in origin and current Hyprland version
|
|
||||||
origin_vers=$(echo "$origin" | jq -r ".[0].tag_name")
|
|
||||||
hyprland_vers=$(hyprctl version | sed -nr 's/Tag: (.*),.*/\1/p')
|
|
||||||
|
|
||||||
[[ ! -e "$cache/metadata.json" ]] && echo "$origin" \
|
|
||||||
| jq -r ".[] | select(.tag_name == \"$hyprland_vers\")" \
|
|
||||||
>"$cache/metadata.json"
|
|
||||||
|
|
||||||
if [[ "$origin_vers" != "$hyprland_vers" ]]
|
|
||||||
then
|
|
||||||
echo "$origin" | jq -r ".[0]" >"$cache/release-metadata.json"
|
|
||||||
notify-send -a "Hyprsolus" "Hyprland Update Available" \
|
|
||||||
"A new version of Hyprland is available ($origin_vers)."
|
|
||||||
[[ -t 0 ]] && echo "A new version of Hyprland is available \
|
|
||||||
($origin_vers)."
|
|
||||||
else
|
|
||||||
>&2 echo "No upgrade available. Ensuring most recent metadata..."
|
|
||||||
[[ -f "$cache/release-metadata.json" ]] && \
|
|
||||||
mv "$cache/release-metadata.json" "$cache/metadata.json"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
info () {
|
|
||||||
while test $# -ne 0
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
--local) shift ; release=0 ;;
|
|
||||||
--json) shift ; json=0 ;;
|
|
||||||
--) shift ; glow_args="$*" ; break ;;
|
|
||||||
*) echo "Ignoring argument $1" ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Initialise defaults if no flags given
|
|
||||||
release=${release:-1}
|
|
||||||
json=${json:-1}
|
|
||||||
|
|
||||||
if [[ -e "$cache/release-metadata.json" && $release -eq 1 ]]
|
|
||||||
then
|
|
||||||
[[ ! -s "$cache/release-metadata.json" ]] && exit 2
|
|
||||||
[[ $json -eq 0 ]] && cat "$cache/release-metadata.json" && exit 0
|
|
||||||
jq -r ".body" < "$cache/release-metadata.json" | glow "$glow_args" -
|
|
||||||
elif [[ -e "$cache/metadata.json" ]]
|
|
||||||
then
|
|
||||||
[[ ! -s "$cache/metadata.json" ]] && exit 2
|
|
||||||
[[ $json -eq 0 ]] && cat "$cache/metadata.json" && exit 0
|
|
||||||
jq -r ".body" "$cache/metadata.json" | glow "$glow_args" -
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
update () {
|
|
||||||
while test $# -ne 0
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
--ensure-deps-latest) shift ; deps_update=0 ;;
|
|
||||||
*) echo "Ignoring argument $1" ; shift ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
deps_update=${deps_update:-1}
|
|
||||||
|
|
||||||
cd "$HYPRSOLUS_PATH"
|
|
||||||
git restore .
|
|
||||||
# Fetch new content from remote
|
|
||||||
git fetch --all
|
|
||||||
git pull origin main
|
|
||||||
|
|
||||||
echo "(hyprsolus) Updating additional scripts if needed."
|
|
||||||
sudo cp -u "${HYPRSOLUS_PATH}/hyprsolusctl" "/usr/local/bin"
|
|
||||||
sudo cp -ru "${HYPRSOLUS_PATH}/systemd" "$HOME/.config"
|
|
||||||
systemctl --user daemon-reload
|
|
||||||
|
|
||||||
echo "(hyprsolus) Updating the dependencies if needed."
|
|
||||||
if [[ $deps_update -eq 0 ]]
|
|
||||||
then
|
|
||||||
sudo sh "${HYPRSOLUS_PATH}/requirements.sh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
upgrade () {
|
|
||||||
while test $# -ne 0
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
--ensure-integrity) shift ; eopkg_check=0 ;;
|
|
||||||
--clean-all) shift ; clean_all=0 ;;
|
|
||||||
*) echo "Ignoring argument $1" ; shift ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
clean_all=${clean_all:-1}
|
|
||||||
echo "Upgrading Hyprland and components with hyprsolus."
|
|
||||||
|
|
||||||
eopkg_check=${eopkg_check:-1}
|
|
||||||
if [[ $eopkg_check -eq 0 ]]
|
|
||||||
then
|
|
||||||
echo -n "Check package intergity..."
|
|
||||||
while read -r line
|
|
||||||
do
|
|
||||||
check=$(eopkg check --no-color "$line" | grep -o "OK")
|
|
||||||
if [[ $check != OK ]]
|
|
||||||
then
|
|
||||||
>&2 echo -e "failed.\n[FATAL] The following package is corrupt: $line."\
|
|
||||||
"Aborting upgrade."
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
done < <(cat "${HYPRSOLUS_PATH}/depends.txt")
|
|
||||||
echo "ok."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# quick check for submodule initialisation
|
|
||||||
if git -C "$HYPRSOLUS_PATH" submodule status | grep --quiet '^-'
|
|
||||||
then
|
|
||||||
if ! git -C "$HYPRSOLUS_PATH" submodule update --init --recursive
|
|
||||||
then
|
|
||||||
>&2 echo "[FATAL] Git was not able to initialise submoules."
|
|
||||||
exit 4
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$HYPRSOLUS_PATH"
|
|
||||||
[[ $clean_all -eq 0 ]] && make clean
|
|
||||||
|
|
||||||
make update && make
|
|
||||||
exit_code=$?
|
|
||||||
if [[ $exit_code -ne 0 ]]
|
|
||||||
then
|
|
||||||
>&2 echo "[FATAL] Something went wrong trying to upgrade. See above."
|
|
||||||
exit 5
|
|
||||||
fi
|
|
||||||
sudo make install
|
|
||||||
}
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
check) check ;;
|
|
||||||
update) shift ; update "$@" ;;
|
|
||||||
upgrade) shift ; upgrade "$@" ;;
|
|
||||||
info) shift ; info "$@" ;;
|
|
||||||
version) echo "hyprsolus v0.1.1" ;;
|
|
||||||
*) exit 1 ;;
|
|
||||||
esac
|
|
||||||
exit 0
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3f5293432b6dc6a99f26aca2eba3876d2660665c
|
Subproject commit 5dcbbc1e3de40b2cecfd2007434d86e924468f1f
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 500c81a9e1a76760371049a8d99e008ea77aa59e
|
Subproject commit a048a6cb015340bd82f97c1f40a4b595ca85cc30
|
||||||
45
install.sh
45
install.sh
|
|
@ -1,45 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
user="$(logname)"
|
|
||||||
home="/home/$user"
|
|
||||||
|
|
||||||
HYPRSOLUS_PATH="/usr/src/hyprsolus"
|
|
||||||
HYPRSOLUSCTL_PATH="/usr/local/bin"
|
|
||||||
HYPRSOLUS_SYSTEMD="$home/.config"
|
|
||||||
|
|
||||||
if [[ $(id -u) -ne 0 ]]
|
|
||||||
then
|
|
||||||
echo "Please run script with root privilages."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -d "$HYPRSOLUS_PATH" ]]
|
|
||||||
then
|
|
||||||
echo "hyprsolus already installed on system. If you wish to update hyprsolus,"\
|
|
||||||
" then please run: hyprsolusctl update."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
[[ ! -d "$HYPRSOLUS_SYSTEMD" ]] && mkdir -p "$HYPRSOLUS_SYSTEMD"
|
|
||||||
|
|
||||||
echo "(hyprsolus) Installing hyprsolus to system."
|
|
||||||
git clone --depth=1 https://git.closedless.xyz/TheOnePath/hyprsolus.git \
|
|
||||||
"$HYPRSOLUS_PATH"
|
|
||||||
exit_code=$?
|
|
||||||
[[ $exit_code -ne 0 ]] && exit 1
|
|
||||||
chown -R "$user:$user" "$HYPRSOLUS_PATH"
|
|
||||||
|
|
||||||
echo "(hyprsolus) Moving additional scripts to system."
|
|
||||||
[[ ! -d "$HYPRSOLUSCTL_PATH" ]] && mkdir -p "$HYPRSOLUSCTL_PATH"
|
|
||||||
cp -u "${HYPRSOLUS_PATH}/hyprsolusctl" "$HYPRSOLUSCTL_PATH"
|
|
||||||
|
|
||||||
# Make the file executable
|
|
||||||
chmod 755 "${HYPRSOLUS_PATH}/hyprsolusctl"
|
|
||||||
|
|
||||||
cp -ru "${HYPRSOLUS_PATH}/systemd" "$HYPRSOLUS_SYSTEMD"
|
|
||||||
chown -R "$user:$user" "$HYPRSOLUS_SYSTEMD/systemd"
|
|
||||||
echo "(hyprsolus) Setting up systemd units."
|
|
||||||
systemctl --user -M "$user"@ enable --now \
|
|
||||||
"${HYPRSOLUS_SYSTEMD}/systemd/user/hyprsolus-check.timer"
|
|
||||||
|
|
||||||
echo "(hyprsolus) Installing the dependencies to system."
|
|
||||||
sh "${HYPRSOLUS_PATH}/requirements.sh"
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Install the Solus system development package and other libraries
|
# Install the Solus system development package and other libraries
|
||||||
sudo eopkg it -yc system.devel $(cat "/usr/src/hyprsolus/depends.txt")
|
sudo eopkg it -yc system.devel
|
||||||
|
sudo eopkg it -y libcairo-devel file-devel libdrm-devel libglvnd-devel \
|
||||||
|
libjpeg-turbo-devel librsvg-devel libwebp-devel libzip-devel \
|
||||||
|
mesalib-devel pam-devel pango-devel waybar wayland-devel \
|
||||||
|
wayland-protocols-devel wlroots-devel libxkbcommon-devel pugixml-devel \
|
||||||
|
util-macros xcb-proto xcb-util-devel libxcursor-devel
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=check for newly released Hyprland version every week
|
|
||||||
After=network.target
|
|
||||||
Wants=hyprsolus-check.timer
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/bin/bash /usr/local/bin/hyprsolusctl check
|
|
||||||
Type=simple
|
|
||||||
StandardOutput=journal
|
|
||||||
StandardError=journal
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=check for new release of Hyprland, weekly
|
|
||||||
Requires=hyprsolus-check.service
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
Unit=hyprsolus-check.service
|
|
||||||
OnCalendar=weekly
|
|
||||||
Persistent=true
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=timers.target
|
|
||||||
Loading…
Reference in New Issue
Block a user