This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Store set of files name in .desktop file of an directory

0

Votes
0
0
Tags: None
(comma "," separated)
Lachu
Registered Member
Posts
864
Karma
1
OS
Long long ago I brought an idea to write sorting mechanism for dolphin in JavaScript.

That idea was rejected, so new is clarify - allow to store filter string in .desktop file. There could exist many filter group in .directory file, each containing many filter string and name of group. Filter are similar to string user may enter into Dolphin's filter field/

Example filters are:
1. Build junks: *.o, *.so*
2. Images: *.jpg, *.bmp, *.png
3. C Headers: *.h
4. Scripts: *.sh, *.py, *.php, *.perl

Dolphin will allow to toggle enabled state of filters groups in panel. Filters groups will be stored globally and locally (in directory).

Also - Dolphin could group files by filters group (special view mode), so filters doesn't filter files, setting visibility of output. In this mode, dolphin will show each file in group read from .directory and global filter store.


Lachu, proud to be a member of KDE forums since 2008-Nov.
User avatar
arkascha
Registered Member
Posts
192
Karma
0
OS
Why should this be a folder specific setting?
I mean things like "C headers" are a global thing, not?
Lachu
Registered Member
Posts
864
Karma
1
OS
arkascha wrote:Why should this be a folder specific setting?
I mean things like "C headers" are a global thing, not?


That's true. One of use cases for local group is to created like subdirectory with localized name. Group in desktop file could have description (localized; many languages) and name (localized; many languages). Other could be using more generic pattern (in future perhaps) like grouping all files with name prefixed by some string and ending by other. This prefix and group for it will be generated automatically: when dolphin found file ending with .c, it will get the full name, remove .c from end and put result.c, result.o, result.h as separate group.


Lachu, proud to be a member of KDE forums since 2008-Nov.
User avatar
arkascha
Registered Member
Posts
192
Karma
0
OS
Lachu wrote:
arkascha wrote:Why should this be a folder specific setting?
I mean things like "C headers" are a global thing, not?


That's true. One of use cases for local group is to created like subdirectory with localized name. Group in desktop file could have description (localized; many languages) and name (localized; many languages). Other could be using more generic pattern (in future perhaps) like grouping all files with name prefixed by some string and ending by other. This prefix and group for it will be generated automatically: when dolphin found file ending with .c, it will get the full name, remove .c from end and put result.c, result.o, result.h as separate group.


I don't get it. Why would anyone want to "localize" a header file name? That makes zero sense.
desktop files can already hold multiple languages so there also is no need.
Could it be that you are overthinking things?
Lachu
Registered Member
Posts
864
Karma
1
OS
arkascha wrote:
Lachu wrote:
arkascha wrote:Why should this be a folder specific setting?
I mean things like "C headers" are a global thing, not?


That's true. One of use cases for local group is to created like subdirectory with localized name. Group in desktop file could have description (localized; many languages) and name (localized; many languages). Other could be using more generic pattern (in future perhaps) like grouping all files with name prefixed by some string and ending by other. This prefix and group for it will be generated automatically: when dolphin found file ending with .c, it will get the full name, remove .c from end and put result.c, result.o, result.h as separate group.


I don't get it. Why would anyone want to "localize" a header file name? That makes zero sense.
desktop files can already hold multiple languages so there also is no need.
Could it be that you are overthinking things?

I think about creating group of files and localize name/description of that group. Group will be like an directory, but with localized name/description and with dynamically content (regular expressions and possibly other rules).


Lachu, proud to be a member of KDE forums since 2008-Nov.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]