Files
nixos/scripts/hypr-scripts/toggle_focus_floating.sh
2026-10-06 22:34:05 +02:00

15 lines
374 B
Bash
Executable File

#!/usr/bin/env bash
# toggles focus between floating and tiled windows.
# get floating state of active window
floating=$(hyprctl activewindow -j | jq ".floating")
if [ "$floating" = "true" ]; then
# focus tiled
hyprctl dispatch "hl.dsp.window.cycle_next({ tiled = true })"
else
# focus floating
hyprctl dispatch "hl.dsp.window.cycle_next({ floating = true })"
fi