diff options
Diffstat (limited to 'scripts/gui')
| -rwxr-xr-x | scripts/gui/swall | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/gui/swall b/scripts/gui/swall index 6b56057..7628fff 100755 --- a/scripts/gui/swall +++ b/scripts/gui/swall @@ -18,8 +18,11 @@ EOF exit 0 } + check_program "xwallpaper" +SYMLINK="${XDG_CONFIG_HOME:-$HOME/.config}/wallpaper/current" + if [ "${#}" = 0 ]; then input="${XDG_DATA_HOME:-$HOME/.local/share}/wallpapers" elif [ "${#}" != 1 ] && [ "${#}" != 2 ]; then @@ -28,7 +31,9 @@ fi while getopts "hcld:" option; do case "${option}" in - c) run --reload-compositor "xwallpaper --clear" ;; + c) + unlink "${SYMLINK}" + run --reload-compositor "xwallpaper --clear" ;; d) input="${OPTARG}" ;; @@ -60,7 +65,6 @@ fi [ -z "${image}" ] && err "No image file found" -SYMLINK="${XDG_CONFIG_HOME:-$HOME/.config}/wallpaper/current" mkdir -p "$(dirname "${SYMLINK}")" && \ ln -sf "${image}" "${SYMLINK}" && \ run "xwallpaper --zoom ${image}" "${image}" |
