x11, not Wayland
I often edit a variety of plain text files such as .css, .mkd, .sh, and .txt as well as .odt and .ods files.
All my files have
- safe characters limited to
- no spaces in them
- and have appropriate extensions.
Geany 1.32 comes with a customizable plugin to automatically save a timestamped backup to a destination of the user's choice. For example, a timestamped backup of ~/.bashrc looks like this:
As far as I know, other plain text editors such as featherpad, kate, leafpad and mousepad don't have such a feature. Even LibreOffice saves just one backup (if enabled in Tools > Options > LibreOffice > Load/Save).
It's possible to use rsync to backup files to timestamped folders but I want to capture backups of rather frequent edits in a destination of my choice.
I would like to have a script that allows me to perform a conventional save and immediately thereafter to generate a timestamped backup of a limited class of files I edit in my various text editors or in LibreOffice. I'd bind this script to a keyboard shortcut while leaving the conventional shortcuts still available.