Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use in midnight commander ? #130

Open
emrum opened this issue Nov 10, 2024 · 1 comment
Open

use in midnight commander ? #130

emrum opened this issue Nov 10, 2024 · 1 comment

Comments

@emrum
Copy link

emrum commented Nov 10, 2024

it is great,
i would like to use it in midnight commander ("mc") , linux, kitty terminal.

it works already, by setting this
export VIEWER=viu # also disable internal viewer in settings
but the image disappears immediately, because viu quits immediately, (and mc gui shows over)
maybe add a command-line arguement, for not exiting until key-pressed ?

@Jacajack
Copy link

I wanted to achieve something similar, but inside the MC's built-in pager. You can configure how different file types are previewed in the mc.ext.ini config file. It seems that it doesn't support the escape sequenced generated by viu, so unfortunately that didn't work. I would be happy to know if there's a solution for that - but that's an MC issue.

In your case, however, I suppose you could wrap viu in a little bash script like this:

#!/bin/sh
viu "$@"
read -n 1 -s -r -p "Press any key..."

and set VIEWER=this-script instead of viu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants