scripts/scripts/digital_wellbeing/systemd/music-parallelism.service
Krzysztof kuhy Rudnicki a60acd9e68 Add instant mode for near-instantaneous music app termination
- New 'instant' mode polls every 0.5 seconds (vs 3s for regular mode)
- Made instant mode the default for the systemd service
- Added youtube-music-wrapper.sh to block launch when focus apps running
- YouTube Music killed within 0.5 seconds of opening
2025-12-07 14:40:42 +01:00

26 lines
574 B
Desktop File

[Unit]
Description=Music Parallelism Prevention - Stops music when focus apps are running
After=graphical-session.target
Wants=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/local/bin/music-parallelism.sh instant
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
# Run as user (needs access to X11/Wayland for window detection)
# This will be set during installation based on the actual user
# Environment for X11/Wayland access
Environment=DISPLAY=:0
# Resource limits
MemoryMax=50M
CPUQuota=5%
[Install]
WantedBy=default.target