Commit 4204f79e authored by Michael Straube's avatar Michael Straube

wm_theme: Make Openbox config file parsing more robust

parent 5eafef80
...@@ -1816,7 +1816,8 @@ get_wm_theme() { ...@@ -1816,7 +1816,8 @@ get_wm_theme() {
ob_file="rc" ob_file="rc"
fi fi
wm_theme="$(awk -F "[<,>]" '/<theme/ {getline; print $3}' \ wm_theme="$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)) {l=n; exit}}}
END {split(l, a, "[<>]"); print a[3]}' \
"${XDG_CONFIG_HOME}/openbox/${ob_file}.xml")"; "${XDG_CONFIG_HOME}/openbox/${ob_file}.xml")";
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment