mirror of
https://github.com/davatorium/rofi.git
synced 2025-07-31 21:59:25 -04:00
use config.rasi file if present
This commit is contained in:
parent
9b0a430fd4
commit
3f3e4c691f
1 changed files with 10 additions and 5 deletions
|
@ -167,12 +167,17 @@ function set_theme()
|
||||||
then
|
then
|
||||||
mkdir -p ${CDIR}
|
mkdir -p ${CDIR}
|
||||||
fi
|
fi
|
||||||
|
if [ -f "${CDIR}/config.rasi" ]
|
||||||
|
then
|
||||||
|
${SED} -i "/@import.*/d" "${CDIR}/config.rasi"
|
||||||
|
echo "@import \"${1}\"" >> "${CDIR}/config.rasi"
|
||||||
|
else
|
||||||
if [ -f "${CDIR}/config" ]
|
if [ -f "${CDIR}/config" ]
|
||||||
then
|
then
|
||||||
${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
|
${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
|
||||||
fi
|
fi
|
||||||
echo "rofi.theme: ${1}" >> "${CDIR}/config"
|
echo "rofi.theme: ${1}" >> "${CDIR}/config"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue