~hristoast/hristoast

hristoast/site/small-rotating-wallpaper-program.html -rw-r--r-- 872 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<h1 id="title">A small rotating wallpaper program</h1>

<div id="dates">
  <span>Posted: <time id="post-date">2017-09-23</time></span>
</div>

<p>
  I recently felt the need for a rotating desktop background - that is one that switches the image every so often.  I'm not aware of any specifc programs that solve this exact problem, but <a href="https://feh.finalrewind.org/">feh</a> sports some neat command-line options that make scripting up such a thing a cinch.  Behold:
</p>

<pre><code>#!/bin/fish

set feh_list_location $HOME/pictures/.feh_list.txt

while true;
    feh --filelist $feh_list_location --randomize --bg-fill; and sleep 5m
end</code></pre>

I'm using <code>fish</code> here because I like it, and that <code>.feh_list.txt</code> file just has a list of absolute paths to files.  See the manpage for futher details, but I thought this was pretty sweet.