Skip to content
Source
Sign inSign up
pingdotgg/t3code

Add terminal copy/paste shortcuts and clipboard bridge #562

ClosedMizaro(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/562/headopened View on GitHub

Showing 6 changed files with 116 additions and 2 deletions (loading 3).

x
0 of 6 viewed, 6 left
24 additions and 1 deletionapps/desktop/src/main.tsModified
View file
@@ -4,7 +4,17 @@
import * as OS from "node:os";
import * as Path from "node:path";
​
-import { app, BrowserWindow, dialog, ipcMain, Menu, nativeImage, protocol, shell } from "electron";
+import {
+ app,
+ BrowserWindow,
+ clipboard,
+ dialog,
+ ipcMain,
+ Menu,
+ nativeImage,
+ protocol,
+ shell,
+} from "electron";
import type { MenuItemConstructorOptions } from "electron";
import * as Effect from "effect/Effect";
import type { DesktopUpdateActionResult, DesktopUpdateState } from "@t3tools/contracts";
@@ -36,6 +46,8 @@
​
const PICK_FOLDER_CHANNEL = "desktop:pick-folder";
const CONFIRM_CHANNEL = "desktop:confirm";
+const WRITE_CLIPBOARD_CHANNEL = "desktop:write-clipboard";
+const READ_CLIPBOARD_CHANNEL = "desktop:read-clipboard";
const CONTEXT_MENU_CHANNEL = "desktop:context-menu";
const OPEN_EXTERNAL_CHANNEL = "desktop:open-external";
const MENU_ACTION_CHANNEL = "desktop:menu-action";