dotfiles-remastered/.local/share/scripts/set-bg.sh
2020-06-25 21:28:33 +02:00

20 lines
295 B
Bash
Executable File

#!/usr/bin/env sh
# required packages:
# - feh
set -e
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
[ -z "$@" ] && exit 0
LAST_BG_LOCATION="$XDG_CACHE_HOME/last-bg"
feh --bg-scale $1
rm -f "$LAST_BG_LOCATION"
ln -s $1 $(realpath "$LAST_BG_LOCATION")
$SCRIPTPATH/set-color.sh