From ab551501016a833fd41adda064c52ff8bd4395f4 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 21 Jan 2016 11:29:24 +1100 Subject: [PATCH] GTK Theme Detection: Exclude commented lines from output --- fetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fetch b/fetch index cc418e77..2be9e628 100755 --- a/fetch +++ b/fetch @@ -882,7 +882,7 @@ getgtk () { esac if [ -f "$HOME/.gtkrc-2.0" ]; then - gtk2theme=$(grep -F "$name" $HOME/.gtkrc-2.0) + gtk2theme=$(grep "^[^#]*$name" $HOME/.gtkrc-2.0) gtk2theme=${gtk2theme/${name}=/} gtk2theme=${gtk2theme//\"/} gtk2theme="$gtk2theme" @@ -890,7 +890,7 @@ getgtk () { fi if [ -f "$HOME/.config/gtk-3.0/settings.ini" ]; then - gtk3theme=$(grep -F "$name" $HOME/.config/gtk-3.0/settings.ini) + gtk3theme=$(grep "^[^#]*$name" $HOME/.config/gtk-3.0/settings.ini) gtk3theme=${gtk3theme/${name}=/} gtk3theme=${gtk3theme//\"/} gtk3theme="$gtk3theme"