Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
markubiak committed Jul 27, 2014
1 parent 705fd14 commit fc80b44
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#About

wallpaper-reddit is a Python 3.4.1 script that simply sets your wallpaper to the top image from (a) subreddit(s) on reddit.com.

This is my first foray into Python, as Java is the only language I "know." I always thought it would be cool to have some of the images from /r/earthporn and /r/spaceporn as wallpapers, and now I've automated it.
Expand All @@ -10,7 +9,6 @@ This is my first foray into Python, as Java is the only language I "know." I al
- ping

#Usage

The script is very simple to use. If you have not copied the script to a folder such as /usr/bin or /usr/local/bin, make sure to cd into the directory of the script. Then, type:

wallpaper-reddit [subreddits]
Expand All @@ -22,7 +20,6 @@ If no subreddits are specified, the script will default to the top image from th
Now, the script will throw errors until you properly configure it. The config file is in ~/.config/wallpaper-reddit, and will be created automatically. Due to the varying nature of window managers, every user will have to set a command to set the wallpaper. This can be researched per desktop environment, although the provided (deleteable) examples should cover a large portion of window managers. Changing the other options in the config file is optional, but recommended.

#Options

-v or --verbose: tells you what the program is doing (useful if you're on dialup or the script isn't getting wallpapers)

--maxlinks: specifies how many links to process from the specified subreddits. More will take longer to get, but may help if the subreddit isn't image-centric. The default can be specified in the config file.
Expand All @@ -34,9 +31,17 @@ Now, the script will throw errors until you properly configure it. The config f
--nocleanup: will not remove the wallpaper-reddit folder from /tmp upon the script's completion. The default can be set in the config file.

#Startup

If wallpaper-reddit is run with the --startup flag, the program will wait on an internet connection. Options for the startup can only be set in the config file. They are under the [Startup] section: interval and attempts. The script will try to make a connection to reddit.com $attempts times at every $interval seconds. For example, the default setting is an interval of 3 and 10 attempts, so the script will try to connect to reddit every 3 seconds for up to 10 tries, giving a total of 30 seconds before the scrpit gives up. As a reminder, this feature is only activated by the --startup flag

#Saving

If wallpaper-reddit is run with the --save flag, no wallpaper will be downloaded. The current wallpaper will be copied to the save directory, as specified in the config file (default is ~/Pictures/Wallpapers), and its title will be put into a titles.txt file inside the same directory.

#Blacklists
There is a function to blacklist a certain wallpaper from the script, if it is particularly ugly. Simply run the script with the --blacklist flag. The script will run as usual, but additionally blacklist your current wallpaper. You'll get a new wallpaper and never see the old one again.

#External commands and wallpaper info
Because more information is always better, much more than the wallpaper exists in ~/.wallpaper.
- blacklist.txt contains the urls of blacklisted wallpapers, one can manually add urls without issue.
- url.txt is the url of the current wallpaper
- title.txt is the title of the current wallpaper (useful if you want to put the title into conky!)
- external.sh is a bash script that is run at the end of every execution of the script. Any extra commands to deal with the wallpaper can be safely places in this bash script. I personally have mine darken my xfce4-panel if the wallpaper is too bright at the top, and set the wallpaper as my SLiM/xscreensaver background.

0 comments on commit fc80b44

Please sign in to comment.