diff options
-rwxr-xr-x | .local/bin/convwall | 3 | ||||
-rwxr-xr-x | .local/bin/shufwall | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/.local/bin/convwall b/.local/bin/convwall index dbd9c795..21645240 100755 --- a/.local/bin/convwall +++ b/.local/bin/convwall @@ -1,6 +1,6 @@ #!/bin/sh -# 16:9 screen resolution ratio +# 16:9 screen aspect ratio # 16*100/9 == 177 wratio=16 hratio=9 @@ -24,6 +24,7 @@ if [ "$dim" -ne "$ratio" ]; then # caused by head exit (or close stdin) before sort output complete, can ignore # https://stackoverflow.com/questions/46202653/bash-error-in-sort-sort-write-failed-standard-output-broken-pipe bgcolor=$(convert "$1" -gravity center -chop "$chopgeom" -define histogram:unique-colors=true -format %c histogram:info:- | sort -rn | head -n1 | awk \{print\ \$3\} | cut -c1-7) + # another approach is to use "$width" or "x$height" for geometry, current approach is more readable convert "$1" -gravity center -background "$bgcolor" -extent "${width}x$height" "$2" else echo 'same resolution ratio, no need to convert' >&2 diff --git a/.local/bin/shufwall b/.local/bin/shufwall index 831e614f..489b6307 100755 --- a/.local/bin/shufwall +++ b/.local/bin/shufwall @@ -6,4 +6,4 @@ else file=$(find -L "$@" -maxdepth 1 -type f | shuf -n 1) fi -display -backdrop -window root "$file" +display -resize '1600x900' -backdrop -window root "$file" |