dotfiles/scripts/tabc-smart-detach
2023-10-04 20:19:25 -04:00

9 lines
173 B
Bash
Executable File

#!/bin/bash
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