• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dronir/SpotifyControl: Control Spotify from the command line on macOS

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

dronir/SpotifyControl

开源软件地址(OpenSource Url):

https://github.com/dronir/SpotifyControl

开源编程语言(OpenSource Language):

AppleScript 100.0%

开源软件介绍(OpenSource Introduction):

Control Spotify at OS X Terminal

An AppleScript for controlling Spotify through a terminal:

The scenario for which it was originally designed is controlling Spotify, which is playing on a Mac, via ssh, while working on a Linux machine on the other side of the room.

Currently supported functions are: play/pause, next/previous track, jumping in time, toggling shuffle/repeat and changing volume. This pretty much covers everything the AppleScript hooks of Spotify allow.

Tested Platforms

  • OS X Big Sur (11.5), Spotify 1.1.66.580

  • OS X El Capitan (10.11)

  • OS X Yosemite (10.10)

  • OS X Mavericks (10.9)

  • OS X Mountain Lion (10.8)

  • OS X Lion (10.7)

Installation

The simplest way to install the script is to clone the repository, cd into repository's directory, and run the command below to make a symbolic link into /usr/local/bin/:

ln -s $(pwd)/SpotifyControl /usr/local/bin/spotify

Usage

  • To start Spotify playback, type spotify start or spotify play. If you do this locally and Spotify is not running, it will start. Remotely, Spotify will not start properly. Optionally, pass a Spotify URI as a second argument.
  • To Search for track name and play, type spotify play track [song name].
  • To Search for artist name and play, type spotify play artist [artist name].
  • To Search for album name and play, type spotify play album [album name].
  • To pause Spotify playback, type spotify stop or spotify pause.
  • To toggle playback, type spotify play/pause.
  • To go to the next track, type spotify next.
  • To go to the previous track, type spotify previous or spotify prev.
  • To print information about the currently playing track, type spotify info
  • To jump to a particular time in the track, type spotify jump N, where N is the track position in seconds.
  • To fast forward, type spotify forward N where N is the number of seconds to jump ahead.
  • To rewind, type spotify rewind N where N is the number of seconds to jump backwards.
  • To change volume, type spotify volume N where N is a number between 0 and 100.
  • To increase volume by 10%, type spotify volume up.
  • To decrease volume by 10%, type spotify volume down.
  • Increase volume, type spotify increasevolume N where N is a number between 0 and 100 that you want to increment by.
  • Decrease volume, type spotify decreasevolume N where N is a number between 0 and 100 that you want to decrement by.
  • To toggle shuffle, type spotify shuffle [on|off].
  • To toggle repeat, type spotify repeat [on|off].
  • To show a list of these commands, just type spotify.

Over SSH

To enable the SSH server on OS X, go to Sharing in the System Preferences and enable Remote Login. The Sharing screen will also then tell you the command to use to connect to your Mac in the local network.

License

You may use, adapt, modify, and etc. Any way you want.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap