#!/bin/bash rootpapesdir="$HOME/pix/Wallpaper/4chget" while [[ "$option" != "w" && "$option" != "wg" ]]; do option=$(echo -e "wg\nw" | tofi --prompt-text "Is it wallpaper/general (wg) or anime wallpaper (w)?") done [[ $option == "w" ]] && parentdir="$rootpapesdir/w" && nel="nel" || parentdir="$rootpapesdir/wg" while [[ -d "$parentdir/$dir" ]]; do dir=$(tofi --prompt-text "Enter folder name: " --require-match=false