diff options
author | Joe <rbo@gmx.us> | 2024-05-07 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-05-07 20:20:20 +0200 |
commit | 53664b1a4b62adcd744685c703c5050baaa02a08 (patch) | |
tree | 32213946dbcd2457f7fea7c0a46fa1f53fc0eef3 | |
parent | text change (diff) | |
download | hardflip-53664b1a4b62adcd744685c703c5050baaa02a08.tar.gz hardflip-53664b1a4b62adcd744685c703c5050baaa02a08.tar.bz2 hardflip-53664b1a4b62adcd744685c703c5050baaa02a08.tar.xz hardflip-53664b1a4b62adcd744685c703c5050baaa02a08.tar.zst hardflip-53664b1a4b62adcd744685c703c5050baaa02a08.zip |
new opts
-rw-r--r-- | src/c_defs.go | 2 | ||||
-rw-r--r-- | src/c_exec.go | 6 | ||||
-rw-r--r-- | src/c_lhosts.go | 2 | ||||
-rw-r--r-- | src/e_keys.go | 16 | ||||
-rw-r--r-- | src/i_info.go | 16 | ||||
-rw-r--r-- | src/i_insert.go | 8 |
6 files changed, 48 insertions, 2 deletions
diff --git a/src/c_defs.go b/src/c_defs.go index d071de9..465db95 100644 --- a/src/c_defs.go +++ b/src/c_defs.go @@ -136,6 +136,8 @@ const ( INS_RDP_FILE INS_RDP_SCREENSIZE INS_RDP_DYNAMIC + INS_RDP_FULLSCR + INS_RDP_MULTIMON INS_RDP_QUALITY INS_RDP_DRIVE INS_RDP_JUMP_HOST diff --git a/src/c_exec.go b/src/c_exec.go index 6829d94..5afca7a 100644 --- a/src/c_exec.go +++ b/src/c_exec.go @@ -146,6 +146,12 @@ func c_format_rdp(host *HostNode, pass string) ([]string, []string) { if host.Dynamic == true { cmd_fmt = append(cmd_fmt, "/dynamic-resolution") } + if host.FullScr == true { + cmd_fmt = append(cmd_fmt, "/f") + } + if host.MultiMon == true { + cmd_fmt = append(cmd_fmt, "/multimon:force") + } if host.Drive != nil { for share, path := range host.Drive { cmd_fmt = append(cmd_fmt, "/drive:" + share + "," + path) diff --git a/src/c_lhosts.go b/src/c_lhosts.go index 301a618..41964bd 100644 --- a/src/c_lhosts.go +++ b/src/c_lhosts.go @@ -92,6 +92,8 @@ type HostNode struct { Width uint16 `yaml:"width,omitempty"` Height uint16 `yaml:"height,omitempty"` Dynamic bool `yaml:"dynamic,omitempty"` + FullScr bool `yaml:"fullscr,omitempty"` + MultiMon bool `yaml:"multimon,omitempty"` Note string `yaml:"note,omitempty"` Drive map[string]string `yaml:"drive,omitempty"` Silent bool `yaml:"silent,omitempty"` diff --git a/src/e_keys.go b/src/e_keys.go index fb07685..1fa307a 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -491,6 +491,22 @@ func e_insert_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { data.insert.Dynamic = true } return true + case INS_RDP_FULLSCR: + ui.insert_sel_ok = false + if data.insert.FullScr == true { + data.insert.FullScr = false + } else { + data.insert.FullScr = true + } + return true + case INS_RDP_MULTIMON: + ui.insert_sel_ok = false + if data.insert.MultiMon == true { + data.insert.MultiMon = false + } else { + data.insert.MultiMon = true + } + return true case INS_RDP_QUALITY: return true case INS_RDP_DRIVE + len(data.insert.Drive): return true case INS_CMD_CMD: ui.buff = data.insert.Host diff --git a/src/i_info.go b/src/i_info.go index 442a828..4802feb 100644 --- a/src/i_info.go +++ b/src/i_info.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_info.go - * Fri Jan 19 18:44:13 2024 + * Tue May 07 10:23:39 2024 * Joe * * interfacing informations about items @@ -282,6 +282,20 @@ func i_info_rdp(ui HardUI, host *HostNode, line int) int { if line += 1; line > ui.dim[H] - 3 { return line } i_draw_text(ui.s, (ui.dim[W] / 3) + 3, line, ui.dim[W] - 2, line, + ui.style[TITLE_STYLE], "Full screen: ") + i_draw_text(ui.s, + (ui.dim[W] / 3) + 16, line, ui.dim[W] - 2, line, + ui.style[DEF_STYLE], strconv.FormatBool(host.FullScr)) + if line += 1; line > ui.dim[H] - 3 { return line } + i_draw_text(ui.s, + (ui.dim[W] / 3) + 3, line, ui.dim[W] - 2, line, + ui.style[TITLE_STYLE], "Multi monitor: ") + i_draw_text(ui.s, + (ui.dim[W] / 3) + 18, line, ui.dim[W] - 2, line, + ui.style[DEF_STYLE], strconv.FormatBool(host.MultiMon)) + if line += 1; line > ui.dim[H] - 3 { return line } + i_draw_text(ui.s, + (ui.dim[W] / 3) + 3, line, ui.dim[W] - 2, line, ui.style[TITLE_STYLE], "Quality: ") i_draw_text(ui.s, (ui.dim[W] / 3) + 12, line, ui.dim[W] - 2, line, diff --git a/src/i_insert.go b/src/i_insert.go index 4e3f5c7..b7c37b4 100644 --- a/src/i_insert.go +++ b/src/i_insert.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_insert.go - * Mon Apr 29 15:36:06 2024 + * Tue May 07 10:23:23 2024 * Joe * * insert a new host @@ -625,6 +625,12 @@ func i_draw_insert_rdp(ui HardUI, line int, win Quad, i_draw_tick_box(ui, win.T + line, win, "Dynamic window", in.Dynamic, INS_RDP_DYNAMIC, ui.insert_sel) if line += 1; win.T + line >= win.B { return line } + i_draw_tick_box(ui, win.T + line, win, "Full screen", in.FullScr, + INS_RDP_FULLSCR, ui.insert_sel) + if line += 1; win.T + line >= win.B { return line } + i_draw_tick_box(ui, win.T + line, win, "Multi monitor", in.MultiMon, + INS_RDP_MULTIMON, ui.insert_sel) + if line += 1; win.T + line >= win.B { return line } i_draw_text_box(ui, win.T + line, win, "Quality", RDP_QUALITY[in.Quality], INS_RDP_QUALITY, false, false) if line += 2; win.T + line >= win.B { return line } |