Hoboneer / sxhkd-parser

Parser library for sxhkd configs
GNU General Public License v3.0
7 stars 0 forks source link

`hkfind`: allow filtering on section metadata #15

Open Hoboneer opened 2 years ago

Hoboneer commented 2 years ago

Maybe the -in/-child-of and -under/-descendant-of predicates could be overloaded to allow either a section path or a metadata filter expression (same as that in -has).

OR, new predicates could be defined: say, -parent-has and -ancestor-has. However, the filtering is based on the keybind not the section. Using two -in or -under predicates with -parent-has or -ancestor-has respectively wouldn't allow the metadata predicates to distinguish between the two -in or the two -under predicates.

As for implementation, maybe there could be a dictionary mapping section paths to the metadata of the section which the path represents.

Depends on: #11 Related: #14 #16