* Remove upgrade button for spotify
* Change shortcut for spotify
This commit is contained in:
parent
38b933b08b
commit
21f34813d2
1 changed files with 10 additions and 8 deletions
18
arch.sh
18
arch.sh
|
@ -151,15 +151,17 @@ then
|
||||||
make install
|
make install
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf spotify-adblock
|
rm -rf spotify-adblock
|
||||||
# Remove banner
|
# Remove banner and upgrade button
|
||||||
cd "$(dirname "$(realpath -L "$(which spotify)")")"/Apps/ || exit # absolute path to Spotify
|
cd "$(dirname "$(realpath -L "$(which spotify)")")"/Apps || exit # absolute path to Spotify
|
||||||
bash -c "unzip -p xpui.spa xpui.js | sed 's/{adsEnabled:\!0}/{adsEnabled:false}/' > xpui.js"
|
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
|
zip --update xpui.spa xpui.js
|
||||||
rm xpui.js
|
rm xpui.js
|
||||||
# Change shortcut
|
cd - > /dev/null || exit
|
||||||
if [ -f /usr/share/applications/spotify.desktop ] ; then
|
# Add desktop shortcut
|
||||||
sed -i "7s#.*#Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U#" /usr/share/applications/spotify.desktop
|
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.local/share/applications/spotify.desktop -P "$HOME"/.local/share/applications/spotify.desktop
|
||||||
fi
|
|
||||||
|
|
||||||
# === Syncthing ==
|
# === Syncthing ==
|
||||||
systemctl enable syncthing@"$USER".service
|
systemctl enable syncthing@"$USER".service
|
||||||
|
@ -309,7 +311,7 @@ then
|
||||||
usermod -aG docker "$USER"
|
usermod -aG docker "$USER"
|
||||||
|
|
||||||
# === Unused icons ==
|
# === Unused icons ==
|
||||||
apps=("fish" "cmake-gui" "com.github.hluk.copyq" "electron17" "org.gnome.Evince" "avahi-discover" "bssh" "bvnc" "org.flameshot.Flameshot" "org.fontforge.FontForge" "lstopo" "htop" "micro" "qv4l2" "qvidcap" "x11-emoji-picker" "xdvi" "yelp")
|
apps=("fish" "cmake-gui" "com.github.hluk.copyq" "electron17" "org.gnome.Evince" "avahi-discover" "bssh" "bvnc" "org.flameshot.Flameshot" "org.fontforge.FontForge" "lstopo" "htop" "micro" "qv4l2" "qvidcap" "x11-emoji-picker" "xdvi" "yelp" "spotify")
|
||||||
for app in "${apps[@]}"
|
for app in "${apps[@]}"
|
||||||
do
|
do
|
||||||
if [ -f /usr/share/applications/"$app".desktop ]
|
if [ -f /usr/share/applications/"$app".desktop ]
|
||||||
|
|
Loading…
Reference in a new issue