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

cosmic-screenshot saves with different filenames formats depending on if --interactive=true or false. #67

Open
nevdelap opened this issue Oct 21, 2024 · 2 comments

Comments

@nevdelap
Copy link

nevdelap commented Oct 21, 2024

Either of these...

cosmic-screenshot --save-dir=~/Pictures
cosmic-screenshot --interactive=true --save-dir=~/Pictures

saves with a filename like this (lowercase s and hyphen).

screenshot-2024-10-21-04-43-34.png

whereas this...

cosmic-screenshot --interactive=false --save-dir=~/Pictures > /dev/null

saves with an uppercase S and an underscore.

Screenshot_2024-10-21_14-44-06.png

On Arch with: cosmic-screenshot-git 1.0.0.alpha.1.r0.g031eb66

joshuamegnauth54 added a commit to joshuamegnauth54/xdg-desktop-portal-cosmic that referenced this issue Dec 8, 2024
Closes:
* pop-os/cosmic-screenshot#67
* pop-os/cosmic-screenshot#74
* pop-os/cosmic-screenshot#40

I replaced `time` with `chrono`. `time` is an excellent crate, but
`chrono` is pulled in as a transient dependency of `libcosmic` and
`cosmic-files`. `cosmic-screenshot` also uses `chrono` instead of
`time`. Replacing `time` also ensures that the code here matches the
screenshot program closer.
@joshuamegnauth54
Copy link
Contributor

Thanks you so much for this bug report! Your report helped me find and fix this bug (and two others too). I attempted to fix a similar issue a few weeks ago, but I couldn't figure out the problem at all.

@msmafra
Copy link

msmafra commented Dec 15, 2024

I imagine --interactive only works inside a full COSMIC session, I ran it inside Hyprland to try to use it as my screen capture there too, but it doesn't show the interface and ignores the --save-dir when set to true, also still saving with different name formats.

 ❯ cosmic-screenshot --interactive=true --modal=true --save-dir /tmp
/run/user/1000/hypr/xdph_screenshot_7b2c857a.png

 ❯ cosmic-screenshot --interactive=true --modal=false --save-dir "/tmp"
/run/user/1000/hypr/xdph_screenshot_7d02f6a0.png

 ❯ cosmic-screenshot --interactive=false --modal=false --save-dir "/tmp"
/tmp/Screenshot_2024-12-15_09-11-24.png

❯ cosmic-screenshot --interactive=false --modal=true --save-dir "/tmp"
/tmp/Screenshot_2024-12-15_09-11-44.png

❯ cosmic-screenshot --version
cosmic-screenshot 0.1.0

❯ doas dnf --quiet info cosmic-screenshot | grep Version  -m1
Version         : 1.0.0~alpha.4^git20241206.d920352

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