diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-10-01 20:41:48 -0600 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-10-01 20:41:48 -0600 |
| commit | ffa3d553f693494c218a0244c946ba83dfbf7cd1 (patch) | |
| tree | 092a824dad118c37960ab67da98cdbc445a35d2b /lib/ssh/tui.ex | |
| download | tronglessh-ffa3d553f693494c218a0244c946ba83dfbf7cd1.tar.gz tronglessh-ffa3d553f693494c218a0244c946ba83dfbf7cd1.zip | |
Diffstat (limited to 'lib/ssh/tui.ex')
| -rw-r--r-- | lib/ssh/tui.ex | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/ssh/tui.ex b/lib/ssh/tui.ex new file mode 100644 index 0000000..4fbbcf5 --- /dev/null +++ b/lib/ssh/tui.ex @@ -0,0 +1,25 @@ +defmodule TrongleSSH.SSH.Tui do + alias TrongleSSH.SSH.Session + + defmodule State do + defstruct connection_manager_pid: nil, + width: nil, + height: nil, + session: %Session{} + end + + use TrongleSSH.SSH.Screen + + def render(width, height, %State{connection_manager_pid: connection_manager_pid} = state) do + send( + connection_manager_pid, + {:send_to_ssh, render_state(width, height, state)} + ) + + state + end + + def input(width, height, action, %State{} = state) do + state + end +end |
