Bug 455852 - Spectacle %Nd file format string not working
Summary: Spectacle %Nd file format string not working
Status: RESOLVED NOT A BUG
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 22.04.2
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-23 15:22 UTC by cbarrabes
Modified: 2022-06-23 20:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
not even the pattern preview works (73.83 KB, image/png)
2022-06-23 15:22 UTC, cbarrabes
Details
screenshot filename do not follow the defined pattern (224.41 KB, image/png)
2022-06-23 15:23 UTC, cbarrabes
Details
screenshot filename do not follow the defined pattern v2 (1.98 MB, image/png)
2022-06-23 15:24 UTC, cbarrabes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cbarrabes 2022-06-23 15:22:49 UTC
Created attachment 150098 [details]
not even the pattern preview works

I found that the %Nd substitution when saving a screenshot from Spectacle is not working. 


STEPS TO REPRODUCE
1. Configure the following filename pattern  Screenshot_%Y%M%D_%3d
2. Take screenshot


OBSERVED RESULT
The filename of the saved screenshot adds a sequentially increasing random number. Not even the filename preview works.

EXPECTED RESULT
The string Screenshot_%Y%M%D_%3d should create files like "Screenshot_20220623_001, Screenshot_20220623_002" etc but it does not. See attached screenshot.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Kernel Version: 5.18.5-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
While I am using Wayland, this behavior is present also in an X11 session but in X11you can make it work with %4d instead of %3d. It has also been happening for several releases of the desktop.
Comment 1 cbarrabes 2022-06-23 15:23:25 UTC
Created attachment 150099 [details]
screenshot filename do not follow the defined pattern
Comment 2 cbarrabes 2022-06-23 15:24:22 UTC
Created attachment 150100 [details]
screenshot filename do not follow the defined pattern v2
Comment 3 Yerrey Dev 2022-06-23 20:58:40 UTC
You already have a file with the exact same date, appended with a timestamp which causes the following sequential ordering to think that's the highest number sequential ordering you have, and it uses that to increase it by one. Remove all screenshots in your folder starting with "Screenshot_20220623_" and it should work as intended.