summary refs log tree commit diff
path: root/bin/oguri-cycle
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2026-02-10 12:32:48 +0100
committerRobert Günzler <r@gnzler.io>2026-02-10 12:41:25 +0100
commit63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch)
tree41cd5d2d1ec36e74e464caab722cc9b460153f04 /bin/oguri-cycle
parent5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff)
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/oguri-cycle')
-rwxr-xr-xbin/oguri-cycle50
1 files changed, 0 insertions, 50 deletions
diff --git a/bin/oguri-cycle b/bin/oguri-cycle
deleted file mode 100755
index 900fbf8..0000000
--- a/bin/oguri-cycle
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-set -e
-[ -n "$DEBUG" ] && set -x
-
-# check requirements
-for app in swww wlr-randr; do
-	if ! command -v "$app" >/dev/null; then
-		printf "%s: %s not installed but required\n" "$(basename "$0")" "$app" >&2
-		exit 1
-	fi
-done
-
-if ! pgrep swww-daemon >/dev/null 2>&1; then
-	printf "%s: swww-daemon not running, aborting\n" "$(basename "$0")" >&2
-	exit 1
-fi
-
-change_bg() {
-	local OUTPUT=$1
-
-	export SWWW_TRANSITION=none SWWW_TRANSITION_FPS=60
-	if [ ${#BGS} -gt 0 ]; then
-		idx=$((0 + RANDOM % ${#BGS[@]}))
-		swww img \
-			--outputs "${OUTPUT}" \
-			"${BGS[${idx}]}"
-	else
-		swww img \
-			--outputs "${OUTPUT}" \
-			"$(grep image "${XDG_CONFIG_HOME}"/oguri/config | cut -d= -f2)"
-	fi
-}
-
-logger 'oguri-cycle: changing background(s)' || true
-
-BGS_DIR=$HOME/pictures/wallp
-
-readarray -t OUTPUTS < <(wlr-randr --json | jq -r '..|select(.transform?=="normal")|.name')
-# readarray -t OUTPUTS < <(wlr-randr | awk 'BEGIN{name=""} /^\S/{name=$1} /Transform: normal/{print name}')
-readarray -d '' BGS < <(find "${BGS_DIR}"/horizontal/ -print0 2>/dev/null)
-readarray -d '' BGS < <(find "${BGS_DIR}"/landscape/ -print0 2>/dev/null)
-
-for o in "${OUTPUTS[@]}"; do change_bg "$o"; done
-
-readarray -t OUTPUTS < <(wlr-randr --json | jq -r '..|select((.transform?=="270")or(.transform?=="90"))|.name')
-# readarray -t OUTPUTS < <(wlr-randr | awk 'BEGIN{name=""} /^\S/{name=$1} /Transform: 90/{print name}')
-readarray -d '' BGS < <(find "${BGS_DIR}"/vertical/ -print0 2>/dev/null)
-readarray -d '' BGS < <(find "${BGS_DIR}"/portrait/ -print0 2>/dev/null)
-
-for o in "${OUTPUTS[@]}"; do change_bg "$o"; done