Skip to content

Commit

Permalink
Merge pull request #4 from smarkoco/main
Browse files Browse the repository at this point in the history
correct repo folder name, for immediate running after cloning
  • Loading branch information
nisiddharth authored Mar 12, 2023
2 parents d74265e + 7be1f87 commit fcd1947
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Mutes and unmutes Spotify within 5 seconds of start and end of Ads.

### Usage:

To use just run `mute_spotify_timer.sh` either using terminal or Alt + F2 launcher or just add it to list of system Startup Applications. To allow monitoring the ongoing status, run `adfree.sh` as a Startup Application. It creates a new background tmux session called `adfree`, which can be connected to with `tmux a -t adfree`.
To use just run `mute_spotify_timer.sh` either using terminal or Alt + F2 launcher or just add it to list of system Startup Applications. To allow monitoring the ongoing status, run `adfree.sh` as a Startup Application, or with `bash adfree.sh`. It creates a new background tmux session called `adfree`, which can be connected to with `tmux a -t adfree`.

### Maintenance:

Expand Down
2 changes: 1 addition & 1 deletion adfree.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
tmux new-session -d -s adfree
tmux send-keys '~/spotify-muter-linux/mute_spotify_timer.sh' C-m # C-m sends ENTER keystroke
tmux send-keys '~/Spotify-Ads-Muter-Linux/mute_spotify_timer.sh' C-m # C-m sends ENTER keystroke
5 changes: 2 additions & 3 deletions mute_spotify_timer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ while true; do

if [[ "$name" = *"Advertisement"* || "$name" = *"Spotify"* ]] || [[ $url == *"/ad/"* ]]; then
echo "Muting"
~/spotify-muter-linux/mute_app.sh spotify mute
sleep 5
~/Spotify-Ads-Muter-Linux/mute_app.sh spotify mute
else
echo "Unmuting"
~/spotify-muter-linux/mute_app.sh spotify unmute
~/Spotify-Ads-Muter-Linux/mute_app.sh spotify unmute
fi
sleep 1
done

0 comments on commit fcd1947

Please sign in to comment.