mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-24 12:26:05 -05:00
17 lines
285 B
Bash
Executable File
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 |