'center' not working with -c

If I run imv like imv -c center image.png the image is not centered as expected. It appears the center command is executed before the window is initialized and still operates on the 'width' and 'height' defined in the config rather than the actual window dimensions.

Related (would be another possible solution for me):
Is there an option to automatically recenter the image after each change in actual window size? I couldn't find anything in man(1/5) imv

Assigned to
2 years ago
a month ago
No labels applied.

~itaton 2 years ago

Additional info: I'm running imv on sway/wayland

~exec64 2 years ago

I don't think there's a straightforward way to run the command after the image has loaded, since image loading is somewhat asynchronous in imv. An option to keep the image centered as the window is resized would be a welcome addition to imv though.

Register here or Log in to comment, or comment via email.