Skip to content

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.

2.8 KB
Raw Blame
/* TwinDesk — Copyright (C) 2026 inukaasith. GPL-3.0, see LICENSE. */
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}
#video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: none; /* the Mac's cursor is in the video */
}
body.input-off #video { cursor: default; } /* the Mac ignores input: show where our pointer is */
/* Frame generation: the canvas draws the picture in the video's box; the video stays in
   the layout (input maps over it) but is not seen. */
#framegen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
#framegen.hidden { display: none; }
body.framegen #video { opacity: 0; }
#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9fa8;
  font: 16px/1.4 system-ui, "Ubuntu", "Cantarell", sans-serif;
  pointer-events: none;
  user-select: none;
}
#overlay.hidden { display: none; }
#stats {
  position: fixed;
  top: 8px;
  left: 8px;
  margin: 0;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #d8f0d8;
  font: 12px/1.4 Consolas, monospace;
  pointer-events: none;
  user-select: none;
}
#stats.hidden { display: none; }
#drop-status {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  max-width: 80%;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(20, 20, 22, 0.85);
  color: #e8e8ea;
  font: 13px system-ui, "Ubuntu", "Cantarell", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
#drop-status.ok { color: #6ee787; }
#drop-status.bad { color: #ff8a80; }
#drop-status.hidden { display: none; }
body.dragging #video { outline: 3px solid #0a84ff; outline-offset: -3px; }
/* Toolbar: top centre, in when the pointer reaches the top edge (monitor-bar.js). */
#bar {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translate(-50%, -64px);
  transition: transform 0.18s ease;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border-radius: 8px;
  background: rgba(32, 32, 32, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font: 12px/1 system-ui, "Ubuntu", "Cantarell", sans-serif;
  color: #f3f3f3;
  cursor: default;
  user-select: none;
  z-index: 2;
}
#bar.show { transform: translate(-50%, 0); }
#bar button { all: unset; padding: 6px 10px; border-radius: 4px; white-space: nowrap; }
#bar button:hover { background: rgba(255, 255, 255, 0.1); }
#bar button.on { background: #0067c0; }
#bar button[disabled] { opacity: 0.4; }
#bar .sep { width: 1px; height: 16px; background: rgba(255, 255, 255, 0.18); margin: 0 2px; }
#bar [hidden] { display: none; } /* all: unset would show them */