/ de-omarchy / bin / omarchy-hyprland-window-tiled-fullscreen-toggle
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
17 lines · 566 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# omarchy:summary=Toggle tiled fullscreen for the focused Hyprland window

set -euo pipefail

active=$(hyprctl activewindow -j)
fullscreen_client=$(jq -r '.fullscreenClient // 0' <<<"$active")

if [[ $fullscreen_client == "2" ]]; then
  hyprctl dispatch 'hl.dsp.window.fullscreen_state({ internal = 0, client = 0 })' >/dev/null 2>&1 || \
    hyprctl dispatch fullscreenstate 0 0 >/dev/null
else
  hyprctl dispatch 'hl.dsp.window.fullscreen_state({ internal = 0, client = 2 })' >/dev/null 2>&1 || \
    hyprctl dispatch fullscreenstate 0 2 >/dev/null
fi