diff options
author | zachir <zachir@librem.one> | 2022-10-09 01:19:04 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2022-10-09 01:19:04 -0500 |
commit | 0ad890bae271b17a7eaf76f70b2c462e4ca10333 (patch) | |
tree | e81457c2d4cf414a66edb010b4cfbc2e0974e400 /tofimpv | |
parent | d36e7cd095371deb8b70115fc7817d351bcfa645 (diff) |
reorganize .local/bin folder
Diffstat (limited to 'tofimpv')
-rwxr-xr-x | tofimpv | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/tofimpv b/tofimpv deleted file mode 100755 index 1d935d0..0000000 --- a/tofimpv +++ /dev/null @@ -1,46 +0,0 @@ -#!/sbin/sh - -cd ~/Videos -case "$@" in - "-l") - LOOP="true" - ;; - "-h") - HELP="true" - ;; -esac - -playvid () { - while true; do - VIDEO=$(printf ".\n%s\n" "$(ls)" | uniq | tofi "$@") - [ -z $VIDEO ] && exit - if [ "$VIDEO" = "." ]; then - break; - fi - [ -d $VIDEO ] && cd $VIDEO && continue - [ -f "$VIDEO" ] && break - pwd - done - mpv "$VIDEO" -} - -printhelp () { - printf \ - "Usage: dmpv [-l] [-h]\n" \ - "dmpv is a simple tofi interface for playing content with mpv\n" \ - "dmpv assumes videos are stored in ~/Videos\n" \ - " -h\t\tprint this help message\n" \ - " -l\t\trun the prompt again after mpv exits\n" -} - -if [ -n "$HELP" ]; then - printhelp && exit 0 -elif [ -n "$LOOP" ]; then - while true; do - playvid || exit 0 - done -fi - -playvid - done -fi |