function float_hack { scratch_tag=$((1 << $1)) riverctl spawn "$4" sleep 0.2 riverctl resize horizontal -$2 riverctl resize vertical -$3 riverctl snap down riverctl set-view-tags ${scratch_tag} # Set spawn tagmask to ensure new windows don't have the scratchpad tag unless # explicitly set. all_but_scratch_tag=$(( ((1 << 32) - 1) ^ $scratch_tag )) riverctl spawn-tagmask ${all_but_scratch_tag} }