<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=4887&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Script for starting application and picking random folder to do it in]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=4887</link>
		<description><![CDATA[The most recent posts in Script for starting application and picking random folder to do it in.]]></description>
		<lastBuildDate>Mon, 14 Feb 2022 03:56:43 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Script for starting application and picking random folder to do it in]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=34644#p34644</link>
			<description><![CDATA[<p>In particular, there are two interests, loading certain .txt files via something like focuswriter or l3afpad</p><p>That&#039;s what I was thinking of at this time, though in the future idk?</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Mon, 14 Feb 2022 03:56:43 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=34644#p34644</guid>
		</item>
		<item>
			<title><![CDATA[Re: Script for starting application and picking random folder to do it in]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=34617#p34617</link>
			<description><![CDATA[<div class="quotebox"><cite>zapper wrote:</cite><blockquote><div><p>I want it to be able to function with more than just playing a random audio or video file</p></div></blockquote></div><p>That&#039;s a little vague, can you explain more? See also <a href="http://www.catb.org/~esr/faqs/smart-questions.html" rel="nofollow">http://www.catb.org/~esr/faqs/smart-questions.html</a> &amp; <a href="https://xyproblem.info/" rel="nofollow">https://xyproblem.info/</a></p><p>dice&#039;s script could be generalised a little:</p><div class="codebox"><pre><code>#!/bin/sh
find /path -type f -name &quot;*.$1&quot; | shuf -n 1 | xargs -d &quot;\n&quot; &quot;$2&quot;</code></pre></div><p>Replace <span class="bbc">/path</span> 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.</p><p>So if the script was saved to /usr/local/bin/random-run and you wanted to open a random PNG file you would run</p><div class="codebox"><pre><code>random-run png feh</code></pre></div><p>Does that help?</p><p>EDIT: or use <span class="bbc">xargs -d &quot;\n&quot; xdg-open</span>, which should use the file MIME type to determine the appropriate application, and then just pass the desired file suffix to the <span class="bbc">random-run</span> script.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sun, 13 Feb 2022 10:58:32 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=34617#p34617</guid>
		</item>
		<item>
			<title><![CDATA[Script for starting application and picking random folder to do it in]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=34613#p34613</link>
			<description><![CDATA[<p>Basically, its like this thread:</p><p><a href="https://dev1galaxy.org/viewtopic.php?id=4380" rel="nofollow">https://dev1galaxy.org/viewtopic.php?id=4380</a></p><p>Except, I want it to be able to function with more than just playing a random audio or video file. </p><p>Same conditions mostly apply, its for Hyperbola mostly.&#160; </p><p>But if it works with Devuan too, cool! </p><p><img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Sun, 13 Feb 2022 03:02:06 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=34613#p34613</guid>
		</item>
	</channel>
</rss>
