Giter VIP home page Giter VIP logo

mpv-notify-send's Introduction

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.

mpv-notify-send's People

Contributors

emilazy avatar miawgogo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mpv-notify-send's Issues

wayland supported?

looks like I get constant "message.oga" notification if I activate this script in wayland/hyprland/arch

Feature Requests?

I'm not entirely sure if this is being maintained anymore, but I'm going to submit for your approval two feature requests anyway.

  1. Option to only allow notifications when MPV is Minimized (seems redundant to have the notifications when MPV is maximized).

  2. Option to show a YouTube video's title in the notification instead of the URL.

  3. Option to read embedded coverart.

Manually trigger script?

Works perfect when title change. BUT is it possible to trigger the script to run manually. Meaning I would want to assign a key to revile the information on demand.

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.