You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mainly, preview setup is too complicated. It requires wrapper scripts and extra documentation. The "preview_*" hooks are insufficient to call other applications and scripts in varied ways they require.
Its useful to compare joshuto with vifm. I wrote an image preview script that is easily used with vifm, whereas I failed to get any sort of "hello world" preview from any tool working with joshuto. Vifm is proof; image preview can be simple for curses apps.
The details,
Wrapper scripts should not be used. They increase complexity and chance of bugs, require documentation and explanation, etc. Joshuto should provide a means for calling external scripts with no wrapper.
Preview hooks are insufficient,
The “shown” script gets the path of the file being previewed as first argument and then the x and y coordinate and the width a height of the preview area as second to fifth parameters.
It would be an improvement if joshuto would call, within reason, any script using any call signature or extra options. Vifm allows preview behaviour to call (for example) thu.sh -ck %c %pw %ph %pd, where %c and %pw will resolve to "current file" and "preview width" https://vifm.info/manual.shtml#Command%20macros Joshuto users currently must write wrapper scripts to simulate this behaviour that would be nice to have in Joshuto rather than userland.
Expose a hook or a way to call external scripts before ncurses is started. A wrapper script is not a good solution for this, as it adds complexity to userland. The hook would be useful for bash scripts like thu.sh because, when ncurses runs, stdout cannot be used by child scripts to query the terminal for things like sixel features and cell resolution. This hook would allow bash scripts to query stdout beforehand.
Mainly, preview setup is too complicated. It requires wrapper scripts and extra documentation. The "preview_*" hooks are insufficient to call other applications and scripts in varied ways they require.
Its useful to compare joshuto with vifm. I wrote an image preview script that is easily used with vifm, whereas I failed to get any sort of "hello world" preview from any tool working with joshuto. Vifm is proof; image preview can be simple for curses apps.
The details,
Wrapper scripts should not be used. They increase complexity and chance of bugs, require documentation and explanation, etc. Joshuto should provide a means for calling external scripts with no wrapper.
Preview hooks are insufficient,
It would be an improvement if joshuto would call, within reason, any script using any call signature or extra options. Vifm allows preview behaviour to call (for example)
thu.sh -ck %c %pw %ph %pd
, where%c
and%pw
will resolve to "current file" and "preview width" https://vifm.info/manual.shtml#Command%20macros Joshuto users currently must write wrapper scripts to simulate this behaviour that would be nice to have in Joshuto rather than userland.Expose a hook or a way to call external scripts before ncurses is started. A wrapper script is not a good solution for this, as it adds complexity to userland. The hook would be useful for bash scripts like
thu.sh
because, when ncurses runs, stdout cannot be used by child scripts to query the terminal for things like sixel features and cell resolution. This hook would allow bash scripts to query stdout beforehand.Thank you for reading me.
Related links,
The text was updated successfully, but these errors were encountered: