diff --git a/start b/start index ef36dde..96c6612 100755 --- a/start +++ b/start @@ -2,6 +2,14 @@ set -eo pipefail +if [[ ! -t 1 ]]; then + if [[ -z "$TERMINAL" ]]; then + TERMINAL=i3-sensible-terminal + fi + "$TERMINAL" -e "$0" "$@" + exit $? +fi + if [[ -n "$1" ]] && [[ -z "$VMNAME" ]]; then VMNAME="$1" fi @@ -15,7 +23,6 @@ if [[ -z "$DEBUG" ]]; then DEBUG= fi - # Sudo prompt if [[ -n "$SUDO" ]]; then true @@ -115,7 +122,7 @@ read -ra base_arguments -d '' < "$o_base_path" || true read -ra default_arguments -d '' < "$o_default_path" || true read -ra hardware_arguments -d '' < "$o_hardware_path" || true read -ra specific_arguments -d '' < "$o_specific_path" || true -$DEBUG $SUDO nice --adjustment=-20 taskset --cpu-list '1-5,7-11' \ +$DEBUG $SUDO nice --adjustment=-20 taskset --cpu-list '2-5,8-11' \ qemu-system-x86_64 \ -name "$VMNAME,process=VMNAME" \ -drive if=pflash,format=raw,readonly=on,file="$EFI_FIRMWARE" \