From fc77dab6d67115d2e3a8f2d8f553617ba29a5b96 Mon Sep 17 00:00:00 2001 From: redxef Date: Mon, 17 Jan 2022 16:21:00 +0100 Subject: [PATCH] Open terminal window on start. --- start | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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" \