#!/bin/bash screenshot_dir="$HOME/.dwm/tag_previews/" if [ "$1" == "--hide" ]; then # If first argument is --hide execute killall feh # temp shift fi # add geometry logic here ( alignment of preview ) if [ "$1" == "--show" ]; then # If first argument is --show execute file="${screenshot_dir}${2}.jpeg" # $2 is the tag which will be previewed [ -f $file ] || exit 1 # Exit if file doesnt exist feh -g 230x130+10+40 --scale-down $file fi