Github Spotify Mac
Spotify has 247 repositories available. Follow their code on GitHub.
# Check for Homebrew, |
# Install if we don't have it |
iftest!$(which brew);then |
echo'Installing homebrew...' |
ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' |
fi |
# Update homebrew recipes |
echo'Updating homebrew...' |
brew update |
echo'Installing Git...' |
brew install git |
echo'Installing azureCli & Jq' |
brew install azure-cli |
brew install jq |
#Install Zsh & Oh My Zsh |
echo'Installing Oh My ZSH...' |
sh -c '$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)' |
echo'Installing additional bits' |
apps=( |
azure-data-studio |
barrier |
docker |
firefox |
insomnia |
homebrew/cask-fonts/font-jetbrains-mono |
homebrew/cask-fonts/font-jetbrains-mono-nerd-font |
iterm2 |
keepassxc |
microsoft-azure-storage-explorer |
homebrew/cask-versions/microsoft-edge-beta |
mission-control-plus |
obs |
powershell-preview |
slack |
snagit |
spotify |
spotmenu |
typora |
visual-studio-code-insiders |
zoomus |
) |
# Install apps to /Applications |
# Default is: /Users/$user/Applications |
echo'installing apps with Cask...' |
brew cask install --appdir='/Applications'${apps[@]} |
brew cleanup |
# Install PowerLevel10k theme to ZSH folder |
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k |
# Download zshrc profile |
curl -L https://gist.githubusercontent.com/brettmillerb/5f9197ce3568b230f52c9641d92f99bb/raw/3caff021b8c68b61c0a9b2a4bf06722aaebf989c/zshrc-theme >~/.zshrc |
# Setup Git Folders |
mkdir -p git/gitpersonal |
mkdir -p git/gitwork |
# Set global git user name for personal account to be used with includeif |
git config --global user.Name 'Brett Miller' |
git config --global user.Email 'brett@millerb.co.uk' |
# Rename to personal gitconfig (not sure how you can set other config files from cli) |
mv ~/.gitconfig ~/.gitconfig-personal |
# Set global includeif to avoid setting |
git config --global includeif.gitdir/i:~/git/gitpersonal/.path '~/.gitconfig-personal' |
git config --global user.name 'Brett Miller' |
git config --global aliaslogline 'log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit' |
git config --global core.editor 'code-insiders --wait' |
git config --global init.defaultBranch 'main' |
echo'Preparing PowerShell Profile and Modules' |
# Clone toolbox module from github (because I cba to publish it somewhere) |
git clone https://github.com/brettmillerb/Toolbox.git git/gitpersonal/Toolbox |
# build the module |
pwsh -NoProfile git/gitpersonal/Toolbox/build.ps1 |
# Copy the built module to PSModulePath |
cp -r git/gitpersonal/Toolbox/output/ .local/share/powershell/Modules/Toolbox |
# Create $PROFILE.CurrentUserAllHosts directory and file |
PROFILEPATH=/Users/brett.miller/.config/powershell |
mkdir -p $PROFILEPATH |
cd$PROFILEPATH |
touch $PROFILEPATH/profile.ps1 |
echo'Installing pre-requisite modules for Profile loading' |
pwsh -NoProfile -Command 'Install-Module Microsoft.PowerShell.UnixCompleters, Posh-Git, oh-my-posh' |
# Download Pwsh profile |
curl -L https://gist.githubusercontent.com/brettmillerb/467e4ee2d7f8e97897f106a5534f884b/raw/4a7f0dd3d5f243af8ec23343e38dff1cb7ec107b/profile.ps1 >${HOME}/.config/powershell/profile.ps1 |
# Enable case insensitive auto-complete because screw case insensitivity |
echo'set completion-ignore-case On'>>~/.inputrc |
# Setting Dock to auto-hide and removing the auto-hiding delay |
defaults write com.apple.dock autohide -bool true |
defaults write com.apple.dock autohide-delay -float 0 |
killall dock |
# Set default screen capture to clipboard |
defaults write com.apple.screencapture target clipboard |
I use Spotify on my computer from time to time but I hate when the Ads start playing.
The first solution I was using was blocking Spotify Ads DNS’s, but that stopped working after a while.
I don’t mind having a break between a few songs, but I don’t wanna hear the Ads, so I decided to create a small script to hack it.
Github Spotify Mac App
The script does the following:
- Using OSX log system I can listen to Spotify events.
- Read the events and check if an Ad is about to be played.
- If the event is an Ad about to be played automatically mute system audio.
- If the next event is a song, unmute system audio.
- Open a new terminal (use Spotlight search and type terminal.app)
Inside the new window paste this command and then hit enter
- This will create a new folder inside your Home folder called
MuteSpotifyAds
and will place a new file calledNoAdsSpotify.sh
To run the program just copy and paste the code below in the terminal and hit enter
- Open Spotify and enjoy!
To exit the program just close the terminal app or press Ctrl+c
I used to have all the Spotify Ads DNS blocked but that stopped working.
Besides, I was bored that Saturday noon and I wanted to give it a try.
Here’s the repo if you want to know more:
Github Spotify Mp3
Photo Credits: (https://www.pexels.com/@burst)[https://www.pexels.com/@burst]