Skip to content

Commit

Permalink
telescope-media-files: re-enable with chafa
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Dec 9, 2024
1 parent d24a831 commit 9d6131c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/buildPlugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let

telescopeFixupHook = ''
substituteInPlace $out/scripts/vimg \
--replace "ueberzug layer" "${pkgs.ueberzug}/bin/ueberzug layer"
--replace "chafa" "${pkgs.chafa}/bin/chafa"
substituteInPlace $out/lua/telescope/_extensions/media_files.lua \
--replace "M.base_directory .. '/scripts/vimg'" "'$out/scripts/vimg'"
'';
Expand Down
3 changes: 1 addition & 2 deletions lib/ide.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ let
telescope = {
enable = true;
tabs.enable = true;
# NOTE: still quite buggy in some terminals
mediaFiles.enable = false;
mediaFiles.enable = true;
};
markdown = {
enable = true;
Expand Down
8 changes: 8 additions & 0 deletions modules/telescope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ in
},
},
extensions = {
media = {
backend = "chafa",
backend_options = {
chafa = {
move = true,
},
},
},
media_files = {
filetypes = {"png", "webp", "jpg", "jpeg"},
find_cmd = "${pkgs.fd}/bin/fd",
Expand Down

0 comments on commit 9d6131c

Please sign in to comment.