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

Automatic generation of exec entries based of file exntension #219

Closed
wants to merge 1 commit into from

Conversation

alttabber
Copy link
Contributor

This allows the user to set an exec rule that would be executed automatically when a file with a specified extension is opened by Swayimg.

Ex.

[listl.autoexec]
formats = mp4,eps
mp4 = ffmpegthumbnailer -i % -o - -c png
eps = inkscape % --export-filename=- --export-type=svg

In this example, every time the user tries to open a foo.mp4 time, swayimg will automatically invoke ffmpegthumbnailer, and every time the user tries to open a foo.eps file, swayimg will automatically invoke Inkscape to convert it to svg.

This may have uses beyond just hacking in support for formats swayimg has no decoder for.

@artemsen
Copy link
Owner

The first point of Unix philosophy is:
Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new "features".

Please stop creating an all-in-one combine from an image viewer.
Image viewer should display images, that's all.
It shouldn't extract images from archives or resource files, it shouldn't convert them from one format to another, it shouldn't work directly with network or devices, it shouldn't do anything except decoding and displaying image data.

@alttabber
Copy link
Contributor Author

alttabber commented Nov 20, 2024

This PR doesn't add any of the features you listed. All it does is adding a UI to the already existing exec:// that's in the config rather than in the CLI. Does Vim break the Unix philosophy because it's scriptable? No.

So, either exec:// breaks the Unix philosophy already, or this PR doesn't.

@artemsen
Copy link
Owner

Sorry, I still think batch processing is beyond the functionality of the image viewer and should be done by external tools.

@artemsen artemsen closed this Nov 21, 2024
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

Successfully merging this pull request may close these issues.

2 participants