euporie.core.widgets.layout.Condition

class euporie.core.widgets.layout.Condition(func: Callable[[], bool])

Turn any callable into a Filter. The callable is supposed to not take any arguments.

This can be used as a decorator:

@Condition
def feature_is_active():  # `feature_is_active` becomes a Filter.
    return True
Parameters:

func – Callable which takes no inputs and returns a boolean.