From 63feeb9f369fc6176e85c1c2d8fcc863caad1946 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Tue, 10 Feb 2026 12:32:48 +0100 Subject: start new MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Günzler --- bin/oguri-cycle | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100755 bin/oguri-cycle (limited to 'bin/oguri-cycle') 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 -- cgit 1.4.1