Skip to content

Commit 8593138

Browse files
authored
feat: Adds a multi monitor toggle (#230)
* Adds a multi monitor toggle * Make multimonitor a drop down to switch between span/multimon for compatibility * hyphenate multi-monitor
1 parent 8b71904 commit 8593138

3 files changed

Lines changed: 38 additions & 1 deletion

File tree

src/renderer/lib/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type WinboatConfigObj = {
1111
passedThroughDevices: PTSerializableDeviceInfo[];
1212
customApps: WinApp[]
1313
experimentalFeatures: boolean
14+
multiMonitor: number
1415
};
1516

1617
const defaultConfig: WinboatConfigObj = {
@@ -19,7 +20,8 @@ const defaultConfig: WinboatConfigObj = {
1920
rdpMonitoringEnabled: false,
2021
passedThroughDevices: [],
2122
customApps: [],
22-
experimentalFeatures: false
23+
experimentalFeatures: false,
24+
multiMonitor: 0,
2325
};
2426

2527
export class WinboatConfig {

src/renderer/lib/winboat.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,11 +609,13 @@ export class Winboat {
609609
/v:127.0.0.1\
610610
/port:${rdpPort}\
611611
/cert:ignore\
612+
${this.#wbConfig?.config.multiMonitor == 2 ? '+span' : ''}\
612613
+clipboard\
613614
-wallpaper\
614615
/sound:sys:pulse\
615616
/microphone:sys:pulse\
616617
/floatbar\
618+
${this.#wbConfig?.config.multiMonitor == 1 ? '/multimon' : ''}\
617619
${this.#wbConfig?.config.smartcardEnabled ? '/smartcard' : ''}\
618620
/compression\
619621
/scale:${this.#wbConfig?.config.scale ?? 100}\

src/renderer/views/Config.vue

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,39 @@
290290
</div>
291291
</x-card>
292292

293+
<!-- Multi Monitor -->
294+
<x-card
295+
class="flex flex-row justify-between items-center p-2 py-3 my-0 w-full backdrop-blur-xl backdrop-brightness-150 bg-neutral-800/20">
296+
<div>
297+
<div class="flex flex-row gap-2 items-center mb-2">
298+
<Icon class="inline-flex text-violet-400 size-8" icon="uil:monitor"></Icon>
299+
<h1 class="my-0 text-lg font-semibold">
300+
Multi-Monitor Support
301+
</h1>
302+
</div>
303+
<p class="text-neutral-400 text-[0.9rem] !pt-0 !mt-0">
304+
Controls how multiple monitors are handled. MultiMon creates separate displays for each monitor, while Span stretches the display across all monitors. Note: Span or MultiMon may work better depending on your setup.
305+
</p>
306+
</div>
307+
<div class="flex flex-row gap-2 justify-center items-center">
308+
<x-select class="w-20" @change="(e: any) => wbConfig.config.multiMonitor = Number(e.detail.newValue)">
309+
<x-menu>
310+
<x-menuitem value="0" :toggled="wbConfig.config.multiMonitor === 0">
311+
<x-label>None</x-label>
312+
</x-menuitem>
313+
314+
<x-menuitem value="1" :toggled="wbConfig.config.multiMonitor === 1">
315+
<x-label>MultiMon</x-label>
316+
</x-menuitem>
317+
318+
<x-menuitem value="2" :toggled="wbConfig.config.multiMonitor === 2">
319+
<x-label>Span</x-label>
320+
</x-menuitem>
321+
</x-menu>
322+
</x-select>
323+
</div>
324+
</x-card>
325+
293326
<!-- Smartcard Passthrough -->
294327
<x-card
295328
class="flex flex-row justify-between items-center p-2 py-3 my-0 w-full backdrop-blur-xl backdrop-brightness-150 bg-neutral-800/20">

0 commit comments

Comments
 (0)