#!/bin/sh active_area=$(swaymsg -t get_tree | jq --raw-output \ '.. | (.nodes? + .floating_nodes? // empty)[] | select (.focused) | .rect | "\(.width)x\(.height)+\(.x)+\(.y)"') exec wl-kbptr --restrict "$active_area" $@