Giter VIP home page Giter VIP logo

ivy-emms's Introduction

ivy-emms

MELPA

A simple ivy interface to emms.

Screenshot

Dependencies

This package requires emms and ivy.

If you want to act on marked candidates, you need a recent version of ivy (MELPA version 20200613.1920 or better).

Installation

From MELPA

(package-install 'ivy-emms)

or

(use-package ivy-emms
  :ensure t)

Manual

Download ivy-emms.el, put it somewhere in your load-path and then do either:

(require 'ivy-emms)

or

(autoload 'ivy-emms "ivy-emms" nil t)

Usage

First make sure that emms is working to your satisfaction and knows about your music collection.

Do M-x ivy-emms to see a formatted list of tracks to choose from.

Hit RET to play the chosen track.

Mark several tracks and hit RET to play the first track and queue the rest in the current playlist.

Warning: Either action will wipe the current EMMS playlist. See below for alternatives.

Other actions

Hit M-o (ivy-dispatching-done) to choose and apply alternate actions. Currently these are:

Key Action
a Append track(s) to the current playlist
i Play next: insert track(s) into the current playlist after the current track

Rebuilding the track-list

Call ivy-emms with a prefix argument C-u M-x ivy-emms to rebuild the track list. Useful if you add new music to EMMS after loading ivy-emms.

Customisation

Default actions

You can change the default action for single tracks (what ivy-emms does when you hit RET) with:

(setq ivy-emms-default-action #'ivy-emms-add-track)

You can also change the default multi-action (for when you have marked some tracks and then hit RET) with something like:

(setq ivy-emms-default-multi-action #'ivy-emms-play-next-multi)

Here are all the possibilities:

What Action Multi-action
Play/play and queue (default) ivy-emms-play ivy-emms-queue-and-play
Append to playlist ivy-emms-add-track N/A
Play next ivy-emms-play-next ivy-emms-play-next-multi

There is no multi-action needed for ivy-emms-add-track because the default behaviour of ivy is to call the single track action on each marked candidate in turn which is The Right Thing.

Advanced: roll your own track-list

You can change the appearance of the track-list by writing your own function to generate it:

(setq ivy-emms-make-item-function #'my-amazing-make-item)

Your function should take a string as argument (a key in the emms-cache-db hash-table) and return a cons cell with your formatted search term as car and the string as cdr.

Have a look at ivy-emms-simple-make-item for ideas to get started.

Acknowledgements

This package owes a clear intellectual debt to helm-emms and also to ivy-bitex from which I learned how to work with ivy.

ivy-emms's People

Contributors

franburstall avatar syohex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.