From 59fb5f9c1d450a277ec58c19408aae18fabafd1b Mon Sep 17 00:00:00 2001 From: xyz Date: Wed, 11 Aug 2021 04:35:24 -0700 Subject: refactor --- .config/sxiv/exec/key-handler | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.config/sxiv') diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index 00f6fa23..bfad867f 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -38,12 +38,12 @@ flip() { linkwall() { tr '\n' '\0' | xargs -0 realpath | sort | uniq | while read -r file; do - walldir="${HOME}/pictures/wallpapers/" + walldir="$HOME/pictures/wallpapers/" name=$(basename "$file") - if [ ! -e "${walldir}${name}" ]; then - convwall "$file" "${walldir}${name}" || ln -s "$file" "${walldir}" + if [ ! -e "$walldir$name" ]; then + convwall "$file" "$walldir$name" || ln -s "$file" "$walldir" else - notify-send 'error' "${name} exist" + notify-send 'error' "$name exist" fi done } -- cgit v1.2.3-70-g09d2