rofi-theme-selector: Store config in XDG_CONFIG_HOME if set

This commit is contained in:
Tim Steinbach 2018-03-11 11:56:14 -04:00
parent 7f83fa3dd3
commit abeddb6a57
No known key found for this signature in database
GPG Key ID: 472BFCCA96BD0EDA
1 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,12 @@ Current theme: <b>${CUR}</b>"""
###
function set_theme()
{
CDIR="${HOME}/.config/rofi/"
if [ -d "${XDG_CONFIG_HOME}" ]; then
CDIR="${XDG_CONFIG_HOME}/rofi/"
else
CDIR="${HOME}/.config/rofi/"
fi
if [ ! -d "${CDIR}" ]
then
mkdir -p ${CDIR}