Dotfiles/.config/polybar/themes/monolit-dracula/polybar-scripts/isrunning-service/isrunning-service.sh

12 lines
209 B
Bash

#!/bin/sh
UNIT="docker.service"
journalctl --follow -o cat --unit $UNIT | while read -r; do
if [ "$(systemctl is-active "$UNIT")" = "active" ]; then
echo "#1"
else
echo "#2"
fi
done