feat: add clipboard text writing functionality and update config
This commit is contained in:
2
cinny
2
cinny
Submodule cinny updated: f5ba778e46...42cc081d49
@@ -11,7 +11,7 @@
|
|||||||
"allowCustomHomeservers": true,
|
"allowCustomHomeservers": true,
|
||||||
|
|
||||||
"calling": {
|
"calling": {
|
||||||
"livekitServiceUrl": ""
|
"livekitServiceUrl": "https://b.ruv.wtf/matrix-rtc/livekit/jwt"
|
||||||
},
|
},
|
||||||
|
|
||||||
"featuredCommunities": {
|
"featuredCommunities": {
|
||||||
|
|||||||
@@ -567,6 +567,16 @@ ipcMain.handle('read-clipboard-image', async () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Write text to clipboard
|
||||||
|
ipcMain.handle('write-clipboard-text', async (event, text) => {
|
||||||
|
try {
|
||||||
|
clipboard.writeText(text);
|
||||||
|
return { success: true };
|
||||||
|
} catch (error) {
|
||||||
|
return { success: false, error: error.message };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Get YouTube stream using yt-dlp
|
// Get YouTube stream using yt-dlp
|
||||||
ipcMain.handle('get-youtube-stream', async (event, url) => {
|
ipcMain.handle('get-youtube-stream', async (event, url) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ const commandMap = {
|
|||||||
'window_is_maximized': 'window:is-maximized',
|
'window_is_maximized': 'window:is-maximized',
|
||||||
'window_start_drag': 'window:start-drag',
|
'window_start_drag': 'window:start-drag',
|
||||||
'read_clipboard_image': 'read-clipboard-image',
|
'read_clipboard_image': 'read-clipboard-image',
|
||||||
|
'write_clipboard_text': 'write-clipboard-text',
|
||||||
'open_external_url': 'open-external-url',
|
'open_external_url': 'open-external-url',
|
||||||
'get_youtube_stream': 'get-youtube-stream',
|
'get_youtube_stream': 'get-youtube-stream',
|
||||||
'start_background_sync': 'start-background-sync',
|
'start_background_sync': 'start-background-sync',
|
||||||
@@ -97,7 +98,8 @@ contextBridge.exposeInMainWorld('electron', {
|
|||||||
|
|
||||||
// Clipboard
|
// Clipboard
|
||||||
clipboard: {
|
clipboard: {
|
||||||
readImage: () => ipcRenderer.invoke('read-clipboard-image')
|
readImage: () => ipcRenderer.invoke('read-clipboard-image'),
|
||||||
|
writeText: (text) => ipcRenderer.invoke('write-clipboard-text', text)
|
||||||
},
|
},
|
||||||
|
|
||||||
// External URLs
|
// External URLs
|
||||||
|
|||||||
Reference in New Issue
Block a user