Table of Contents
Crux is a wallpaper manager written in Perl, currently it supports fetching from Unsplash Source.
I have previously written Cetus which supports Bing Photo of the Day & NASA Astronomy Picture of the Day. I plan to port all to features to Crux someday.
- OpenBSD 6.8
- Perl v5.30.3
- OpenBSD 6.7
- Perl v5.30
feh is required to set the background. Other DE/WMs & macOS can be
easily supported, if you want it then look at Cetus's source or ping me,
I'll add it. Basically you just have to use
HTTP::Tiny or something to
download the image & set it as background with DE/WM specific tools.
The version numbers mentioned in cpanfile is not the minimum required to
run Crux, you can try lowering them. Might also make this work without
some dependencies, look at
lib/ and see what dependencies you can
For example, you can probably remove Carp & replace it with
die, not the
same thing but it should work.
Some options cannot be mixed, if you mix them then expect unexpected results. It won't fail but can return photos that you didn't ask for.
--search nature --user test - You might think this will
return an image from user "test" & related to "nature" but it won't! It
will either return an image related to "nature" or user "test" because
these options cannot be mixed. Look at Unsplash Source to know more
about the kind of queries that are valid.
I could write a check for invalid options but that would be complicated
so I didn't, it's easier to ignore invalid options & you can always pass
debug option to see what query it constructed.
--search nature --daily - This is a valid set, I have written about
valid sets below, like under
daily it's mentioned that you can pass
search option so read each description.
Default is "1920x1080", it doesn't check the value passed so make sure you pass the correct value. This can be passed with any option, it will be ignored if not applicable.
Search accepts multiple space seperated values. It's passed directly to the api.
Note: The feature to get space seperated values is marked as experimental in Getopt::Long so the behaviour can change in future, worse even get removed. To guarantee backwards compatibility pass each value by itself like
--search rocky --search mountain, this is equivalent to
--search rocky mountain.
Only Unsplash curated images are returned if you pass
featured, this can be passed along with
This will return a random photo from given user.
Only returns random photo from user's likes, this is a boolean & can be passed with
Returns photos from a collection.
- daily, weekly
This will return a set random daily or weekly image.
searchoption can be passed to narrow the selection.
Crux should run on all supported platforms, there is OpenBSD specific code but it's ignored on other platforms. To know more about how this works read this page: Cross-platform compatibility.