Fix error when cancel selection (dmenu_drun)

This commit is contained in:
q3aql 2022-07-14 09:17:56 +02:00
parent 4a1ef143c0
commit 609324236a

View File

@ -4,7 +4,7 @@
# dmenu_drun - dmenu script that simulates 'rofi -show drun' #
# #
# Author: q3aql <q3aql@duck.com> #
# Last update: 10-07-2022 #
# Last update: 14-07-2022 #
##############################################################
# Configuration variables
@ -95,6 +95,7 @@ load_theme
create_list_files
list_output=$(list_desktop_icons | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p " drun:")
run_output=$(echo ${list_output} | cut -c 5-999)
if [ ! -z "${run_output}" ] ; then
if [ "${run_output}" == "Scan New Desktop Files" ] ; then
echo "0" > ${HOME}/.dmenu/read_list
create_list_files
@ -103,3 +104,4 @@ else
run_desktop_file=$(cat "${load_desktop_files}/${run_output}")
${runDesktop} "${run_desktop_file}"
fi
fi