Fix awesomewm theme detection, closes #690 (#713)

This commit is contained in:
Anton Bulakh
2021-03-22 18:26:45 +02:00
committed by GitHub
parent e9ee998e4b
commit 7b8774cc31

View File

@@ -2480,8 +2480,8 @@ detectwmtheme () {
Win_theme="Not Applicable"
;;
'Awesome')
if [ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/awesome/rc.lua" ]; then
Win_theme="$(grep '^[^-].*\(theme\|beautiful\).*lua' "${XDG_CONFIG_HOME:-${HOME}/.config}/awesome/rc.lua" | grep '[^/]\+/[^/]\+.lua' -o | cut -d'/' -f1 | head -1)"
if [ -f "/usr/bin/awesome-client" ]; then
Win_theme="$(/usr/bin/awesome-client "return require('beautiful').theme_path" | grep -oP '[^/]*(?=/"$)')"
fi
;;
'BlackBox')