Wrap the Shpotify script in a function and import into the macOS plugin

This commit is contained in:
Harish Narayanan 2017-11-14 16:18:09 +00:00
commit 9fe99694b5
2 changed files with 5 additions and 0 deletions

View file

@ -276,6 +276,9 @@ EOF
osascript -e "tell application \"iTunes\" to $opt"
}
# Spotify control function
source ./spotify
# Show/hide hidden files in the Finder
alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
alias hidefiles="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"

2
plugins/osx/spotify Executable file → Normal file
View file

@ -1,5 +1,6 @@
#!/usr/bin/env bash
function spotify() {
# Copyright (c) 2012--2017 Harish Narayanan <mail@harishnarayanan.org>
#
# Contains numerous helpful contributions from Jorge Colindres, Thomas
@ -416,3 +417,4 @@ while [ $# -gt 0 ]; do
break ;;
esac
done
}