/ de-omarchy / bin / omarchy-hyprland-window-close-all
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
13 lines · 350 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

# omarchy:summary=Close all open windows

hyprctl clients -j | \
  jq -r ".[].address" | \
  while read -r addr; do
    hyprctl dispatch "hl.dsp.window.close({ window = \"address:$addr\" })" >/dev/null
  done

# Move to first workspace
hyprctl dispatch 'hl.dsp.focus({ workspace = "1" })' >/dev/null 2>&1 || hyprctl dispatch workspace 1