summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormagnus2021-08-31 23:16:30 -0500
committermagnus2021-08-31 23:16:30 -0500
commit5a0f9b0aa1f8af2f57467db62c57c469ac941510 (patch)
tree9e43c78018419e52b05a166e362a87a64f87032d
downloadaur-5a0f9b0aa1f8af2f57467db62c57c469ac941510.tar.gz
Initial commit, add the script and PKGBUILD
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD15
-rwxr-xr-xslopgun8
3 files changed, 35 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..85b629253a92
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = slopgun
+ pkgdesc = Provide a simple script to use `slop` and `shotgun` together to save screenshots
+ pkgver = 0.1
+ pkgrel = 1
+ arch = any
+ license = GPL
+ depends = slop
+ depends = shotgun
+ depends = xclip
+ noextract = slopgun
+
+pkgname = slopgun
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..35e140fae00a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,15 @@
+# Maintainer: Magnus Anderson <magnus@iastate.edu>
+pkgname=slopgun
+pkgver=0.1
+pkgrel=1
+pkgdesc='Provide a simple script to use `slop` and `shotgun` together to save screenshots'
+arch=('any')
+license=('GPL')
+depends=('slop' 'shotgun' 'xclip')
+md5sums=() #autofill using updpkgsums
+noextract=('slopgun')
+
+package() {
+ mkdir -p "${pkgdir}/usr/bin"
+ install -D -m755 ../slopgun "${pkgdir}/usr/bin"
+}
diff --git a/slopgun b/slopgun
new file mode 100755
index 000000000000..aac6cd2d6dee
--- /dev/null
+++ b/slopgun
@@ -0,0 +1,8 @@
+#!/bin/sh
+sel=$(slop -f "-i %i -g %g")
+if [ $# -eq 0 ] ; then
+ shotgun $sel -f png - | xclip -t image/png -selection clipboard
+else
+ [ -e "$1"'.png' ] && echo "File '$1.png' already exists" && exit 1;
+ shotgun $sel -f png "$1"'.png'
+fi