Files
dotfiles/home/.local/bin/tabc-smart-detach

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