45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
home-manager.users."djai".programs.mpv = {
|
|
enable = true;
|
|
bindings = {
|
|
"3" = "run /home/djai/Scripts/ssguipeg '\${path}'";
|
|
"4" = "run /home/djai/Scripts/rename.sh '\${path}'";
|
|
"5" = "run gio trash \${path}; run echo 'deleted \${path}'; playlist-next";
|
|
"0" = ''show-text "3: ssguipeg\n4: Move\n5: Delete"'';
|
|
"ctrl+LEFT" = "playlist-prev";
|
|
"ctrl+RIGHT" = "playlist-next";
|
|
"LEFT" = "seek -5";
|
|
"RIGHT" = "seek 5";
|
|
"ENTER" = "script-message-to script write-name; playlist-next";
|
|
};
|
|
|
|
config = {
|
|
volume = 70;
|
|
osd-playing-msg = "\${media-title}";
|
|
# use gpu decoding instead of cpu decoding
|
|
gpu-api = "vulkan";
|
|
hwdec = "auto";
|
|
};
|
|
|
|
profiles = {
|
|
twitch = {
|
|
profile-cond = ''get("path", ""):find("^https://www.twitch.tv/") ~= nil'';
|
|
profile-restore = "copy-equal";
|
|
sub-font-size = 30;
|
|
sub-align-x = "right";
|
|
sub-align-y = "top";
|
|
};
|
|
};
|
|
|
|
scripts = with pkgs.mpvScripts; [
|
|
visualizer
|
|
twitch-chat
|
|
mpris
|
|
];
|
|
};
|
|
|
|
home-manager.users."djai".home.file.".config/mpv/scripts/visualizer.lua".source = ../../scripts/mpv-visualizer.lua;
|
|
}
|