#!/bin/bash

# Check if xdotool is installed
if ! command -v xdotool &> /dev/null; then
    echo "xdotool is not installed."
    exit 1
fi

# Get list of window IDs and close them
xdotool search --onlyvisible "." | while read -r window; do
    xdotool windowclose "$window"
done

