don't display duplicate .desktop entries

This commit is contained in:
speedie 2023-04-14 21:41:56 +02:00
parent 8934327efe
commit 621fdb53a6

View file

@ -352,7 +352,14 @@ EOF
}
main_desktop() {
print_menu() { res="$(print_list | $RUNLAUNCHER $RUNLAUNCHER_DESKTOP_ARGS)"; }
print_menu() {
if [ "$DISPLAY_DUPLICATES" != "false" ]; then
res="$(print_list | $RUNLAUNCHER $RUNLAUNCHER_DESKTOP_ARGS)"
else
res="$(print_list | uniq $UNIQ_ARGS | $RUNLAUNCHER $RUNLAUNCHER_DESKTOP_ARGS)"
fi
}
prep() { mkdir -p "$TEMPORARY_DIR"; rm -f "$LOGFILE"; touch "$LOGFILE"; }
scan() { entry_c="$(find "$DESKTOP_DIR" -type f | wc -l)"; cached_c="$(find "$TEMPORARY_DIR" -type f | wc -l)"; cached="$(find "$TEMPORARY_DIR" -type f)"; }