#!/bin/sh # sends a list of communication TUIs (e.g catgirl) to dmenu and allows the user to choose one. # class "comm" is added to enable window managers (e.g ewm) to do specific things with them. case "$TERMINAL" in xterm) CLASS='-class';; urxvt) CLASS='-name';; alacritty|kitty) CLASS='--class';; esac while case "$(dmenu_path|(grep -E 'catgirl$|profanity$';printf 'exit\n')|dmenu -p 'choose chat app:')" in catgirl) catgirl-open.sh &;; profanity) "$TERMINAL" "$CLASS" comm -e profanity&;; *) return 1;; esac do : done