ShadowArch/EtcFiles/profile.d/shadowarch-user-weechat.sh

10 lines
337 B
Bash
Raw Normal View History

2024-08-12 17:26:50 -05:00
# Three start conditions:
# * Interactive shell
# * Weechat is installed
# * User doesn't have a running weechat process
# * User isn't root
2024-09-11 16:27:55 -05:00
# * User is in the weechat group
if [[ $- == *i* ]] && [ -f `which weechat` ] && [ `ps -u $USER | grep -c weechat` -eq 0 ] && [ $USER != 'root' ] && [[ "$(id)" =~ weechat ]]; then
2024-08-12 17:26:50 -05:00
weechat;
fi