nix-files/hosts/common/programs/open-in-mpv.nix

30 lines
742 B
Nix
Raw Normal View History

# test: `open-in-mpv 'mpv:///open?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ'`
{ pkgs, ... }:
2023-12-14 07:26:50 +00:00
{
sane.programs.open-in-mpv = {
2024-02-15 09:49:03 +00:00
sandbox.method = "bwrap";
sandbox.whitelistDbus = [ "user" ]; # for xdg-open/portals
2023-12-14 07:26:50 +00:00
# taken from <https://github.com/Baldomo/open-in-mpv>
fs.".config/open-in-mpv/config.yml".symlink.text = ''
players:
mpv:
name: mpv
executable: xdg-open
supported_protocols:
- http
- https
fullscreen: ""
pip: ""
2023-12-14 07:26:50 +00:00
enqueue: ""
new_window: ""
needs_ipc: false
2023-12-14 07:26:50 +00:00
flag_overrides: {}
'';
mime.associations = {
"x-scheme-handler/mpv" = "open-in-mpv.desktop";
};
2023-12-14 07:26:50 +00:00
};
}