fn is_scratchpad_visible<H: Handle, C: Config, SERVER: DisplayServer<H>>(
    manager: &Manager<H, C, SERVER>,
    scratchpad_name: &ScratchPadName,
) -> bool {
    let Some(current_tag) = manager.state.focus_manager.tag(0) else {
        return false;
    };

    let Some(scratchpad) = manager.state.active_scratchpads.get(scratchpad_name) else {
        return false;
    };

    // Filter out all the non existing windows (invalid pid) and map to window
    // Check if any of them is in the current tag
    scratchpad
        .iter()
        .filter_map(|pid| manager.state.windows.iter().find(|w| w.pid == Some(*pid)))
        .any(|window| window.has_tag(&current_tag))
}
Check if the scratchpad is visible on the current tag.
Returns `false` immediately if the scratchpad name isn't defined in the config
leftwm-core/src/handlers/command_handler/scratchpad_handler.rs