feat: validate desktop environment

Check that the desktop environment currently being used is GNOME.
This commit is contained in:
Adam 2022-04-10 14:30:00 -06:00
parent 1b8acd0116
commit 469398a950
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,10 @@ gversion="0"
pictureuri="picture-uri" pictureuri="picture-uri"
validate_config() { validate_config() {
if [ "$XDG_CURRENT_DESKTOP" != "GNOME" ]; then
quit "Error: GNOME is not detected. Please install GNOME."
fi
if [ -z "$WALLPAPER_DIR" ]; then if [ -z "$WALLPAPER_DIR" ]; then
quit "Error: The wallpaper directory environment variable (WALLPAPER_DIR) has not been set." quit "Error: The wallpaper directory environment variable (WALLPAPER_DIR) has not been set."
fi fi