Skip to content

emilazy/mpv-notify-send

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpv-notify-send

This is a simple Lua script for mpv that sends notifications about the playing media. It uses notify-send(1) and should therefore work with any libnotify-compatible notifications daemon. It reports title, album and year if available, and shows a cover image if present in the same directory as the media file (embedded images aren’t currently supported).

Screenshot

A screenshot of GNOME displaying a notification
with title “Guilford Avenue Bridge”
and body “Dan Deacon — America (2012)”
as mpv plays the corresponding track.

Usage

Either copy/link notify-send.lua into $XDG_CONFIG_HOME/mpv/scripts, or set script=/path/to/notify-send.lua in mpv.conf or on the command line.

If you use Nix(OS) then you can install default.nix directly or use the included overlay.nix in your configuration.nix:

{ pkgs, ... }:

{
  nixpkgs.overlays = [
    # ...
    (import /path/to/mpv-notify-send/overlay.nix)
  ];

  # ...

  environment.systemPackages = with pkgs; [
    # ...
    mpv
    mpv-notify-send
  ];

  environment.pathsToLink = ["/share/mpv"];
}

You can then link <nix profile>/share/mpv/scripts/notify-send.lua (e.g. /run/current-system/sw/share/... on NixOS, $HOME/.nix-profile/share/... when using nix-env) into $XDG_CONFIG_HOME/mpv/scripts.

Licence

mpv-notify-send is licensed under the WTFPL.

About

A Lua script for mpv to send notifications with notify-send(1).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published