#!/usr/bin/env bash
set -euo pipefail

root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

pkill -u "$USER" -x taffybar || true

cd "$root"
setsid -f direnv exec . cabal run >/tmp/taffybar.log 2>&1

echo "Started taffybar in the background. Logs: /tmp/taffybar.log"
