about summary refs log tree commit diff stats
path: root/bin/comm-sel
blob: ce2e99b6a2d578bdd977bb1e98d00a3132ca71f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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 dwm) to do specific things with them.
case "$TERMINAL" in
	xterm) CLASS='-class';;
	urxvt) CLASS='-name';;
	alacritty|kitty) CLASS='--class';;
esac
case "$(dmenu_path|grep -E "catgirl$|cordless|scli$"|dmenu -p "choose chat app:")" in
	catgirl) catgirl-open.sh &;;
	cordless) $TERMINAL $CLASS comm -e env TERM=xterm-256color cordless -config-dir "$XDG_CONFIG_HOME/cordless" &;;
	scli) $TERMINAL $CLASS comm -e scli&;;
	*) return;;
esac