Support jpg, ppm file format preference for screenshots#1650
Open
hurlbutt wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Today the screenshot utility uses
grimandgrimblastwithout specifying the--typeparameter, resulting in all files being saved as PNG even if the preferred file format isJPG. This pull request modifies the screenshot logic to read the file format from~/.config/ml4w/settings/screenshot-filenameand attempt to use that file format preference when usinggrimto save images.Changes
dotfiles/.config/ml4w/bin/ml4w-screenshotutility to extract file extension from preference and extended support toJPGandPPMfile formats.dotfiles/.config/hypr/scripts/screenshot.shscript to extract file extension from preference and extended support toJPGandPPMfile formats (when applicable).dotfiles/.config/hypr/scripts/screenshot.shscript to use same default logic for folder and file preference as laid out indotfiles/.config/ml4w/bin/ml4w-screenshot.Context
How Has This Been Tested?
Checklist
Please ensure your pull request meets the following requirements:
Additional Notes
grimblastonly supports PNG file formats when copying the image to the clipboard. As a result, any request to "Copy" or "Copy & Save" will result in the file format always being PNG.grimandgrimblastonly support PNG, JPG, and PPM formats. Any other file format (e.g. WEBP) will result in the image being saved as a PNG. A potential future enhancement may be to allow for the script to convert the image viaimagemagick, but that should require it's own PR with thought put towards any lossy issues with file format conversions.