#!/usr/bin/env bash

winid="0x$(printf "%x\n" $1)"
tag=$(herbstclient attr clients.$winid.tag)
herbstclient chain \
             , silent substitute M tags.by-name.$tag.my_monitor focus_monitor M \
             , use $tag \
             , jumpto $winid \
             , raise $winid