mpdlrc

command module
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2023 License: MIT-0 Imports: 11 Imported by: 0

README

mpdlrc

https://github.com/eNV25/mpdlrc/

mpdlrc displays synchronized lyrics for the currently playing track in the Music Player Daemon (MPD). It uses the track's file path to find an .lrc file, e.g. file.mp3 => file.lrc. In the future, it may be extended to support synchronized lyrics embedded in the audio file.

Install

Installation requires a go compiler and the go tool.

Install to ${GOPATH:-$HOME/go}/bin using the go tool.

$ go install github.com/env25/mpdlrc@latest

or use master branch

$ go install github.com/env25/mpdlrc@master

NOTE: You may need to add ${GOPATH:-$HOME/go}/bin to $PATH.

Set up and Configure

If you run mpd in your local machine and you use MPD_HOST (and MPD_PORT) (see man:mpc(1)), you need no further configuration. If connecting using a UNIX socket, mpdlrc queries for the music directory using the MPD protocol. Otherwise, because of a restriction in the MPD protocol, it reads mpd configuration files as fallback. mpdlrc assumes your lyrics are stored alongside your music with the same filepath minus extension.

If you run mpd on a remote machine, you should explicitly configure the lyrics directory with mpdlrc. Currently you require a directory path accessible using the local machine, so you will probably need to mount your files using something like sshfs or rclone. If using a different directory, the layout should match what is used by mpd.

Any automatic configuration can be overridden using a TOML config file. The config file should be located in ${XDG_CONFIG_HOME:-$HOME/.config}/mpdlrc/config.toml. More exhaustive documentation for the config file can be found in docs/config-docs.toml.

Run

$ mpdlrc

Screenshot

screenshot.png

Documentation

Overview

Package main

Directories

Path Synopsis
Package internal contains the [Application] struct and other packages.
Package internal contains the [Application] struct and other packages.
config
Package config implements the [Config] structure, and holds related functions.
Package config implements the [Config] structure, and holds related functions.
event
Package event implements [tcell.Event] and derived types.
Package event implements [tcell.Event] and derived types.
events
Package events implements functions dealing with channels of [tcell.Event].
Package events implements functions dealing with channels of [tcell.Event].
lyrics
Package lyrics implements the [Lyrics] structure.
Package lyrics implements the [Lyrics] structure.
mpd
Package mpd provides the client side interface to MPD (Music Player Daemon).
Package mpd provides the client side interface to MPD (Music Player Daemon).
mpdconf
Package mpdconf has a MPD config file scanner.
Package mpdconf has a MPD config file scanner.
panics
Package panics implements a panic handler.
Package panics implements a panic handler.
styles
Package styles implements some elements in common used by widgets.
Package styles implements some elements in common used by widgets.
timerpool
Package timerpool implements a global timer pool.
Package timerpool implements a global timer pool.
xfilepath
Package xfilepath contains some functions complementing [filepath].
Package xfilepath contains some functions complementing [filepath].
Package lrc implements an [LRC format] parser.
Package lrc implements an [LRC format] parser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL