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