From ffa3d553f693494c218a0244c946ba83dfbf7cd1 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 1 Oct 2023 20:41:48 -0600 Subject: init --- lib/ssh/tui.ex | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/ssh/tui.ex (limited to 'lib/ssh/tui.ex') 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 -- cgit v1.3