[ADD] script open terminal: double root, second open selenium

This commit is contained in:
Mathieu Benoit 2024-04-18 01:50:38 -04:00
parent c1997e2a18
commit 741b854229

View file

@ -2,6 +2,7 @@
# Open a new gnome-terminal with different path on new tab
working_path=$(readlink -f .)
paths=(
"${working_path}/"
"${working_path}/"
"${working_path}/addons/ERPLibre_erplibre_addons"
"${working_path}/addons/TechnoLibre_odoo-code-generator"
@ -11,6 +12,7 @@ paths=(
)
first_iteration=true
second_iteration=true
if [[ "${OSTYPE}" == "linux-gnu" ]]; then
cmd_before="cd "
cmd_after_first=";gnome-terminal --tab -- bash -c 'source ./.venv/bin/activate;git status;bash';"
@ -20,6 +22,9 @@ if [[ "${OSTYPE}" == "linux-gnu" ]]; then
if $first_iteration; then
LONGCMD+="${cmd_before}${t}${cmd_after_first}"
first_iteration=false
elif $second_iteration; then
LONGCMD+="${cmd_before}${t}${cmd_after_first}"
second_iteration=false
else
LONGCMD+="${cmd_before}${t}${cmd_after}"
fi
@ -36,6 +41,9 @@ elif [[ "${OSTYPE}" == "darwin"* ]]; then
if $first_iteration; then
osascript_command+=" -e 'tell application \"System Events\" to keystroke \"t\" using {command down}' -e 'delay 0.1' -e 'do script \"cd ${t}; source ./.venv/bin/activate; git status\" in front window'"
first_iteration=false
elif $second_iteration; then
osascript_command+=" -e 'tell application \"System Events\" to keystroke \"t\" using {command down}' -e 'delay 0.1' -e 'do script \"cd ${t}; source ./.venv/bin/activate; git status\" in front window'"
second_iteration=false
else
osascript_command+=" -e 'tell application \"System Events\" to keystroke \"t\" using {command down}' -e 'delay 0.1' -e 'do script \"cd ${t}; git status\" in front window'"
fi