euporie.core.widgets.inputs.ConditionalProcessor
- class euporie.core.widgets.inputs.ConditionalProcessor(processor: Processor, filter: Union[Filter, bool])
Processor that applies another processor, according to a certain condition. Example:
# Create a function that returns whether or not the processor should # currently be applied. def highlight_enabled(): return true_or_false # Wrapped it in a `ConditionalProcessor` for usage in a `BufferControl`. BufferControl(input_processors=[ ConditionalProcessor(HighlightSearchProcessor(), Condition(highlight_enabled))])