#!/bin/bash # Alt+Tab: jump to the previously focused window (press again to jump back). RAISE_DRY=1 only prints. target=$(hyprctl clients -j | jq -r ' [.[] | select(.workspace.name | startswith("special") | not) | select(.focusHistoryID > 0)] | sort_by(.focusHistoryID) | .[0].address // empty') [ -z "$target" ] && exit 0 [ -n "$RAISE_DRY" ] && { echo "focus: $target"; exit 0; } hyprctl dispatch "hl.dsp.focus({ window = \"address:$target\" })" >/dev/null