You are not logged in.
Basically, its like this thread:
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!
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
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.
Last edited by Head_on_a_Stick (2022-02-13 13:57:59)
Brianna Ghey — Rest In Power
Offline
In particular, there are two interests, loading certain .txt files via something like focuswriter or l3afpad
That's what I was thinking of at this time, though in the future idk?
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline