#!/usr/bin/env bash
set -e

# 1. Видео / музыка
if playerctl -a status 2>/dev/null | rg -q Playing; then
  exit 0
fi

# 2. Звонки / микрофон
if pactl list sources 2>/dev/null | rg -q "State: RUNNING"; then
  exit 0
fi

bash -c "$1"
