aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-15 18:50:12 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-15 18:50:12 +1300
commit1a0ac5be601f00e828dba181a7c90c2b29735b77 (patch)
tree52360b4ba5bf994a65b869c9ba13fedd2e82b1ee
parentAdd command guards around .xinitrc.d subscripts (diff)
downloaddotfiles-1a0ac5be601f00e828dba181a7c90c2b29735b77.tar.gz
dotfiles-1a0ac5be601f00e828dba181a7c90c2b29735b77.zip
Remove xrbg(1)
Overkill given feh(1) has a --randomize
-rw-r--r--ISSUES.markdown8
-rw-r--r--X/xinitrc.d/xbackground.sh3
-rw-r--r--X/xinitrc.d/xrbg.sh2
-rwxr-xr-xbin/xrbg4
-rw-r--r--man/man1/xrbg.1df19
5 files changed, 3 insertions, 33 deletions
diff --git a/ISSUES.markdown b/ISSUES.markdown
index 0eb4fe69..19375c83 100644
--- a/ISSUES.markdown
+++ b/ISSUES.markdown
@@ -15,14 +15,6 @@ Known issues
* A key binding for importing sections of the screen and optionally uploading
it would be great, probably using ImageMagick import(1)
* sxhkd(1) might be nicer than xbindkeys; it's in Debian Testing now
-* xrbg(1) is likely redundant:
-
- 13:31:51 <tejr> i pick a random one on startup with a little script
- 13:32:41 <cosarara> I run this on startup http://sprunge.us/JFCL
- 13:33:06 <tejr> haha i didn't even know about --randomize
- 13:33:14 <tejr> p sure that makes my script redundant actually
- 13:33:32 <tejr> yep it does
-
* dr(1df) is probably more practical in awk
* How come commands I fix with the fc builtin always seem to exit 1 even if
they succeed? Did I do that or is it Bash?
diff --git a/X/xinitrc.d/xbackground.sh b/X/xinitrc.d/xbackground.sh
new file mode 100644
index 00000000..7f2bc8c3
--- /dev/null
+++ b/X/xinitrc.d/xbackground.sh
@@ -0,0 +1,3 @@
+# Apply a random background image
+command -v feh >/dev/null 2>&1 || return
+feh --bg-scale --no-fehbg --randomize -- "${XBACKGROUNDS:-"$HOME"/.xbackgrounds}"
diff --git a/X/xinitrc.d/xrbg.sh b/X/xinitrc.d/xrbg.sh
deleted file mode 100644
index 0e4ec278..00000000
--- a/X/xinitrc.d/xrbg.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-# Apply a random background image
-xrbg
diff --git a/bin/xrbg b/bin/xrbg
deleted file mode 100755
index 801bf078..00000000
--- a/bin/xrbg
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-# Apply a random background image. Requires rndf(1df) and feh(1).
-bg=$(rndf "${XBACKGROUNDS:-"$HOME"/.xbackgrounds}") || exit
-feh --bg-scale --no-fehbg -- "$bg"
diff --git a/man/man1/xrbg.1df b/man/man1/xrbg.1df
deleted file mode 100644
index 481c9185..00000000
--- a/man/man1/xrbg.1df
+++ /dev/null
@@ -1,19 +0,0 @@
-.TH XRBG 1df "March 2016" "Manual page for xrbg"
-.SH NAME
-.B xrbg
-\- apply a random X background image with feh(1)
-.SH SYNOPSIS
-.B xrbg
-.br
-XBACKGROUNDS=/path/to/images
-.B xrbg
-.SH DESCRIPTION
-.B xrbg
-searches for images in the directory named in the XBACKGROUNDS environment
-variable (defaults to ~/.xbackgrounds), chooses a random one with rndf(1df),
-and applies it with feh(1). It's designed for use in ~/.xinitrc, but it seems
-to work when called manually from within an X session too.
-.SH SEE ALSO
-feh(1), rndf(1df)
-.SH AUTHOR
-Tom Ryder <tom@sanctum.geek.nz>