spotify: add layer

This commit is contained in:
Brian Hicks 2015-05-08 00:04:41 -05:00 committed by syl20bnr
parent 79988f375d
commit 5532d8e0d5
5 changed files with 90 additions and 0 deletions

35
contrib/spotify/README.md Normal file
View file

@ -0,0 +1,35 @@
# Spotify contribution layer for Spacemacs
![logo](img/spotify.png)
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**
- [Spotify contribution layer for Spacemacs](#spotify-contribution-layer-for-spacemacs)
- [Description](#description)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- markdown-toc end -->
## 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
-----------------------|-------------------------------
<kbd>SPC a m s p</kbd> | Play or pause Spotify
<kbd>SPC a m s n</kbd> | Go to the next track
<kbd>SPC a m s N</kbd> | Go to the previous track
<kbd>SPC a m s g</kbd> | Search for a new track
<kbd>SPC a m s Q</kbd> | Quit Spotify

14
contrib/spotify/config.el Normal file
View file

@ -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 <sylvain.benner@gmail.com>
;; 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")

View file

@ -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 <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(setq spotify-pre-extensions '())
(setq spotify-post-extensions '())

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -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 <sylvain.benner@gmail.com>
;; 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)))