mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
fix offset on theme previews
This commit is contained in:
parent
673124b22c
commit
743b393f15
1 changed files with 5 additions and 4 deletions
|
@ -81,7 +81,7 @@ function find_themes()
|
|||
themes+=(${file})
|
||||
FN=$(basename ${file})
|
||||
NAME=${FN%.*}
|
||||
USER=$(${SED} -n 's/^.*User: \(.*\)/\1/p' ${file} | head -n 1 )
|
||||
USER=$(${SED} -n 's/^.*User: \(.*\)/\1/p' ${file} )
|
||||
if [ -z "${USER}" ]
|
||||
then
|
||||
theme_names+=(${NAME})
|
||||
|
@ -129,6 +129,7 @@ function select_theme ()
|
|||
MORE_FLAGS+=(-kb-custom-1 "Alt-a")
|
||||
MORE_FLAGS+=(-u 2,3 -a 4,5 )
|
||||
local CUR="default"
|
||||
SELECTED="-1"
|
||||
while true
|
||||
do
|
||||
declare -i RTR
|
||||
|
@ -140,9 +141,9 @@ Current theme: <b>${CUR}</b>"""
|
|||
THEME_FLAG=
|
||||
if [ -n "${SELECTED}" ]
|
||||
then
|
||||
THEME_FLAG="-theme ${themes[${SELECTED}]}"
|
||||
THEME_FLAG="-theme ${themes[${SELECTED}]}"
|
||||
fi
|
||||
RES=$( create_theme_list | ${ROFI} ${THEME_FLAG} ${MORE_FLAGS[@]} -selected-row "${SELECTED}" -mesg "${MESG}")
|
||||
RES=$( create_theme_list | ${ROFI} ${THEME_FLAG} ${MORE_FLAGS[@]} -cycle -selected-row "$(( ${SELECTED} +1 ))" -mesg "${MESG}")
|
||||
RTR=$?
|
||||
if [ ${RTR} = 10 ]
|
||||
then
|
||||
|
@ -152,7 +153,7 @@ Current theme: <b>${CUR}</b>"""
|
|||
return 1;
|
||||
fi
|
||||
CUR=${theme_names[${RES}]}
|
||||
SELECTED=${RES}
|
||||
SELECTED=$(( ${RES} -1 ))
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue