1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-12-10 21:48:09 -05:00
dotfiles/cfg/i3blocks/laptop/blocks/process
2017-07-26 11:05:09 -07:00

17 lines
285 B
Bash
Executable File

#!/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