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

[feature] Add option to choose location of where to save the file #92

Open
sga-13 opened this issue Jun 14, 2024 · 4 comments
Open

[feature] Add option to choose location of where to save the file #92

sga-13 opened this issue Jun 14, 2024 · 4 comments

Comments

@sga-13
Copy link

sga-13 commented Jun 14, 2024

The title. Can an option (either graphical or keyboard shortcut like Ctrl+Shift+S or something alike) which will open a file picker (maybe the gtk one or the xdg file picker) and we are able to choose a location to save the output, which may or may not be independent of where the Ctrl+S would save

I tried to achieve something similar by using yazi (a terminal file manager) to act as a file picker, and using that either choose the location to save or the exact file path, but somehow i am not able to stop it from rendering before the screenshot is taken

I have tried to

grim -g "$(slurp)" - | satty --filename - --annotation-size-factor 0.4 --output-filename "$(yazi-filepicker)/out.png"

and other variations where i give full path, or add a sleep time (which works but limits me on how fast should i snip)

any help is welcomed, and if this issue is duplicate, then I am sorry, but I could not find any

@gabm
Copy link
Owner

gabm commented Jun 14, 2024

This feature is not present (yet). Satty started life as a CLI tool without graphical interaction apart from the annotation task itself. But it developed since and the lack of a graphical file picker for saving is something that also came to my attention - i fully agree.

To preserve the current functionality, I suggest the following mechanism:

  • if the user specified a save path or pattern, then use that one as "is"
  • if the user did not specify an output filename, then we show the button anyway (contrary to now) and upon button press, show the gtk file picker and then save the file there...

I think that would be quite easy to implement - do you want to take a shot? I can provide guidance

@sga-13
Copy link
Author

sga-13 commented Jun 14, 2024

I have no experience in rust, all i can do is python and bash scripting (and weirdly java), I can try to take a shot at it, but please do not expect much

i am going to imagine that we include some function here (like color palette has something set by default, but instead calling in filepicker)

impl Default for Configuration {
    fn default() -> Self {
        Self {
            input_filename: String::new(),
            output_filename: None,
            fullscreen: false,
            early_exit: false,
            initial_tool: Tools::Pointer,
            copy_command: None,
            annotation_size_factor: 1.0,
            save_after_copy: false,
            color_palette: ColorPalette::default(),
            default_hide_toolbars: false,
            font: FontConfiguration::default(),
        }
    }
}

if this is correct, then I can try to take a shot, if not please guide me

@nomm-dot
Copy link

nomm-dot commented Aug 3, 2024

Just wanted add more interest in this functionality, as satty is great for taking quick screenshots while taking notes. I like to use emacs org, and have an /images dir per project/course/topic to reference the image for more mobility of the notes. Additionally, with the functionality to change the name when choosing the directory would be great. This is mostly so that I can add a keyword to the file name so that I don't need to use a GUI to know what screenshot I'm moving.

@gabm
Copy link
Owner

gabm commented Aug 3, 2024

I do see the need for that and I'll happily accept PRs along the mentioned lines!

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

3 participants