fix theme chooser
@@ -7,18 +7,18 @@ echo "$THEME"
grep -q 'size' <$THEME || { echo "theme not valid" && exit 1; }
replacetheme() {
- themecolor=$(grep "$1" <$THEME)
- sed -i 's/.*'"$1"'.*/'"$themecolor"'/' config.def.h
+ themecolor=$(grep "$1" <$THEME | head -1)
+ echo "'s~.*'"$1"'.*~'"$themecolor"'~'"
+ sed -i 's~.*'"$1"'.*~'"${themecolor/\*/\\\*}"'~' config.def.h
}
-replacetheme '*fonts[]'
-dmenufont 'dmenufont[]'
-replacetheme dmenufont
-replacetheme col_gray1
-replacetheme col_gray2
-replacetheme col_gray3
-replacetheme col_gray4
-replacetheme col_gray5
+replacetheme '\*fonts'
+replacetheme 'dmenufont'
+replacetheme "r col_gray1"
+replacetheme "r col_gray2"
+replacetheme "r col_gray3"
+replacetheme "r col_gray4"
+replacetheme "r col_gray5"
if [ -z "$2" ]; then
make
