From 6bd7c20f25dbee51d61ef22b21e3831d64e82a05 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 25 Apr 2026 20:51:27 +0900 Subject: modified playlists/entire.m3u, modified bin/dmenudelmusic, modified bin/qndl, modified Music/.music.txt --- ar/.local/bin/dmenudelmusic | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ar/.local/bin/dmenudelmusic') diff --git a/ar/.local/bin/dmenudelmusic b/ar/.local/bin/dmenudelmusic index 91beeac..91994fb 100755 --- a/ar/.local/bin/dmenudelmusic +++ b/ar/.local/bin/dmenudelmusic @@ -4,8 +4,11 @@ music_dir="${XDG_MUSIC_DIR:-${HOME}/Music}" music_txt="${music_dir}/.music.txt" playlist_dir="${XDG_CONFIG_HOME:-${HOME}/.config}/mpd/playlists" -# Select the relative path (so we can find the actual file in subdirectories) -selected_relpath=$(cd "$music_dir" && find . -type f | sed 's|^\./||' | dmenu -i -l 20 -p "Select a file to delete:") || exit 1 +# Select the relative path. Sort the list so "first match" semantics in dmenu +# are deterministic — otherwise filesystem order is unstable and typing a +# substring (e.g. "성시경") can return whichever file find walked first. +# `-not -path '*/.*'` skips hidden files (.music.txt, etc.); name filter limits to audio. +selected_relpath=$(cd "$music_dir" && find . -type f -not -path '*/.*' \( -name '*.mp3' -o -name '*.m4a' -o -name '*.opus' -o -name '*.flac' -o -name '*.wav' -o -name '*.webm' \) | sed 's|^\./||' | LC_ALL=C.UTF-8 sort | dmenu -i -l 20 -p "Select a file to delete:") || exit 1 [ -n "$selected_relpath" ] || exit 1 selected_file="$music_dir/$selected_relpath" -- cgit v1.2.3