dotfiles/scripts/tabc-smart-detach
2023-10-10 17:24:29 -04:00

9 lines
171 B
Bash
Executable File

#!/bin/sh
id=$(bspc query -N -n);
if [ "$(tabc printclass $id)" == "tabbed" ]; then
bspc node -p $1;
tabc detach $id;
else \
tabc attach $id $(bspc query -N -n $1);
fi