about summary refs log tree commit diff stats
path: root/bin/comm-sel
blob: 0021f886e4d55248651d9b201b648b9a47f156e9 (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 epic5) 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.
# st-altscreen is a built of st that doesn't have scrollback or extra keybindings, so it doesn't get in the way of whatever binds clients have.
# as a result it's lighter than the build of st i use for interactive use.
if command -v st-altscreen>/dev/null; then
	TERMINAL="st-altscreen"
fi
case "$(dmenu_path|grep -E "epic5$|cordless|scli$"|dmenu -p "choose chat app:")" in
	epic5) $TERMINAL -c comm -e epic5 -l "$XDG_CONFIG_HOME/epic/epicrc" ensa&;;
	cordless) $TERMINAL -c comm -e cordless -config-dir "$XDG_CONFIG_HOME/cordless" &;;
	scli) $TERMINAL -c comm -e scli&;;
	*) return;;
esac