[ADD] script open terminal: double root, second open selenium
This commit is contained in:
parent
c1997e2a18
commit
741b854229
1 changed files with 8 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
# Open a new gnome-terminal with different path on new tab
|
# Open a new gnome-terminal with different path on new tab
|
||||||
working_path=$(readlink -f .)
|
working_path=$(readlink -f .)
|
||||||
paths=(
|
paths=(
|
||||||
|
"${working_path}/"
|
||||||
"${working_path}/"
|
"${working_path}/"
|
||||||
"${working_path}/addons/ERPLibre_erplibre_addons"
|
"${working_path}/addons/ERPLibre_erplibre_addons"
|
||||||
"${working_path}/addons/TechnoLibre_odoo-code-generator"
|
"${working_path}/addons/TechnoLibre_odoo-code-generator"
|
||||||
|
|
@ -11,6 +12,7 @@ paths=(
|
||||||
)
|
)
|
||||||
|
|
||||||
first_iteration=true
|
first_iteration=true
|
||||||
|
second_iteration=true
|
||||||
if [[ "${OSTYPE}" == "linux-gnu" ]]; then
|
if [[ "${OSTYPE}" == "linux-gnu" ]]; then
|
||||||
cmd_before="cd "
|
cmd_before="cd "
|
||||||
cmd_after_first=";gnome-terminal --tab -- bash -c 'source ./.venv/bin/activate;git status;bash';"
|
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
|
if $first_iteration; then
|
||||||
LONGCMD+="${cmd_before}${t}${cmd_after_first}"
|
LONGCMD+="${cmd_before}${t}${cmd_after_first}"
|
||||||
first_iteration=false
|
first_iteration=false
|
||||||
|
elif $second_iteration; then
|
||||||
|
LONGCMD+="${cmd_before}${t}${cmd_after_first}"
|
||||||
|
second_iteration=false
|
||||||
else
|
else
|
||||||
LONGCMD+="${cmd_before}${t}${cmd_after}"
|
LONGCMD+="${cmd_before}${t}${cmd_after}"
|
||||||
fi
|
fi
|
||||||
|
|
@ -36,6 +41,9 @@ elif [[ "${OSTYPE}" == "darwin"* ]]; then
|
||||||
if $first_iteration; 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'"
|
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
|
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
|
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'"
|
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
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue