Fix run term with root (dmenu_themes)

This commit is contained in:
q3aql 2022-05-29 17:52:26 +02:00
parent a6b529558e
commit f6961d8157

View File

@ -48,8 +48,12 @@ function load_theme() {
if [ -z "${file}" ] ; then if [ -z "${file}" ] ; then
echo "# Theme selector canceled" echo "# Theme selector canceled"
else else
${termrun} sudo ${main_folder}/scripts/build-theme.sh "${file}" if [ -f /usr/bin/sudo ] ; then
load_theme ${termrun} sudo ${main_folder}/scripts/build-theme.sh "${file}"
load_theme
else
${termrun} su -c ${main_folder}/scripts/build-theme.sh "${file}"
fi
fi fi
} }