1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Merge pull request #781 from NeQuissimus/XDG_CONFIG_HOME

rofi-theme-selector: Store config in XDG_CONFIG_HOME if set
This commit is contained in:
Rasmus Steinke 2018-06-03 12:19:59 +02:00 committed by GitHub
commit ca1ae5dfcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,8 +68,8 @@ function find_themes()
echo "${DIRS}"
fi
# Add user dir.
DIRS+=":${HOME}/.local/share/"
DIRS+=":${HOME}/.config/"
DIRS+=":${XDG_DATA_HOME:-${HOME}/.local/share}"
DIRS+=":${XDG_CONFIG_HOME:-${HOME}/.config}"
for p in ${DIRS}; do
p=${p%/}
TD=${p}/rofi/themes
@ -164,7 +164,7 @@ Current theme: <b>${CUR}</b>"""
###
function set_theme()
{
CDIR="${HOME}/.config/rofi/"
CDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/rofi"
if [ ! -d "${CDIR}" ]
then
mkdir -p ${CDIR}