2018-06-29 09:56:16 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# This script automatically detect the PulseEffects presets directory and installs the presets
|
|
|
|
|
|
|
|
check_installation() {
|
2018-12-30 19:52:27 +00:00
|
|
|
if flatpak list | grep -q "com.github.wwmm.pulseeffects"; then
|
2018-06-29 09:56:16 +00:00
|
|
|
PRESETS_DIRECTORY="$HOME/.var/app/com.github.wwmm.pulseeffects/config/PulseEffects"
|
2019-01-02 09:10:21 +00:00
|
|
|
elif [ -d "$HOME/.config/PulseEffects" ]; then
|
2018-06-29 09:56:16 +00:00
|
|
|
PRESETS_DIRECTORY="$HOME/.config/PulseEffects"
|
|
|
|
else
|
|
|
|
echo "Error! Couldn't find PulseEffects presets directory!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-07-22 13:18:41 +00:00
|
|
|
check_impulse_response_directory() {
|
|
|
|
if [ ! -d "$PRESETS_DIRECTORY/irs" ]; then
|
|
|
|
mkdir "$PRESETS_DIRECTORY/irs"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-06-29 09:56:16 +00:00
|
|
|
read_choice() {
|
|
|
|
CHOICE=""
|
2021-07-19 06:36:17 +00:00
|
|
|
while [[ ! $CHOICE =~ ^[1-5]+$ ]]; do
|
2018-06-29 09:56:16 +00:00
|
|
|
read -r CHOICE
|
2021-07-19 06:36:17 +00:00
|
|
|
if [ "$CHOICE" -lt 1 ] || [ "$CHOICE" -gt 5 ]; then
|
2020-08-21 14:04:02 +00:00
|
|
|
echo "Invalid option! Please input a value between 1 and 5!"
|
2018-06-29 09:56:16 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
install_menu(){
|
|
|
|
echo "Please select an option for presets installation (Default=1)"
|
|
|
|
echo "1) Install all presets"
|
|
|
|
echo "2) Install Perfect EQ preset"
|
|
|
|
echo "3) Install all bass boosting presets"
|
2020-08-21 14:04:02 +00:00
|
|
|
echo "4) Install Advanced Auto Gain"
|
2021-07-19 06:36:17 +00:00
|
|
|
echo "5) Install Laptop speaker preset"
|
2018-06-29 09:56:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_presets(){
|
|
|
|
case $CHOICE in
|
|
|
|
1) echo "Installing Bass Enhancing + Perfect EQ preset..."
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Bass%20Enhancing%20%2B%20Perfect%20EQ.json" --output "$PRESETS_DIRECTORY/output/Bass Enhancing + Perfect EQ.json" --silent
|
2018-07-22 13:18:41 +00:00
|
|
|
echo "Installing impulse response files..."
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Dolby%20ATMOS%20((128K%20MP3))%201.Default.irs" --output "$PRESETS_DIRECTORY/irs/Dolby ATMOS ((128K MP3)) 1.Default.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/MaxxAudio%20Pro%20((128K%20MP3))%204.Music%20w%20MaxxSpace.irs" --output "$PRESETS_DIRECTORY/irs/MaxxAudio Pro ((128K MP3)) 4.Music w MaxxSpace.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Razor%20Surround%20((48k%20Z-Edition))%202.Stereo%20+20%20bass.irs" --output "$PRESETS_DIRECTORY/irs/Razor Surround ((48k Z-Edition)) 2.Stereo +20 bass.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20Earpods%20HIFI.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) Earpods HIFI.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20MDR-E9LP%20HIFI.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) MDR-E9LP HIFI.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20MDR-E9LP%20SM%20SRH940.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) MDR-E9LP SM SRH940.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20MDR-E9LP%20SM%20XBA3.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) MDR-E9LP SM XBA3.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20MDR-E9LP%20SM%20beyerT1.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) MDR-E9LP SM beyerT1.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20MDR-XB500%20HIFI.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) MDR-XB500 HIFI.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20XBA-H3%20HIFI.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) XBA-H3 HIFI.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20XBA-H3%20SM%20SRH940.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) XBA-H3 SM SRH940.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20XBA-H3%20SM%20XBA4.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) XBA-H3 SM XBA4.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Accudio%20((48kHz%20Z.E.))%20XBA-H3%20SM%20beyerT1.irs" --output "$PRESETS_DIRECTORY/irs/Accudio ((48kHz Z.E.)) XBA-H3 SM beyerT1.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Creative%20X-Fi%20((Z-Edition))%20Crystalizer%2010%20%2B%20Expand%2010.irs" --output "$PRESETS_DIRECTORY/irs/Creative X-Fi ((Z-Edition)) Crystalizer 10 + Expand 10.irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/HTC%20Beats%20Audio%20((Z-Edition)).irs" --output "$PRESETS_DIRECTORY/irs/HTC Beats Audio ((Z-Edition)).irs" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/irs/Waves%20MaxxAudio%20((Z-Edition))%20AudioWizard%201.Music.irs" --output "$PRESETS_DIRECTORY/irs/Waves MaxxAudio ((Z-Edition)) AudioWizard 1.Music.irs" --silent
|
2018-09-05 19:49:49 +00:00
|
|
|
echo "Selecting default impulse response file..."
|
2019-08-01 12:19:15 +00:00
|
|
|
sed -i 's/matteo/'"$USER"'/g' "$PRESETS_DIRECTORY/output/Bass Enhancing + Perfect EQ.json"
|
2018-06-29 09:56:16 +00:00
|
|
|
echo "Installing Boosted preset..."
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Boosted.json" --output "$PRESETS_DIRECTORY/output/Boosted.json" --silent
|
2018-06-29 09:56:16 +00:00
|
|
|
echo "Installing Perfect EQ preset..."
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Perfect%20EQ.json" --output "$PRESETS_DIRECTORY/output/Perfect EQ.json" --silent
|
2019-08-01 12:19:15 +00:00
|
|
|
sed -i 's/matteo/'"$USER"'/g' "$PRESETS_DIRECTORY/output/Perfect EQ.json"
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Bass%20Boosted.json" --output "$PRESETS_DIRECTORY/output/Bass Boosted.json" --silent
|
2019-09-01 13:45:19 +00:00
|
|
|
sed -i 's/matteo/'"$USER"'/g' "$PRESETS_DIRECTORY/output/Bass Boosted.json"
|
2019-01-02 09:10:21 +00:00
|
|
|
;;
|
2018-06-29 09:56:16 +00:00
|
|
|
2) echo "Installing Perfect EQ preset..."
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Perfect%20EQ.json" --output "$PRESETS_DIRECTORY/output/Perfect EQ.json" --silent
|
2019-08-01 12:19:15 +00:00
|
|
|
sed -i 's/matteo/'"$USER"'/g' "$PRESETS_DIRECTORY/output/Perfect EQ.json"
|
2019-01-02 09:10:21 +00:00
|
|
|
;;
|
2018-06-29 09:56:16 +00:00
|
|
|
3) echo "Installing Bass Enhancing + Perfect EQ preset..."
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Bass%20Enhancing%20%2B%20Perfect%20EQ.json" --output "$PRESETS_DIRECTORY/output/Bass Enhancing + Perfect EQ.json" --silent
|
2019-08-01 12:19:15 +00:00
|
|
|
sed -i 's/matteo/'"$USER"'/g' "$PRESETS_DIRECTORY/output/Bass Enhancing + Perfect EQ.json"
|
2018-06-29 09:56:16 +00:00
|
|
|
echo "Installing Boosted preset..."
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Boosted.json" --output "$PRESETS_DIRECTORY/output/Boosted.json" --silent
|
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Bass%20Boosted.json" --output "$PRESETS_DIRECTORY/output/Bass Boosted.json" --silent
|
2019-09-01 13:45:19 +00:00
|
|
|
sed -i 's/matteo/'"$USER"'/g' "$PRESETS_DIRECTORY/output/Bass Boosted.json"
|
2019-01-02 09:10:21 +00:00
|
|
|
;;
|
2020-08-21 14:04:02 +00:00
|
|
|
4) echo "Installing Advanced Auto Gain..."
|
2022-06-01 23:03:50 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/pulseeffects/Advanced%20Auto%20Gain.json" --output "$PRESETS_DIRECTORY/output/Advanced Auto Gain.json" --silent
|
2020-08-21 14:04:02 +00:00
|
|
|
sed -i 's/matteo/'"$USER"'/g' "$PRESETS_DIRECTORY/output/Advanced Auto Gain.json"
|
|
|
|
;;
|
2021-07-19 06:36:17 +00:00
|
|
|
5) echo "Installing Laptop preset..."
|
2021-07-19 10:25:48 +00:00
|
|
|
curl "https://raw.githubusercontent.com/Digitalone1/EasyEffects-Presets/master/LoudnessEqualizerPE.json" --output "$PRESETS_DIRECTORY/output/Laptop.json" --silent
|
2021-07-19 06:36:17 +00:00
|
|
|
sed -i 's/matteo/'"$USER"'/g' "$PRESETS_DIRECTORY/output/Laptop.json"
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
2018-06-29 09:56:16 +00:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
check_installation
|
2018-07-22 13:18:41 +00:00
|
|
|
check_impulse_response_directory
|
2018-06-29 09:56:16 +00:00
|
|
|
install_menu
|
|
|
|
read_choice
|
|
|
|
install_presets
|