#!/bin/bash
#
#kitty --class clipse -e clipse keep
# find existing node
NODE=$(for id in $(bspc query -N -n .window); do
  xprop -id $id WM_CLASS 2>/dev/null | grep -q "nvim_notes" && echo $id && break
done)
if [ -n "$NODE" ]; then
  bspc node "$NODE" -d focused
  bspc node "$NODE" -f
  exit 0
fi
kitty --class nvim_notes --session ~/.config/kitty/session_nvim.conf &
