That's what I was thinking of at this time, though in the future idk?
]]>I want it to be able to function with more than just playing a random audio or video file
That's a little vague, can you explain more? See also http://www.catb.org/~esr/faqs/smart-questions.html & https://xyproblem.info/
dice's script could be generalised a little:
#!/bin/sh
find /path -type f -name "*.$1" | shuf -n 1 | xargs -d "\n" "$2"
Replace /path with the actual path under which you want the search to be performed and run the script with the first argument being the desired suffix of the files and the second argument being the application to be run.
So if the script was saved to /usr/local/bin/random-run and you wanted to open a random PNG file you would run
random-run png feh
Does that help?
EDIT: or use xargs -d "\n" xdg-open, which should use the file MIME type to determine the appropriate application, and then just pass the desired file suffix to the random-run script.
]]>https://dev1galaxy.org/viewtopic.php?id=4380
Except, I want it to be able to function with more than just playing a random audio or video file.
Same conditions mostly apply, its for Hyperbola mostly.
But if it works with Devuan too, cool!
]]>