mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Get rid of if condition, honour XDG_DATA_HOME
This commit is contained in:
parent
abeddb6a57
commit
ba08df8a3e
1 changed files with 3 additions and 8 deletions
|
@ -68,8 +68,8 @@ function find_themes()
|
||||||
echo "${DIRS}"
|
echo "${DIRS}"
|
||||||
fi
|
fi
|
||||||
# Add user dir.
|
# Add user dir.
|
||||||
DIRS+=":${HOME}/.local/share/"
|
DIRS+=":${XDG_DATA_HOME:-${HOME}/.local/share}"
|
||||||
DIRS+=":${HOME}/.config/"
|
DIRS+=":${XDG_CONFIG_HOME:-${HOME}/.config}"
|
||||||
for p in ${DIRS}; do
|
for p in ${DIRS}; do
|
||||||
p=${p%/}
|
p=${p%/}
|
||||||
TD=${p}/rofi/themes
|
TD=${p}/rofi/themes
|
||||||
|
@ -164,12 +164,7 @@ Current theme: <b>${CUR}</b>"""
|
||||||
###
|
###
|
||||||
function set_theme()
|
function set_theme()
|
||||||
{
|
{
|
||||||
if [ -d "${XDG_CONFIG_HOME}" ]; then
|
CDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/rofi"
|
||||||
CDIR="${XDG_CONFIG_HOME}/rofi/"
|
|
||||||
else
|
|
||||||
CDIR="${HOME}/.config/rofi/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "${CDIR}" ]
|
if [ ! -d "${CDIR}" ]
|
||||||
then
|
then
|
||||||
mkdir -p ${CDIR}
|
mkdir -p ${CDIR}
|
||||||
|
|
Loading…
Reference in a new issue