Skip to content

Commit

Permalink
Adapted the multiplexers to the new terminalhelper
Browse files Browse the repository at this point in the history
  • Loading branch information
ceccopierangiolieugenio committed Nov 21, 2023
1 parent ba1f11b commit 9db9e37
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions multiplexers/basic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,23 @@

win1 = ttk.TTkWindow(pos=(90,5), size=(70,15), title="Terminallo n.1", border=True, layout=ttk.TTkVBoxLayout(), flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint)
term1 = ttk.TTkTerminal(parent=win1)
term1.runShell()
th1 = ttk.TTkTerminalHelper(term=term1)
th1.runShell()

win2 = ttk.TTkWindow(pos=(0,0), size=(150,30), title="Terminallo n.2", border=True, layout=ttk.TTkVBoxLayout(), flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint)
term2 = ttk.TTkTerminal(parent=win2)
term2.runShell()
th2 = ttk.TTkTerminalHelper(term=term2)
th2.runShell()

win3 = ttk.TTkWindow(pos=(92,8), size=(70,15), title="Terminallo n.3", border=True, layout=ttk.TTkVBoxLayout(), flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint)
term3 = ttk.TTkTerminal(parent=win3)
term3.runShell()
th3 = ttk.TTkTerminalHelper(term=term3)
th3.runShell()

win4 = ttk.TTkWindow(pos=(94,11), size=(70,15), title="Terminallo n.4", border=True, layout=ttk.TTkVBoxLayout(), flags = ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint)
term4 = ttk.TTkTerminal(parent=win4)
term4.runShell()
th4 = ttk.TTkTerminalHelper(term=term4)
th4.runShell()

top.addWidgets([quitBtn, cb_c, cb_s, cb_z, cb_q, win1, win2, win3, win4])

Expand Down
3 changes: 2 additions & 1 deletion multiplexers/workbench/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def _openTerminal(term=[]):
whiteBg=False,
title=f"Terminallo n.{len(term)+1}",layout=ttk.TTkVBoxLayout())
_win.setViewport(_term := ttk.TTkTerminalView())
_term.runShell()
_th4 = ttk.TTkTerminalHelper(term=_term)
_th4.runShell()
_term.bell.connect(lambda : ttk.TTkLog.debug("BELL!!! 🔔🔔🔔"))
_term.titleChanged.connect(_win.setTitle)
_term.textSelected.connect(clipboard.setText)
Expand Down

0 comments on commit 9db9e37

Please sign in to comment.