summaryrefslogtreecommitdiff
path: root/scan
blob: 55a42ab4b5f8eb3ed076e372b3c3669a1224deba (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

# Find all files in subdirectories (excluding top-level files)
file=$(find . -mindepth 2 -type f 2>/dev/null | sed 's|^\./||' | sort | dmenu -l 15 -p "Select a file:")

# If a file was selected
if [ -n "$file" ]; then
	echo "You selected: $file"
	# Do something with the selected file here, like open it:
	# xdg-open "$file"  # Uncomment if desired
fi