-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.py
34 lines (34 loc) · 872 Bytes
/
tmux.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
x=1
clear='clear'#limpar terminal
tmux="tmux"# abre tmux
tmuxd='tmux detach'#tira o processo da sua sessão
tmuxa='tmux attach'#coloca ele de novo na sua sessão
menud="python3 main.py"
while (x==1):
print('')
print("Tmux ")
print("Menu para usar no terminal *não usar no tmux")
print("para abri o terminal no tmux aperte Ctrl B %")
print("=========================")
print("")
print("1.Abri tmux(tmux)")
print("2.Fechar tmux(tmux detach)")
print("3.Abri processo tmux(tmux attach)")
print('4.Voltar para menu inicial')
print('')
print("=========================")
opcao=(input("Escolha Opção:"))
os.system(clear)
if opcao == '1':
os.system(tmux)
if opcao == '2':
os.system(tmuxd)
if opcao == '3':
os.system(tmuxa)
if opcao == '4':
os.system(menud)
x=2
else:
print(opcao)
os.system(opcao)