#!/usr/bin/env bash openvpn_icon="%{T2}%{T-}" globalprotect_icon="%{T2}%{T-}" output="" if pgrep openvpn >/dev/null; then output=${openvpn_icon} fi if pgrep gpclient >/dev/null; then output="${output} ${globalprotect_icon}" fi echo "$output"