All your computers and your phone/iPhone, working as one desk. Screens, apps, files, clipboard, calls, texts, notifications, mouse and keyboard, shared between Mac, Windows, Linux , Android, Web and ios / ipados . Free and open source. No account, no cloud, and no shared network needed.
JavaScript androidapple-ecosystemconnectelectronfile-sharingintel-unison-alternativeiosios-windowskde-connect-alternativekvmlinuxmacbookmacosmouse-sharingphone-link-alternativeproductivityscreen-sharingsidecar-alternativesynergy-alternativewindows
// TwinDesk — Copyright (C) 2026 inukaasith. GPL-3.0, see LICENSE.
'use strict';
const { contextBridge, ipcRenderer, webUtils } = require('electron');
// Dropped files' paths (webUtils), never more than the files of that drop.
const paths = (files) => Array.from(files || []).slice(0, 200).map((f) => { try { return webUtils.getPathForFile(f); } catch { return ''; } }).filter(Boolean);
contextBridge.exposeInMainWorld('fileShelf', {
read: () => ipcRenderer.invoke('file-shelf:read'),
onState: callback => ipcRenderer.on('file-shelf:state', (_event, state) => callback(state)),
reveal: id => ipcRenderer.send('file-shelf:reveal', id),
drag: ids => ipcRenderer.send('file-shelf:drag', ids),
add: files => ipcRenderer.send('file-shelf:add', paths(files)),
paste: () => ipcRenderer.send('file-shelf:paste'),
remove: ids => ipcRenderer.send('file-shelf:remove', ids),
clear: () => ipcRenderer.send('file-shelf:clear'),
menu: id => ipcRenderer.send('file-shelf:menu', id),
view: v => ipcRenderer.send('file-shelf:view', v),
send: (device, ids, files) => ipcRenderer.send('file-shelf:send', { device, ids, paths: paths(files) }),
portal: (device, ids) => ipcRenderer.send('file-shelf:portal', { device, ids }),
close: () => ipcRenderer.send('file-shelf:close'),
platform: process.platform, // the Mac's window has no frame (room for its buttons in the header)
});