Files
nova-os-desktop/scripts/lofi-player.sh
T

24 lines
623 B
Bash
Raw Normal View History

#!/bin/bash
# Nova OS Lofi Player — chill beats on startup
# Uses mpv to stream a 24/7 lofi radio
STREAM_URL="https://www.youtube.com/watch?v=jfKfPfyJRdk" # Lofi Girl
VOLUME=40
PLAYER="mpv"
# Check if already running
if pgrep -f "mpv.*lofi\|mpv.*jfKfPfyJRdk" > /dev/null; then
exit 0
fi
# Wait for audio system
sleep 3
# Start playing in background
if command -v mpv &>/dev/null; then
mpv --no-video --volume=$VOLUME --really-quiet "$STREAM_URL" &
elif command -v vlc &>/dev/null; then
cvlc --no-video --volume=$((VOLUME*2)) --play-and-exit "$STREAM_URL" &
fi
echo "🎵 Nova Lofi Radio — playing..."