#!/bin/sh

sed -ne 's/.* \([0-9]*\)/[id=\1] focus/p' \
  | (read -r cmd; i3-msg "$cmd")