Discrete
approvedby shkarlsson
Filter in Explorer based on file frontmatter metadata
Discrete
A focused Obsidian plugin for filtering files in the file explorer based on their frontmatter metadata. Keep your vault organized by hiding or showing files that match specific metadata criteria.
Features
- File Explorer Filtering: Hide or show files in Obsidian's file explorer based on frontmatter metadata
- Multiple Filter Operators: Support for various comparison operators:
- = (Equals exactly)
- ∈ (Contains text)
- ∃ (Field exists)
- ⊂ (Includes value in list/array)
- > (Greater than)
- < (Less than)
- Flexible Value Types: Handle different types of metadata:
- Text
- Numbers
- Arrays/Lists
- Boolean (Yes/No)
- Customizable Behavior:
- Choose to hide or show matching files
- Combine multiple filters with AND/OR logic
- Real-time filtering as you create and modify rules
- Quick Filtering: Right-click any file to instantly create filters based on its metadata
Planned Features
- More filter operators and comparison types
- Filter presets and saved filter combinations
- Import/export filter configurations
- Enhanced UI for managing complex filter sets
Installation
- Open Obsidian Settings
- Go to Community Plugins and disable Safe Mode
- Click Browse and search for "Discrete"
- Install the plugin
- Enable the plugin in your Community Plugins list
Usage
Creating Filters
- Open Settings → Discrete
- Click "Add New Filter"
- Configure your filter:
- Enter the metadata key (e.g., "tags", "status", "priority")
- Choose the operator (equals, contains, etc.)
- Select the value type
- Enter the value to match against
Filter Behavior
- Hide Matching Files: When enabled, files that match your filters will be hidden. When disabled, only matching files will be shown.
- Combine Filters with AND: When enabled, files must match ALL filters to be affected. When disabled, files matching ANY filter will be affected.
Quick Filtering
Right-click any file in the explorer and select "Filter by metadata" to quickly create a filter based on its metadata.
Understanding Operators
- = (Equals): Exact match of the value
- ∈ (Contains): Checks if the value contains the specified text
- ∃ (Exists): Checks if the field exists in the frontmatter
- ⊂ (Includes): For lists/arrays, checks if the value is in the list
- > (Greater): For numbers, checks if value is greater than specified
- < (Less): For numbers, checks if value is less than specified
Examples
-
Hide Completed Tasks:
- Key: "status"
- Operator: "equals exactly"
- Value Type: "text"
- Value: "completed"
-
Show High Priority Notes:
- Key: "priority"
- Operator: "greater"
- Value Type: "number"
- Value: "3"
-
Filter by Tag:
- Key: "tags"
- Operator: "includes"
- Value Type: "array"
- Value: "project"
Support
If you encounter any issues or have suggestions for improvements, please visit the GitHub repository and create an issue.
Development Note
This plugin was developed with aider. Contributions and feedback are welcome!
Credits
Created by shkarlsson
License
This project is licensed under the MIT License - see the LICENSE file for details.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.