change spotify patch

This commit is contained in:
Mylloon 2022-11-28 16:01:51 +01:00
parent c6db7d02a7
commit 3299ed3938
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 3 additions and 30 deletions

View file

@ -1,11 +0,0 @@
[Desktop Entry]
Type=Application
Name=Spotify (sans pubs)
GenericName=Music Player
Icon=spotify-client
TryExec=spotify
Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify --uri=%U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify

22
arch.sh
View file

@ -35,7 +35,7 @@ main() {
yay -Y --devel --save yay -Y --devel --save
# === AUR packages == # === AUR packages ==
yay -S --noconfirm spotify obsidian parsec-bin onlyoffice-bin \ yay -S --noconfirm spotify-dev obsidian parsec-bin onlyoffice-bin \
x11-emoji-picker-git gnome-shell-extension-dash-to-dock \ x11-emoji-picker-git gnome-shell-extension-dash-to-dock \
gnome-shell-extension-desktop-icons-ng dracula-gtk-theme \ gnome-shell-extension-desktop-icons-ng dracula-gtk-theme \
dracula-icons-git vscodium-bin ttf-symbola \ dracula-icons-git vscodium-bin ttf-symbola \
@ -201,24 +201,8 @@ main() {
wget -q --show-progress "$url_tldr" -O completions_fish wget -q --show-progress "$url_tldr" -O completions_fish
mv completions_fish ~/.config/fish/completions/tldr.fish mv completions_fish ~/.config/fish/completions/tldr.fish
# === Spotify no-ads mod == # === Spotify ==
git clone https://github.com/abba23/spotify-adblock.git bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Linux/main/install.sh) -ce
cd spotify-adblock || exit
make
make install
cd ..
rm -rf spotify-adblock
# Remove banner and upgrade button
cd "$(dirname "$(realpath -L "$(which spotify)")")"/Apps || exit # absolute path to Spotify
unzip xpui.spa xpui.js -d .
sed -i "s/adsEnabled:!0/adsEnabled:!1/" xpui.js # disable empty ad block (banner)
sed -i "s/.\>\=1024/ 1!=1 /" xpui.js # disable Upgrade Buton
sed -i "s/((?:\"a\"))\S+noopener nofollow.+?,.)/\$1/" xpui.js # disable Premium NavLink button
zip --update xpui.spa xpui.js
rm xpui.js
cd - > /dev/null || exit
# Add desktop shortcut
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.local/share/applications/spotify.desktop -P "$HOME"/.local/share/applications/
# === Syncthing == # === Syncthing ==
systemctl enable syncthing@"$USER".service systemctl enable syncthing@"$USER".service