i3config/scripts/i3-move-to-empty-workspace.sh

9 lines
199 B
Bash
Executable File

#!/bin/bash
workspace=$(($(i3-msg -t get_workspaces | jq ' [ .[] | .num ] | max ') + 1))
i3-msg move container to workspace $workspace
if [[ $1 = "switch" ]]; then
i3-msg workspace $workspace
fi