From 9fe99694b5d83ec8e1ceb25d7ee1fd54696f036f Mon Sep 17 00:00:00 2001 From: Harish Narayanan Date: Tue, 14 Nov 2017 16:18:09 +0000 Subject: [PATCH] Wrap the Shpotify script in a function and import into the macOS plugin --- plugins/osx/osx.plugin.zsh | 3 +++ plugins/osx/spotify | 2 ++ 2 files changed, 5 insertions(+) mode change 100755 => 100644 plugins/osx/spotify diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index a1df46666..2e13d0360 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -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" diff --git a/plugins/osx/spotify b/plugins/osx/spotify old mode 100755 new mode 100644 index eb58f0f29..344a05a17 --- a/plugins/osx/spotify +++ b/plugins/osx/spotify @@ -1,5 +1,6 @@ #!/usr/bin/env bash +function spotify() { # Copyright (c) 2012--2017 Harish Narayanan # # Contains numerous helpful contributions from Jorge Colindres, Thomas @@ -416,3 +417,4 @@ while [ $# -gt 0 ]; do break ;; esac done +}