#!/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