Skip to content

osal.screen #

screen

#
screen -ls

There is a screen on:
    3230.test	(Detached)

#screen -r test

fn init_screen_object #

fn init_screen_object(item_ map[string]string) Screen

fn new #

fn new(args ScreensNewArgs) !ScreensFactory

return screen instance

fn (Screen) is_running #

fn (mut t Screen) is_running() !bool

checks whether screen server is running

fn (Screen) status #

fn (self Screen) status() !ScreenStatus

Method to check the status of a screen process

fn (Screen) attach #

fn (mut self Screen) attach() !

fn (mut self Screen) scan() ! { mut f:=self.factory or {panic("bug, no factory attached to screen.")} f.scan(false)! }

fn (Screen) cmd_send #

fn (mut self Screen) cmd_send(cmd string) !

fn (Screen) str #

fn (mut self Screen) str() string

enum ScreenStatus #

enum ScreenStatus {
	unknown
	active
	inactive
}

struct ScreenAddArgs #

struct ScreenAddArgs {
pub mut:
	name   string @[requred]
	cmd    string
	reset  bool
	start  bool = true
	attach bool
}

struct ScreensFactory #

@[heap]
struct ScreensFactory {
pub mut:
	screens []Screen
}

fn (ScreensFactory) scan #

fn (mut self ScreensFactory) scan() !

loads screen screen, populate the object

fn (ScreensFactory) add #

fn (mut self ScreensFactory) add(args_ ScreenAddArgs) !Screen

print list of screen screens

fn (ScreensFactory) exists #

fn (mut self ScreensFactory) exists(name string) bool

print list of screen screens

fn (ScreensFactory) get #

fn (mut self ScreensFactory) get(name string) !Screen

fn (ScreensFactory) start #

fn (mut self ScreensFactory) start(name string) !

fn (ScreensFactory) kill #

fn (mut self ScreensFactory) kill(name string) !

fn (ScreensFactory) reset #

fn (mut self ScreensFactory) reset() !

print list of screen screens

fn (ScreensFactory) str #

fn (mut self ScreensFactory) str() string

struct ScreensNewArgs #

@[params]
struct ScreensNewArgs {
pub:
	reset bool
}