mirror of
https://github.com/NotAShelf/nyxexprs.git
synced 2024-11-22 13:20:44 +00:00
pkgs: init mpvScripts under applications/video
This commit is contained in:
parent
d52fa53348
commit
557e694c0e
3 changed files with 34 additions and 9 deletions
16
pkgs/applications/video/mpv/scripts/save-history/default.nix
Normal file
16
pkgs/applications/video/mpv/scripts/save-history/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
lib,
|
||||
mpvScripts,
|
||||
}:
|
||||
mpvScripts.buildLua {
|
||||
pname = "save-history";
|
||||
version = "unstable-2024-03-18";
|
||||
|
||||
src = builtins.filterSource (path: type: type != "directory" || (!lib.hasSuffix path ".nix")) ./.;
|
||||
|
||||
meta = {
|
||||
description = "Save history of played files";
|
||||
homepage = "https://github.com/notashelf/nyxpkgs";
|
||||
maintainers = [lib.maintainers.NotAShelf];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
local HISTFILE = (os.getenv('XDG_DATA_HOME') or os.getenv('HOME')) .. '/mpv/history.log';
|
||||
|
||||
mp.register_event('file-loaded', function()
|
||||
local title, fp;
|
||||
|
||||
title = mp.get_property('media-title');
|
||||
title = (title == mp.get_property('filename') and "" or (' (%s)'):format(title));
|
||||
|
||||
fp = io.open(HISTFILE, 'a+');
|
||||
fp:write(('[%s] %s%s\n'):format(os.date('%Y-%m-%d %X'), mp.get_property('path'), title));
|
||||
fp:close();
|
||||
end)
|
|
@ -4,21 +4,18 @@
|
|||
callPackage,
|
||||
...
|
||||
}: {
|
||||
/*
|
||||
packages that follow npins entries
|
||||
they can be updated via npins
|
||||
*/
|
||||
# packages that follow npins entries
|
||||
# they can be updated via npins
|
||||
ani-cli = mkPackage ./applications/misc/ani-cli;
|
||||
rat = mkPackage ./applications/misc/rat;
|
||||
rofi-calc-wayland = mkPackage ./applications/misc/rofi-calc-wayland;
|
||||
rofi-emoji-wayland = mkPackage ./applications/misc/rofi-emoji-wayland;
|
||||
|
||||
/*
|
||||
static packages
|
||||
need manual intervention with each update
|
||||
*/
|
||||
mov-cli = callPackage ./applications/misc/mov-cli {};
|
||||
# static packages
|
||||
# need manual intervention with each update
|
||||
cloneit = callPackage ./applications/misc/cloneit {};
|
||||
mov-cli = callPackage ./applications/misc/mov-cli {};
|
||||
mpv-history = callPackage ./applications/video/mpv/scripts/save-history {};
|
||||
mastodon-bird-ui = callPackage ./applications/social/mastodon-bird-ui {};
|
||||
headscale-ui = callPackage ./applications/networking/headscale-ui {};
|
||||
reposilite-bin = callPackage ./applications/networking/reposilite-bin {
|
||||
|
|
Loading…
Reference in a new issue