Updated hyprsolusctl

If check command ran in terminal, pidof string is discarded and the notify-send message is echoed.
This commit is contained in:
Ethan Smith-Coss 2024-11-28 12:57:11 +00:00
parent 649b52a5db
commit eb3868260a
Signed by: TheOnePath
GPG Key ID: 1D351CCC6D01F32B

View File

@ -16,7 +16,7 @@ cache="$HOME/.cache/hyprsolus"
check () {
>&2 echo "Checking for Hyprland upgrades..."
# ensure that Hyprland is even running
if ! pidof hyprland
if ! pidof hyprland >/dev/null
then
>&2 echo "Could not find Hyprland process. Is it even running?"
exit 255
@ -45,6 +45,8 @@ check () {
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" ]] && \