Files
scripts_serv/yazi-picker.sh
T
2026-04-30 13:13:42 +00:00

12 lines
352 B
Bash
Executable File

#!/bin/bash
# ~/scripts/yazi-picker.sh
# Launch Yazi and capture the selected file
selected_file=$(yazi --chooser-file)
# If a file was selected, print it (or pass it to another application)
if [ -n "$selected_file" ]; then
echo "$selected_file" | xclip -selection clipboard # Copy to clipboard (optional)
echo "Selected file: $selected_file"
fi