tkbar 0.2.0

A minimalist, hardened status bar for Wayland.
[package]
    authors = ["tkr-sh"]
    categories = ["gui"]
    default-run = "tkbar"
    description = "A minimalist, hardened status bar for Wayland."
    edition = "2024"
    exclude = [
        ".editorconfig",
        ".github",
        "ci",
        "docs",
        "flake.lock",
        "flake.nix",
        "justfile",
        "resources",
        "scripts",
    ]
    keywords = ["gui", "layer-shell", "security", "status-bar", "wayland"]
    license = "GPL-3.0-or-later"
    name = "tkbar"
    readme = "README.md"
    repository = "https://github.com/tkr-sh/tkbar"
    version = "0.2.0"

[lints]
    workspace = true

[dependencies]
    gtk4 = { version = "0.11", features = ["v4_12"] }
    gtk4-layer-shell = "0.8"

    # CLI
    clap = { version = "4", optional = true, features = ["derive"] }

    # Config
    directories = { version = "6", optional = true }
    serde = { version = "1", features = ["derive"], optional = true }
    toml = { version = "1", optional = true }

    # --- Components --- #
    async-channel = { version = "2.5.0", optional = true }

    # - Wifi
    neli-wifi = { version = "0.6", optional = true }

    # - Volume
    pipewire = { version = "0.10", optional = true }

    # - Workspace backends
    hyprland = { version = "0.4.0-beta.3", optional = true, default-features = false, features = [
        "data",
        "dispatch",
        "listener",
    ] }
    niri-ipc = { version = "26.4.0", optional = true }
    swayipc = { version = "4", optional = true }


[features]
    default = ["all_components", "black", "cli", "config", "niri"]

    #
    cli = ["dep:clap"]
    config = ["dep:directories", "dep:serde", "dep:toml"]

    # Components
    all_components = ["battery", "brightness", "clock", "volume", "wifi"]
    battery = ["dep:async-channel"]
    brightness = ["dep:async-channel"]
    clock = []
    volume = ["dep:async-channel", "dep:pipewire"]
    wifi = ["dep:async-channel", "dep:neli-wifi"]
    # --- Workspace backends
    hyprland = ["dep:async-channel", "dep:hyprland"]
    niri = ["dep:async-channel", "dep:niri-ipc"]
    sway = ["dep:async-channel", "dep:swayipc"]

    # Colors
    black = []
    blue = []
    cyan = []
    green = []
    orange = []
    pink = []
    purple = []
    red = []
    white = []
    yellow = []

    # Only used to generate the default configuration
    doc = ["config"]

[profile.release]
    codegen-units = 1
    lto = true
    panic = "abort"
    strip = true

[[bin]]
    name = "doc"
    path = "./docs/main.rs"
    required-features = ["doc"]

[workspace]
    members = ["ci"]

    [workspace.lints.rust]
        unreachable_pub = "warn"
        unsafe_code = "deny"

    # <https://rust-lang.github.io/rust-clippy/master>
    [workspace.lints.clippy]
        # Based
        allow_attributes_without_reason = "warn"
        clear_with_drain = "warn"
        clone_on_ref_ptr = "warn"
        cloned_instead_of_copied = "warn"
        collection_is_never_read = "warn"
        create_dir = "warn"
        elidable_lifetime_names = "warn"
        empty_drop = "warn"
        empty_enum_variants_with_brackets = "warn"
        empty_structs_with_brackets = "warn"
        explicit_into_iter_loop = "warn"
        filetype_is_file = "warn"
        filter_map_next = "warn"
        flat_map_option = "warn"
        ignored_unit_patterns = "warn"
        impl_trait_in_params = "warn"
        index_refutable_slice = "warn"
        inefficient_to_string = "warn"
        iter_filter_is_ok = "warn"
        iter_filter_is_some = "warn"
        iter_on_empty_collections = "warn"
        iter_with_drain = "warn"
        manual_assert = "warn"
        match_same_arms = "warn"
        match_wildcard_for_single_variants = "warn"
        mismatching_type_param_order = "warn"
        mixed_read_write_in_expression = "warn"
        mut_mut = "warn"
        needless_collect = "warn"
        needless_continue = "warn"
        needless_raw_string_hashes = "warn"
        non_std_lazy_statics = "warn"
        nonstandard_macro_braces = "warn"
        option_as_ref_cloned = "warn"
        or_fun_call = "warn"
        pub_without_shorthand = "deny"
        redundant_closure_for_method_calls = "warn"
        same_name_method = "warn"
        self_named_module_files = "deny"
        semicolon_if_nothing_returned = "warn"
        significant_drop_in_scrutinee = "warn"
        single_char_pattern = "warn"
        str_split_at_newline = "warn"
        trait_duplication_in_bounds = "warn"
        undocumented_unsafe_blocks = "warn"
        unnested_or_patterns = "warn"
        unreadable_literal = "warn"
        unused_async = "warn"
        unused_peekable = "warn"
        unused_result_ok = "warn"
        unused_rounding = "warn"
        unused_self = "warn"
        verbose_bit_mask = "warn"
        verbose_file_reads = "warn"

        # Mid
        branches_sharing_code = "warn"
        cfg_not_test = "warn"
        cognitive_complexity = "warn"
        comparison_chain = "warn"
        doc_link_with_quotes = "warn"
        empty_enums = "warn"
        equatable_if_let = "warn"
        if_not_else = "warn"
        indexing_slicing = "warn"
        iter_on_single_items = "warn"
        large_digit_groups = "warn"
        manual_midpoint = "warn"
        negative_feature_names = "warn"
        option_option = "warn"
        path_buf_push_overwrite = "warn"
        redundant_type_annotations = "warn"
        rest_pat_in_fully_bound_structs = "warn"
        string_lit_chars_any = "warn"
        type_repetition_in_bounds = "warn"
        uninlined_format_args = "warn"

        # Controversial
        as_conversions = "deny"
        assigning_clones = "warn"
        bool_to_int_with_if = "warn"
        decimal_literal_representation = "warn"       # with clippy.toml `literal-representation-threshold`
        default_trait_access = "warn"
        derive_partial_eq_without_eq = "warn"
        doc_link_code = "warn"
        fallible_impl_from = "warn"
        format_push_string = "warn"
        implicit_clone = "warn"
        items_after_statements = "warn"
        literal_string_with_formatting_args = "warn"
        manual_string_new = "warn"
        map_unwrap_or = "warn"
        map_with_unused_argument_over_ranges = "warn"
        missing_const_for_fn = "warn"
        needless_for_each = "warn"
        needless_pass_by_ref_mut = "warn"
        needless_pass_by_value = "warn"               # Not true everytime tho
        non_zero_suggestions = "warn"
        ref_option_ref = "warn"
        string_lit_as_bytes = "warn"
        too_long_first_doc_paragraph = "warn"
        trivial_regex = "warn"
        unchecked_time_subtraction = "warn"
        unnecessary_join = "warn"
        unwrap_used = "warn"                          # With clippy.toml `allow-unwrap-in-test`

        # Removing
        enum_variant_names = "allow"
        too_many_arguments = "allow"
        type_complexity = "allow"
        upper_case_acronyms = "allow"