1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-24 20:27:22 -05:00
dotfiles/cfg/i3blocks/laptop/blocks/process

17 lines
285 B
Plaintext
Raw Normal View History

2017-07-26 14:00:04 -04:00
#!/bin/bash
PROG="${BLOCK_INSTANCE:-i3}"
PROG_REGEX="["$(echo "${PROG}" | cut -c 1)"]"$(echo "${PROG}" | cut -c 2-)" "
PROCESS=$(ps -eo pid,cmd | grep -w ${PROG_REGEX})
if [[ "${PROCESS}" ]]; then
echo "ok"
echo "ok"
echo ""
else
echo "na"
echo "na"
echo ""
exit 33
fi