From 19b925e741fa46d2222210469a4dffc34a634ebd Mon Sep 17 00:00:00 2001 From: Janosch Schwalm Date: Tue, 7 Aug 2018 20:42:02 +0200 Subject: use https everywhere (#6574) * use https everywhere * use https links on the files that are left Also, removed some broken links and updated redirections. --- plugins/osx/osx.plugin.zsh | 2 +- plugins/osx/spotify | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/osx') diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index b7d6aca72..d99cf0b1e 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -241,7 +241,7 @@ if [[ ! -z "$playlist" ]]; then case "$state" in on|off) - # Inspired by: http://stackoverflow.com/a/14675583 + # Inspired by: https://stackoverflow.com/a/14675583 osascript 1>/dev/null 2>&1 <<-EOF tell application "System Events" to perform action "AXPress" of (menu item "${state}" of menu "Shuffle" of menu item "Shuffle" of menu "Controls" of menu bar item "Controls" of menu bar 1 of application process "iTunes" ) EOF diff --git a/plugins/osx/spotify b/plugins/osx/spotify index 69f6c5419..2ab98d3a0 100644 --- a/plugins/osx/spotify +++ b/plugins/osx/spotify @@ -408,7 +408,7 @@ while [ $# -gt 0 ]; do uri=`osascript -e 'tell application "Spotify" to spotify url of current track'`; remove='spotify:track:' url=${uri#$remove} - url="http://open.spotify.com/track/$url" + url="https://open.spotify.com/track/$url" if [ "$2" = "" ]; then cecho "Spotify URL: $url" -- cgit v1.2.3-70-g09d2 From d4cae83152d17fd73514532d57fb75a878b651cc Mon Sep 17 00:00:00 2001 From: Matthieu PETIOT Date: Mon, 10 Sep 2018 20:10:31 +0200 Subject: osx: add function to remove .DS_Store files (#7008) rmdsstore removes .DS_Store files recursively in the current directory by default, or for the given directories. --- plugins/osx/README.md | 33 +++++++++++++++++---------------- plugins/osx/osx.plugin.zsh | 7 ++++++- 2 files changed, 23 insertions(+), 17 deletions(-) (limited to 'plugins/osx') diff --git a/plugins/osx/README.md b/plugins/osx/README.md index d3a8f94df..7c75c65f5 100644 --- a/plugins/osx/README.md +++ b/plugins/osx/README.md @@ -42,19 +42,20 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Commands -| Command | Description | -| :-------------- | :----------------------------------------------- | -| `tab` | Open the current directory in a new tab | -| `split_tab` | Split the current terminal tab horizontally | -| `vsplit_tab` | Split the current terminal tab vertically | -| `ofd` | Open the current directory in a Finder window | -| `pfd` | Return the path of the frontmost Finder window | -| `pfs` | Return the current Finder selection | -| `cdf` | `cd` to the current Finder directory | -| `pushdf` | `pushd` to the current Finder directory | -| `quick-look` | Quick-Look a specified file | -| `man-preview` | Open a specified man page in Preview app | -| `showfiles` | Show hidden files | -| `hidefiles` | Hide the hidden files | -| `itunes` | Control iTunes. User `itunes -h` for usage details | -| `spotify` | Control Spotify and search by artist, album, track and etc.| +| Command | Description | +| :-------------- | :-------------------------------------------------- | +| `tab` | Open the current directory in a new tab | +| `split_tab` | Split the current terminal tab horizontally | +| `vsplit_tab` | Split the current terminal tab vertically | +| `ofd` | Open the current directory in a Finder window | +| `pfd` | Return the path of the frontmost Finder window | +| `pfs` | Return the current Finder selection | +| `cdf` | `cd` to the current Finder directory | +| `pushdf` | `pushd` to the current Finder directory | +| `quick-look` | Quick-Look a specified file | +| `man-preview` | Open a specified man page in Preview app | +| `showfiles` | Show hidden files | +| `hidefiles` | Hide the hidden files | +| `itunes` | Control iTunes. User `itunes -h` for usage details | +| `spotify` | Control Spotify and search by artist, album, track… | +| `rmdsstore` | Remove .DS\_Store files recursively in a directory | diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index d99cf0b1e..6a4b6eec4 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -209,7 +209,7 @@ if [[ ! -z "$playlist" ]]; then opt="play" else opt="stop" - fi + fi else opt="set allPlaylists to (get name of every playlist)" fi @@ -282,3 +282,8 @@ source ${ZSH}/plugins/osx/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" + +# Remove .DS_Store files recursively in a directory, default . +rmdsstore() { + find "${@:-.}" -type f -name .DS_Store -delete +} -- cgit v1.2.3-70-g09d2 From ecb46c3ec743a0c081a88b1de187d62d954fd5be Mon Sep 17 00:00:00 2001 From: Josh Parnham Date: Thu, 18 Oct 2018 03:53:51 +1100 Subject: osx: fix typo in README (#7283) --- plugins/osx/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/osx') diff --git a/plugins/osx/README.md b/plugins/osx/README.md index 7c75c65f5..3559dee02 100644 --- a/plugins/osx/README.md +++ b/plugins/osx/README.md @@ -56,6 +56,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | `man-preview` | Open a specified man page in Preview app | | `showfiles` | Show hidden files | | `hidefiles` | Hide the hidden files | -| `itunes` | Control iTunes. User `itunes -h` for usage details | +| `itunes` | Control iTunes. Use `itunes -h` for usage details | | `spotify` | Control Spotify and search by artist, album, track… | | `rmdsstore` | Remove .DS\_Store files recursively in a directory | -- cgit v1.2.3-70-g09d2 From 2614b7ecdfe8b8f0cbeafffefb5925196f4011d4 Mon Sep 17 00:00:00 2001 From: Igor Kapkov Date: Wed, 28 Nov 2018 08:58:36 +1100 Subject: osx: fix rmdsstore function definition (#7443) --- plugins/osx/osx.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/osx') diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 6a4b6eec4..a1c73a184 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -284,6 +284,6 @@ alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && alias hidefiles="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" # Remove .DS_Store files recursively in a directory, default . -rmdsstore() { +function rmdsstore() { find "${@:-.}" -type f -name .DS_Store -delete } -- cgit v1.2.3-70-g09d2 From e634730e35450b408efa6acc9273d3c1eff12d8c Mon Sep 17 00:00:00 2001 From: genevera Date: Tue, 5 Feb 2019 05:20:25 -0500 Subject: update spotify to newest version --- plugins/osx/spotify | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins/osx') diff --git a/plugins/osx/spotify b/plugins/osx/spotify index 2ab98d3a0..b4215dbe7 100644 --- a/plugins/osx/spotify +++ b/plugins/osx/spotify @@ -1,7 +1,7 @@ #!/usr/bin/env bash function spotify() { -# Copyright (c) 2012--2017 Harish Narayanan +# Copyright (c) 2012--2018 Harish Narayanan # # Contains numerous helpful contributions from Jorge Colindres, Thomas # Pritchard, iLan Epstein, Gabriele Bonetti, Sean Heller, Eric Martin @@ -134,8 +134,13 @@ showStatus () { if [ $# = 0 ]; then showHelp; else + if [ ! -d /Applications/Spotify.app ] && [ ! -d $HOME/Applications/Spotify.app ]; then + echo "The Spotify application must be installed." + exit 1 + fi + if [ $(osascript -e 'application "Spotify" is running') = "false" ]; then - osascript -e 'tell application "Spotify" to activate' + osascript -e 'tell application "Spotify" to activate' || exit 1 sleep 2 fi fi @@ -160,7 +165,7 @@ while [ $# -gt 0 ]; do showAPIHelp; exit 1; fi - SHPOTIFY_CREDENTIALS=$(printf "${CLIENT_ID}:${CLIENT_SECRET}" | base64 | tr -d "\n"); + SHPOTIFY_CREDENTIALS=$(printf "${CLIENT_ID}:${CLIENT_SECRET}" | base64 | tr -d "\n"|tr -d '\r'); SPOTIFY_PLAY_URI=""; getAccessToken() { -- cgit v1.2.3-70-g09d2 From 351fa06574556a3edca12c5def51a2bf5deed68b Mon Sep 17 00:00:00 2001 From: Umberto Lentini Date: Tue, 9 Apr 2019 14:05:53 +0200 Subject: osx: added support for Hyper terminal (#7494) --- plugins/osx/osx.plugin.zsh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'plugins/osx') diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index a1c73a184..7deed0ba6 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -51,6 +51,17 @@ EOF end tell end tell EOF + elif [[ "$the_app" == 'Hyper' ]]; then + osascript >/dev/null </dev/null <&2 @@ -132,6 +156,19 @@ EOF end tell EOF + elif [[ "$the_app" == 'Hyper' ]]; then + osascript >/dev/null <&2 false -- cgit v1.2.3-70-g09d2