aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbspswallow12
1 files changed, 12 insertions, 0 deletions
diff --git a/bspswallow b/bspswallow
new file mode 100755
index 0000000..dea343f
--- /dev/null
+++ b/bspswallow
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+NODE_CURRENT=$(bspc query -N -n focused)
+$@ &
+PID_COMMAND=$!
+WATCH=$(bspc subscribe -c 1 node_add)
+NODE_NEW=${WATCH%% *}
+bspc node -s $NODE_CURRENT
+bspc node $NODE_CURRENT --flag hidden=on
+wait $PID_COMMAND
+bspc node $NODE_CURRENT --flag hidden=off
+bspc node $NODE_CURRENT --focus