aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh/tui.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssh/tui.ex')
-rw-r--r--lib/ssh/tui.ex25
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