diff options
Diffstat (limited to 'x11-themes/background-lnxpcs/files')
-rwxr-xr-x | x11-themes/background-lnxpcs/files/i3background | 21 | ||||
-rwxr-xr-x | x11-themes/background-lnxpcs/files/i3lock-lnxpcs | 5 |
2 files changed, 26 insertions, 0 deletions
diff --git a/x11-themes/background-lnxpcs/files/i3background b/x11-themes/background-lnxpcs/files/i3background new file mode 100755 index 0000000..faec41e --- /dev/null +++ b/x11-themes/background-lnxpcs/files/i3background @@ -0,0 +1,21 @@ +#!/bin/sh +BACKS="/usr/share/backgrounds" +BACKS="/home/cynerd/src/lnxpcs/walls/solarized-dark" +# Set background +if [ -n "$DISPLAY" ]; then + # Only current one + feh --randomize --no-fehbg --bg-center "$BACKS" +else + # All instances + for socket in `find /tmp/i3-* -name ipc-socket\*`; do + i3-msg -s $socket "exec feh --randomize --no-fehbg --bg-center '$BACKS'" + done +fi +# Set cron +if ! crontab -l | grep -q i3background; then + TCRN="$(mktemp)" + crontab -l > "$TCRN" + echo "* * * * * i3background" >> "$TCRN" + crontab "$TCRN" + rm "$TCRN" +fi diff --git a/x11-themes/background-lnxpcs/files/i3lock-lnxpcs b/x11-themes/background-lnxpcs/files/i3lock-lnxpcs new file mode 100755 index 0000000..11398bd --- /dev/null +++ b/x11-themes/background-lnxpcs/files/i3lock-lnxpcs @@ -0,0 +1,5 @@ +#!/bin/sh +BACKS="/usr/share/backgrounds" +i3lock -c 000000 -i $(shuf -n1 -e "$BACKS"/*) -t -f +sleep 1 +xset dpms force off |