From 5463fb948708384deadd77e651981ff904d2aaf9 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 18 Aug 2024 19:02:21 -0700 Subject: [PATCH] feat: move yazi and add image previews --- users/youwen/common/core.nix | 28 ++++++++++++++++++++++++++ users/youwen/common/neovim/default.nix | 5 ----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/users/youwen/common/core.nix b/users/youwen/common/core.nix index 22d43af..17173bd 100755 --- a/users/youwen/common/core.nix +++ b/users/youwen/common/core.nix @@ -147,4 +147,32 @@ enableFishIntegration = true; enableBashIntegration = true; }; + + programs.yazi = { + enable = true; + enableBashIntegration = true; + enableFishIntegration = true; + plugins = { + mediainfo = pkgs.fetchFromGitHub { + owner = "Ape"; + repo = "mediainfo.yazi"; + rev = "c69314e80f5b45fe87a0e06a10d064ed54110439"; + hash = "sha256-8xdBPdKSiwB7iRU8DJdTHY+BjfR9D3FtyVtDL9tNiy4="; + }; + }; + settings = { + plugin = { + prepend_previewers = [ + { + mime = "{image,audio,video}/*"; + run = "mediainfo"; + } + { + mime = "application/x-subrip"; + run = "mediainfo"; + } + ]; + }; + }; + }; } diff --git a/users/youwen/common/neovim/default.nix b/users/youwen/common/neovim/default.nix index 50b4834..f4d7f3d 100644 --- a/users/youwen/common/neovim/default.nix +++ b/users/youwen/common/neovim/default.nix @@ -605,9 +605,4 @@ }) ]; }; - programs.yazi = { - enable = true; - enableBashIntegration = true; - enableFishIntegration = true; - }; }