Ckath / fuf

Fairly Usable cli Filebrowser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

figure out a way to detect parameters for w3m previews

Ckath opened this issue · comments

commented

partly #1 but I feel like I'll leave this regardless of cleaning the script up. as of now some things are manually configured to finetune the w3m preview:

fuf/scripts/preview

Lines 11 to 16 in 5cc60b6

# preview img position/size config, this changes for each font and terminal
# you will have to tweak this
offset_w=27
offset_h=10
max_w=$((width*7-5))
max_h=$((height*13))

from brief testing it seems these differ per terminal/font and cause the preview to become misaligned or incorrectly sized. there should be some way to detect this correctly automatically as a few other cli fms seem to handle this just fine.

commented

as much as I would've liked to hack this together within the script, it seems I'll have to resort to getting the termsize in pixels from within C, and passing it