dotfiles/scripts/mpv-pick.sh

9 lines
338 B
Bash
Raw Normal View History

2026-08-07 00:59:48 -04:00
#!/bin/bash
# Build a list of full paths, display just filenames in rofi
files=$(cd $HOME/Videos && fd -t f)
selection=$(echo "$files" | awk -F'/' '{print $NF}' | rofi -i -dmenu -p mpv)
if [ -n "$selection" ]; then
fullpath=$(echo "$files" | grep -F "$selection" | head -1)
mpv --save-position-on-quit "$HOME/Videos/$fullpath"
fi