diff options
Diffstat (limited to 'bin/oguri-cycle')
| -rwxr-xr-x | bin/oguri-cycle | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/bin/oguri-cycle b/bin/oguri-cycle index 36394b2..c09c712 100755 --- a/bin/oguri-cycle +++ b/bin/oguri-cycle @@ -17,12 +17,20 @@ fi change_bg() { for o in "${OUTPUTS[@]}"; do - idx=$((0 + RANDOM % ${#BGS[@]})) - ogurictl output "${o}" \ - --image "${BGS[${idx}]}" \ - --filter best \ - --scaling-mode fill \ - --anchor center + if [ ${#BGS} -gt 0 ]; then + idx=$((0 + RANDOM % ${#BGS[@]})) + ogurictl output "${o}" \ + --image "${BGS[${idx}]}" \ + --filter best \ + --scaling-mode fill \ + --anchor center + else + ogurictl output "${o}" \ + --image "$(grep image "${XDG_CONFIG_HOME}"/oguri/config | cut -d= -f2)" \ + --filter best \ + --scaling-mode tile \ + --anchor center + fi done } |