mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-13 12:32:59 +01:00
playvid: filter out directories
This commit is contained in:
parent
4460f34a41
commit
0951917e27
1 changed files with 5 additions and 4 deletions
|
@ -9,10 +9,11 @@
|
|||
(current-print void)
|
||||
|
||||
(define file
|
||||
(command-line
|
||||
;; default to random file
|
||||
#:args ([f (let ([dir (directory-list)]) (path->string (list-ref dir (random (length dir)))))])
|
||||
f))
|
||||
;; default to random file
|
||||
(command-line #:args ([f
|
||||
(let ([dir (filter file-exists? (directory-list))])
|
||||
(path->string (list-ref dir (random (length dir)))))])
|
||||
f))
|
||||
|
||||
(printf "playing: ~a\n" file)
|
||||
(system* (find-executable-path "mpv") file)
|
||||
|
|
Loading…
Reference in a new issue