#!/bin/sh
# shellcheck disable=2034
bismillah='

In the name of Allah, the most Gracious, the most Merciful.

 ▓▓▓▓▓▓▓▓▓▓
░▓ Author ▓ Abdullah Khabir <https://abdullah.solutions>
░▓▓▓▓▓▓▓▓▓▓ YouTube <https://YouTube.com/AbdullahSolutions>
░░░░░░░░░░


'
# install some pics to my wallpapers collection
# depends on imagemagick

filename="$(basename "$1")"
info="$(convert "$1" -format "%[fx:int(mean*100)]" info:)"

if [ "${info}" -lt 45 ]; then
    destination=dark
else
    destination=light
fi

install -Dvm644 "$1" "$HOME/pix/wall/unsplash/$destination/$filename"
