diff --git a/contrib/spotify/README.md b/contrib/spotify/README.md new file mode 100644 index 000000000..046846637 --- /dev/null +++ b/contrib/spotify/README.md @@ -0,0 +1,35 @@ +# Spotify contribution layer for Spacemacs + +![logo](img/spotify.png) + + +**Table of Contents** + +- [Spotify contribution layer for Spacemacs](#spotify-contribution-layer-for-spacemacs) + - [Description](#description) + - [Install](#install) + - [Key bindings](#key-bindings) + + + +## Description + +This layer adds key bindings for controlling Spotify from inside Emacs. + +## Install + +To use this contribution layer add it to your `~/.spacemacs` + +```elisp +(set-default dotspacemacs-configuration-layers '(spotify)) +``` + +## Key bindings + +Key Binding | Description +-----------------------|------------------------------- +SPC a m s p | Play or pause Spotify +SPC a m s n | Go to the next track +SPC a m s N | Go to the previous track +SPC a m s g | Search for a new track +SPC a m s Q | Quit Spotify diff --git a/contrib/spotify/config.el b/contrib/spotify/config.el new file mode 100644 index 000000000..2b40895cd --- /dev/null +++ b/contrib/spotify/config.el @@ -0,0 +1,14 @@ +;;; extensions.el --- sql Layer extensions File for Spacemacs +;; +;; Copyright (c) 2012-2014 Sylvain Benner +;; Copyright (c) 2014-2015 Sylvain Benner & Contributors +;; +;; Author: Sylvain Benner +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +(spacemacs/declare-prefix "am" "music") +(spacemacs/declare-prefix "ams" "Spotify") diff --git a/contrib/spotify/extensions.el b/contrib/spotify/extensions.el new file mode 100644 index 000000000..2f8f6da90 --- /dev/null +++ b/contrib/spotify/extensions.el @@ -0,0 +1,15 @@ +;;; extensions.el --- spotify Layer extensions File for Spacemacs +;; +;; Copyright (c) 2012-2014 Sylvain Benner +;; Copyright (c) 2014-2015 Brian Hicks & Contributors +;; +;; Author: Sylvain Benner +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +(setq spotify-pre-extensions '()) + +(setq spotify-post-extensions '()) diff --git a/contrib/spotify/img/spotify.png b/contrib/spotify/img/spotify.png new file mode 100644 index 000000000..39c3175b5 Binary files /dev/null and b/contrib/spotify/img/spotify.png differ diff --git a/contrib/spotify/packages.el b/contrib/spotify/packages.el new file mode 100644 index 000000000..3368c9ac8 --- /dev/null +++ b/contrib/spotify/packages.el @@ -0,0 +1,26 @@ +;;; packages.el --- spotify Layer packages File for Spacemacs +;; +;; Copyright (c) 2012-2014 Sylvain Benner +;; Copyright (c) 2014-2015 Brian Hicks & Contributors +;; +;; Author: Sylvain Benner +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +(defvar spotify-packages '(spotify helm-spotify)) + +(defun spotify/init-spotify () + (use-package spotify + :config (evil-leader/set-key + "amsp" 'spotify-playpause + "amsn" 'spotify-next + "amsN" 'spotify-previous + "amsQ" 'spotify-quit))) + +(defun spotify/init-helm-spotify () + (use-package helm-spotify + :config (evil-leader/set-key + "amsg" 'helm-spotify)))