From 7b55c9922c8b7be846e5f3b464bd2843364f9ae0 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 11 Nov 2022 14:36:07 -0600 Subject: [PATCH] fix: wallpaper not changing Add new method to obtain GNOME version without breaking backwards compatibility. closes #3 --- usr/local/bin/wallpaperctl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/local/bin/wallpaperctl b/usr/local/bin/wallpaperctl index dc3dc6f..c094e54 100755 --- a/usr/local/bin/wallpaperctl +++ b/usr/local/bin/wallpaperctl @@ -33,6 +33,8 @@ prepare() { get_gnome_version() { if [ -r "/usr/share/gnome/gnome-version.xml" ]; then gversion="$(grep -i "platform" /usr/share/gnome/gnome-version.xml | tr -d " " | tr -d "/")" + elif [ -e "/usr/bin/gnome-shell" ] && [ -x "/usr/bin/gnome-shell" ]; then + gversion="$(gnome-shell --version | cut -d' ' -f3 | cut -d'.' -f1)" fi } get_gnome_color_scheme() {