Permalink
Browse files

updated to Makefile construct

  • Loading branch information...
1 parent 7fa8e20 commit 2085085c1aa2c8b4c17cfa610bf1e7d7a351af2e @graysky2 committed Mar 16, 2013
Showing with 63 additions and 49 deletions.
  1. +4 −0 CHANGELOG
  2. +15 −0 INSTALL
  3. +7 −0 LICENSE
  4. +35 −0 Makefile
  5. +0 −46 README-for_other_distros
  6. +0 −1 README.md
  7. +1 −1 { → common}/backdrop-randomizer
  8. +1 −1 { → doc}/backdrop-randomizer.1
View
@@ -1,3 +1,7 @@
+v2.21
+16-Mar-2013
+CHange to Makefile construct.
+
v2.20
10-Mar-2013
Name change of manpage.
View
15 INSTALL
@@ -0,0 +1,15 @@
+BUILDING
+ There is no configure script nor is there anything to compile.
+
+ Setup the via a make.
+
+ $ make
+
+ Running a `make install` as root will distribute the files to
+ the filesystem.
+
+ # make install
+
+If you wish to contribute to other distros, fork this project
+on github and submit a pull request:
+https://github.com/graysky2/backdrop-randomizer
View
@@ -0,0 +1,7 @@
+Copyright (c) 2013 graysky
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,35 @@
+VERSION = 2.21
+PN = backdrop-randomizer
+PN_SHORT = bdr
+
+PREFIX ?= /usr
+CONFDIR = /etc
+BINDIR = $(PREFIX)/bin
+DOCDIR = $(PREFIX)/share/doc/$(PN)-$(VERSION)
+MANDIR = $(PREFIX)/share/man/man1
+
+RM = rm
+Q = @
+
+all:
+ $(Q)echo -e '\033[1;32mSetting version\033[0m'
+ $(Q)sed -i -e 's/@VERSION@/'$(VERSION)'/' common/$(PN)
+
+install-bin:
+ $(Q)echo -e '\033[1;32mInstalling main script...\033[0m'
+ install -Dm755 common/$(PN) "$(DESTDIR)$(BINDIR)/$(PN)"
+ ln -s $(PN) "$(DESTDIR)$(BINDIR)/$(PN_SHORT)"
+
+install-man:
+ $(Q)echo -e '\033[1;32mInstalling manpage...\033[0m'
+ install -Dm644 doc/$(PN).1 "$(DESTDIR)$(MANDIR)/$(PN_SHORT).1"
+ gzip -9 "$(DESTDIR)$(MANDIR)/$(PN_SHORT).1"
+ ln -s $(PN_SHORT).1.gz "$(DESTDIR)$(MANDIR)/$(PN).1.gz"
+
+install: install-bin install-man
+
+uninstall:
+ $(Q)$(RM) "$(DESTDIR)$(BINDIR)/$(PN)"
+ $(Q)$(RM) "$(DESTDIR)$(BINDIR)/$(PN_SHORT)"
+ $(Q)$(RM) "$(DESTDIR)$(MANDIR)/$(PN).1.gz"
+ $(Q)$(RM) "$(DESTDIR)$(MANDIR)/$(PN_SHORT).1.gz"
View
@@ -1,46 +0,0 @@
-NAME
-backdrop-randomizer - Companion for xfdesktop which randomly cycles through wallpapers without repeating them until all have been displayed once.
-
-SYNOPSIS
-backdrop-randomizer [option]
-
-DESCRIPTION
-Xfdesktop has a gap currently: it does not keep track of which images in a list are displayed as "backdrops" to the DE. The result is that some images in a list get displayed frequently while others are rarely displayed. A more robust implementation of the random background feature should randomly display an image in the list and not repeat it until all list members have been displayed at least once.
-
-HOW IT WORKS
-Each time you or cron calls the script with the "R" token, it will randomly select a picture from your list [database if you will] to display. It will then remove that selection from the db so as not to repeat the same pic twice per cycle. When backdrop-randomizer sees you have only one pic left in your list, it regenerates the list anew and continues to cycle. The net effect is an endless rotation of your pics without a repeat.
-
-To "use" the randomized pics, backdrop-randomizer simply creates a symlink to the random selection and calls xfdesktop to reload.
-
-FUNCTION LETTERS
- R Select a pic at (R)andom from the database.
- S Display database (S)tats.
- L (L)ist all pics in the database.
- A (A)dd the next token to the database.
- C (C)lear the databse and start anew.
-
-SETUP
-1. Run it with no tokens and it will create a conf file if needed ($XDG_HOME_CONFIG/backdrop-randomizer.conf) which you should edit per the annotations therein.
-2. Run it again to create your database and setup your symlink.
-3. Right-click the xfce4 desktop and select Desktop Settings>Background>Single Image and locate the symlink (default location is $XDG_HOME_CONFIG/backdrop-randomizer.jpg).
-4. Call the script via cronjob at the desired interval. (Below example shows once every 20 min). Hint for newbies: edit your crontab like this: crontab -e
-
-Example:
- */20 * * * * /usr/bin/backdrop-randomizer R
-
-To add a pic to the database without recreating it, simply call the script with the 'A' functinon followed by the filename to add.
-
-Example:
- backdrop-randomizer A newpic.jpg
-
-WHAT ELSE
-Should you be running xscreensaver, backdrop-randomizer will not rotate your pics if the screensaver is active or if the screen is locked. This is automatically detected and implemented.
-
-CONTRIBUTE
-Should you wish to contribute to this code, please fork and send a pull request. Source is freely available on github: https://github.com/graysky2/backdrop-randomizer
-
-BUGS
-No known bugs.
-
-AUTHOR
-graysky (graysky AT archlinux DOT us)
View
@@ -8,7 +8,6 @@ Xfdesktop has a gap currently: it does not keep track of which images in a list
Each time you or cron calls the script, it will randomly select a picture from your list to display. It will then remove the selection from the list so as not to repeat the same pic twice per cycle. When backdrop-randomizer sees you have only one pic left in your list, it regenerates the list anew and continues to cycle. The net effect is an endless rotation of your pics without a repeat.
##Usage
-* Copy the script to wherever you wish (/usr/bin for example).
* Call the script to create $XDG_CONFIG_HOME/backdrop-randomizer.conf wherein you will define your options..
* Right-click the xfce4 desktop and select Desktop Settings > Background.
* Setup the image to "Single image" and select the symlink that the script made for you which is by default: $XDG_CONFIG_HOME/backdrop-randomizer.jpg
View
@@ -8,7 +8,7 @@
# see manpage for usage
#
-VERS="2.19"
+VERS="@VERSION@"
export BLD="\e[01m" RED="\e[01;31m" GRN="\e[01;32m" YLW="\e[01;33m" NRM="\e[00m"
[[ -z "$XDG_CONFIG_HOME" ]] && XDG_CONFIG_HOME="$HOME/.config" # make sure env var is setup correctly
@@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man
-.TH backdrop-randomizer 1 "14 November 2012" "" ""
+.TH backdrop-randomizer 1 "16 March 2013" "" ""
.SH NAME
\fBbackdrop-randomizer \fP- Companion for xfdesktop which randomly cycles through wallpapers without repeating them until all have been displayed once.
\fB

0 comments on commit 2085085

Please sign in to comment.