dotfiles/scripts/tabc-smart-detach
2023-10-10 17:25:23 -04:00

10 lines
174 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