#!/usr/bin/env bash # Install EasyEffects parametric EQ presets (Harman target) # # Presets: # dt770-pro-250-harman-eq.json - Beyerdynamic DT 770 Pro 250 Ohm (oratory1990) # pxc-550-ii-harman-eq.json - Sennheiser PXC 550-II (AutoEQ/oratory1990) # pixel-buds-pro-2-harman-eq.json - Google Pixel Buds Pro 2 (AutoEQ/DHRME) # # Prerequisites: easyeffects, pipewire, pipewire-pulse # # Usage: ./easyeffects-eq-presets.sh [install|uninstall] set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PRESET_DIR="${HOME}/.config/easyeffects/output" PRESETS=( "dt770-pro-250-harman-eq.json" "pxc-550-ii-harman-eq.json" "pixel-buds-pro-2-harman-eq.json" ) install_presets() { # Ensure easyeffects is installed if ! command -v easyeffects &>/dev/null; then echo "easyeffects not found. Installing..." sudo pacman -S --needed --noconfirm easyeffects fi mkdir -p "$PRESET_DIR" for preset in "${PRESETS[@]}"; do if [[ -f "${SCRIPT_DIR}/${preset}" ]]; then cp "${SCRIPT_DIR}/${preset}" "${PRESET_DIR}/${preset}" echo "Installed: ${preset}" else echo "Warning: ${preset} not found in ${SCRIPT_DIR}" >&2 fi done echo "" echo "Presets installed to ${PRESET_DIR}" echo "Open EasyEffects and select a preset from the dropdown." } uninstall_presets() { for preset in "${PRESETS[@]}"; do if [[ -f "${PRESET_DIR}/${preset}" ]]; then rm "${PRESET_DIR}/${preset}" echo "Removed: ${preset}" fi done } case "${1:-install}" in install) install_presets ;; uninstall) uninstall_presets ;; *) echo "Usage: $0 [install|uninstall]" >&2 exit 1 ;; esac