summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11-themes/background-lnxpcs/background-lnxpcs-0.3.ebuild (renamed from x11-themes/background-lnxpcs/background-lnxpcs-0.2.ebuild)8
-rwxr-xr-xx11-themes/background-lnxpcs/files/i3background21
2 files changed, 14 insertions, 15 deletions
diff --git a/x11-themes/background-lnxpcs/background-lnxpcs-0.2.ebuild b/x11-themes/background-lnxpcs/background-lnxpcs-0.3.ebuild
index f30d5b1..0625be0 100644
--- a/x11-themes/background-lnxpcs/background-lnxpcs-0.2.ebuild
+++ b/x11-themes/background-lnxpcs/background-lnxpcs-0.3.ebuild
@@ -12,6 +12,7 @@ LICENSE="GPL-3.0+"
SLOT="0"
IUSE=""
+DEPENDS="media-gfx/imagemagick[png]"
RDEPEND="
x11-misc/i3lock
media-gfx/feh[xinerama]"
@@ -19,14 +20,15 @@ RDEPEND="
WALLPAPERS="bash cron gcc gnu gnu-linux iptables kernel kill python root su sudo vim"
src_compile() {
- # Nothing to compile
- true
+ for IMG in $WALLPAPERS; do
+ ./makemywall 1920 1080 "cards/black/$IMG-card-black.png"
+ done
}
src_install() {
insinto "/usr/share/backgrounds"
for IMG in $WALLPAPERS; do
- doins "cards/black/$IMG-card-black.png"
+ doins "$IMG-card-black-1920x1080.png"
done
dobin "${FILESDIR}/i3background"
dobin "${FILESDIR}/i3lock-lnxpcs"
diff --git a/x11-themes/background-lnxpcs/files/i3background b/x11-themes/background-lnxpcs/files/i3background
index f55f8e7..cf51581 100755
--- a/x11-themes/background-lnxpcs/files/i3background
+++ b/x11-themes/background-lnxpcs/files/i3background
@@ -1,20 +1,17 @@
#!/bin/sh
BACKS="/usr/share/backgrounds"
-# Set background
+
if [ -n "$DISPLAY" ]; then
- # Only current one
feh --randomize --no-fehbg --bg-fill "$BACKS"
+ if ! crontab -l 2>/dev/null | grep -q i3background; then
+ TCRN="$(mktemp)"
+ crontab -l 2>/dev/null > "$TCRN"
+ echo "* * * * * i3background" >> "$TCRN"
+ crontab "$TCRN"
+ rm "$TCRN"
+ fi
else
- # All instances
for socket in $(find /run/user/$(id -u)/i3 /tmp/i3-$(id -un).* -name ipc-socket\* 2>/dev/null); do
- i3-msg -s $socket "exec feh --randomize --no-fehbg --bg-fill '$BACKS'"
+ i3-msg -s $socket "exec $0"
done
fi
-# Set cron
-if ! crontab -l 2>/dev/null | grep -q i3background; then
- TCRN="$(mktemp)"
- crontab -l 2>/dev/null > "$TCRN"
- echo "* * * * * i3background" >> "$TCRN"
- crontab "$TCRN"
- rm "$TCRN"
-fi