From 09998b22f07d6d69d187d79ef9dc3ad9f042f9e4 Mon Sep 17 00:00:00 2001 From: makise-homura Date: Mon, 19 Mar 2018 16:09:13 +0300 Subject: [PATCH] Fixed detection of GTK+2/3 and icon themes --- screenfetch-dev | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/screenfetch-dev b/screenfetch-dev index 7c86985..786881c 100755 --- a/screenfetch-dev +++ b/screenfetch-dev @@ -2418,15 +2418,18 @@ detectgtk () { gtkFont=$(awk -F'"' '/^gtk-font-name/ {print $2}' $HOME/.gtkrc-2.0) else if type -p xfconf-query >/dev/null 2>&1; then - gtk2Theme=$(xfconf-query -c xsettings -p /Net/ThemeName) + gtk2Theme=$(xfconf-query -c xsettings -p /Net/ThemeName 2>/dev/null) + [ -z "$gtk2Theme" ] && gtk2Theme="Not Found" fi if type -p xfconf-query >/dev/null 2>&1; then - gtkIcons=$(xfconf-query -c xsettings -p /Net/IconThemeName) + gtkIcons=$(xfconf-query -c xsettings -p /Net/IconThemeName 2>/dev/null) + [ -z "$gtkIcons" ] && gtkIcons="Not Found" fi if type -p xfconf-query >/dev/null 2>&1; then - gtkFont=$(xfconf-query -c xsettings -p /Gtk/FontName) + gtkFont=$(xfconf-query -c xsettings -p /Gtk/FontName 2>/dev/null) + [ -z "$gtkFont" ] && gtkFont="Not Identified" fi fi ;;