sdushantha / fontpreview

Highly customizable and minimal font previewer written in bash
MIT License
909 stars 39 forks source link

Add options to export image preview directly #20

Closed Krasjet closed 4 years ago

Krasjet commented 4 years ago

This pull request adds two options --input and --output so that you can export an image preview of a font file. A description on how you can setup file preview for fonts in vifm will come later.

Krasjet commented 4 years ago

Example:

fontpreview -i font.otf -o preview.png
Krasjet commented 4 years ago

The vifm setup instructions can be found here :)

sdushantha commented 4 years ago

@Krasjet Thank you for the detailed instructions about vifm! Could you please add what -o and -i means to the show_help function?

Krasjet commented 4 years ago

Documentations are added. I also fixed a typo in --version.

sdushantha commented 4 years ago

image Could you please fix that minor thing? Once you have done that, I will merge it :)

Krasjet commented 4 years ago

Oh, this is because short arguments have only one character, so there's no comma between them. The h option doesn't take any arguments so it's followed directly by i

Krasjet commented 4 years ago

By the way, I think you might forget to submit the review because I can't see it.

sdushantha commented 4 years ago

Oh, this is because short arguments have only one character, so there's no comma between them. The h option doesn't take any arguments so it's followed directly by i

I did not know that, I guess I learned something new today! :blush:

By the way, I think you might forget to submit the review because I can't see it.

Sorry about that, my bad :sweat_smile:

sdushantha commented 4 years ago

Quick question, could I have your config for vifm? Your setup looks so clean. Im thinking of moving from ranger to vifm because ranger is kinda slow, sometimes freezes and the keybindings dont always work. :disappointed:

Krasjet commented 4 years ago

I haven't played with vifm's config too much, most of them are from the default config files. Probably the only interesting ones are the fileviewer settings: https://gist.github.com/Krasjet/44b3d3b5732384423443b540813aa458

sdushantha commented 4 years ago

@Krasjet Thank you so much! Do you know why the images are not getting a preview? I put vifmimg in the scripts dir like it is supposed to be, but nothing is happening

shot_20-02-15_at_08-20-47

Krasjet commented 4 years ago

I'm not exactly sure, maybe you could try to add the scripts directory to path. You can also add some echo statements in the scripts to see if it's executed properly.

Krasjet commented 4 years ago

Oh, by the way, you need to run vifm using the vifmrun wrapper script described here

sdushantha commented 4 years ago

@Krasjet Thank you, it works like a charm now!

sdushantha commented 4 years ago

@Krasjet I got album cover for audio files to work now! https://github.com/sdushantha/dotfiles/blob/master/vifm/.config/vifm/scripts/vifmimg image