mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-13 12:53:00 +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)
|
(current-print void)
|
||||||
|
|
||||||
(define file
|
(define file
|
||||||
(command-line
|
;; default to random file
|
||||||
;; default to random file
|
(command-line #:args ([f
|
||||||
#:args ([f (let ([dir (directory-list)]) (path->string (list-ref dir (random (length dir)))))])
|
(let ([dir (filter file-exists? (directory-list))])
|
||||||
f))
|
(path->string (list-ref dir (random (length dir)))))])
|
||||||
|
f))
|
||||||
|
|
||||||
(printf "playing: ~a\n" file)
|
(printf "playing: ~a\n" file)
|
||||||
(system* (find-executable-path "mpv") file)
|
(system* (find-executable-path "mpv") file)
|
||||||
|
|
Loading…
Reference in a new issue