#!/bin/bash selection=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.name == "__i3_scratch").floating_nodes[].app_id' | wofi -i --dmenu -k /dev/null | cut -d. -f1) swaymsg [app_id="${selection}"] scratchpad show