1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

fix user being split from theme name

This commit is contained in:
Rasmus Steinke 2017-10-15 17:55:41 +02:00
parent 8deedd8645
commit aa0cd52a7f

View file

@ -81,7 +81,7 @@ function find_themes()
themes+=(${file})
FN=$(basename ${file})
NAME=${FN%.*}
USER=$(${SED} -n 's/^.*User: \(.*\)/\1/p' ${file} )
USER=$(${SED} -n 's/^.*User: \(.*\)/\1/p' ${file} | head -n 1 )
if [ -z "${USER}" ]
then
theme_names+=(${NAME})
@ -143,7 +143,7 @@ Current theme: <b>${CUR}</b>"""
then
THEME_FLAG="-theme ${themes[${SELECTED}]}"
fi
RES=$( create_theme_list | ${ROFI} ${THEME_FLAG} ${MORE_FLAGS[@]} -cycle -selected-row "$(( ${SELECTED} +1 ))" -mesg "${MESG}")
RES=$( create_theme_list | ${ROFI} ${THEME_FLAG} ${MORE_FLAGS[@]} -cycle -selected-row "${SELECTED}" -mesg "${MESG}")
RTR=$?
if [ ${RTR} = 10 ]
then
@ -153,7 +153,7 @@ Current theme: <b>${CUR}</b>"""
return 1;
fi
CUR=${theme_names[${RES}]}
SELECTED=$(( ${RES} -1 ))
SELECTED=${RES}
done
}