Some software that i use like Krita and blender make backup files. Krita’s backup file have the ~ (tilde) chararcter so they get a special file icon which makes them distinguishable from normal files. But blender saves the backup by suffixing the number 1 after the file extension for example a “project.blend” will have a corresponding “project.blend1” file as a backup file. These two file stay side by side and often it leads to mistakes like opening and working on the backup file. When you realise you have been working on the backup file and not the original one it will be too late.
So is there a way in dolphin to hide files of specific extensions in addition to the dot files. I know there is a trick like “.hidden” but as far as I know it works in the current directory and is not system wide.
I read the bug report and the merge request. I am not a dev so Asking this to confirm. Does it only hide the files with trash mimetype or does it allow users to specify via regex or any other method to define what file type should be hidden?
Then sadly it is not the request I have made here. I would request for a user configurable thing. For example in my use case mentioned above, i want to hide files with “.blend1” extension I do not think blender adds any mimetype for this. I also saw in one comment of the bug report stating that some user would want to hide the pycache folder or say some user might want to hide the files ending with something.bak. So it would be good to get a user configurable system. may be a way to put regex or simlpe a list.
Yeah, perhaps that feature can be added in the future.
However there may be a way for Blender and other apps to support this themselves. The code says that now files with the mime type of application/x-trash get auto-hidden. If .blend1 files already have that mime type (you can check with file --mime-type [path to the file in question]), then it will work out of the box. If not, it might be worth a request for the Blender people that they give it this mime type.
I checked the mimetype and it is “application/x-blender”.
I do not have any problem with requesting this with blender people, I will try. I feel that they will not consider this file as a different mimetype, as far as I know these are versions and not backups and there can be multiple file like - blend1, blend2 and blend3 etc. But I may be wrong.
However there may be other such files which are not backup files by strictest sense and these would be good if hidden for some users’ workflow. Blender is just one example, what if there are some more files like these for other software?
In a sense this is sort of about the relationship between apps and the platforms they run on; who owes what to whom?
On macOS, Apple would roll this out and apps shipping on macOS would go out of their way to support it. Apps that don’t would field complaints from their users.
In KDE land, we’re a minority of a minority, so we don’t generally expect 3rd-party apps to care about us. We can consider our responsibility to react to them, or even to offer users tools to make this work themselves–which is what you and the original bug report are requesting.
I’m not against doing so. But sometimes I think back to my time in the Apple world a bit wistfully, and wish we could get apps to care about us a bit more!
The question was not only about blender file nor it was about the technique blender uses for versioning or anything else. The question was about dolphin and whether it is possible to hide certain specific file extension. The file extension can be blend files or anything the user wants to hide from view. So please do not take the debate on a different tangent and push it on other projects. This is a KDE forum and we are not here to discuss the choices of blender or any other non KDE software. Ignore the blender name and answer if this is possible or how to achieve it.
This sounds more like “patches welcome” phrase said to a non coding person, despite the “kde developer” title besides my user name I am not a programmer neither do I intend to be one. If non programmers are not allowed to suggest or ask questions without knowing to code their own version control then KDE should specify this point with a pinned post on the front page of this forum.
OTOH, the TUI file manager I use, Broot, hides .gitignore files by default. In addition, the shell programs ripgrep and fd also supports .ignore files, which has the same format as .gitignore, but doesn’t affect git.
Perhaps Dolphin could (have an option to) hide .gitignore and .ignore files too. Compared to a Dolphin-specific setting, this is supported by more tools, and is more powerful (globs, directory-specific settings).
This is one solution for the blend1 files but do I need to make this for all the files I may need to be hidden in future. it will be cumbersome hence I think a setting or feature in dolphin would be good.
@chartmann solution didn’t work for me, but I modified it a bit, followed the Arch Wiki and found a solution that worked for me (although I am not certain if this is correct, so be careful if you try to replicate)
I created ~/.local/share/mime/packages/x-blender-backup.xml with the following text:
Then I ran update-mime-database ~/.local/share/mime
refreshed Dolphin. The Result is that .blend1 .blend2 can be hidden, but .blend (without numbers) will not be. I assumed .blend without numbers shouldn’t be hidden because this is maybe the original and not a backup?
Since I am not a Blender user I cannot say if everything still works as expected. For example can you still open this in Blender?
Certainly interesting, gonna play with this a little bit more.