#!/bin/sh -eu options="First letter of each word in sentence Single line of text Thesaurus KJV Verse Lookup Title Case " printf "%s" "$options" \ | dmenu -i -b -p Plumb \ | while read -r option do text=$(plumber --option "$option" --text "$(xsel -o)") { notify-send "$text" && printf "%s" "$text" | xsel -ib; } \ || notify-send "Plumber: Clipboard selection is empty" done