MCPcopy Create free account
hub / github.com/Slackadays/Clipboard / syncWithRemoteClipboard

Function syncWithRemoteClipboard

src/cb/src/externalclipboards.cpp:221–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221void syncWithRemoteClipboard(bool force) {
222 using enum ClipboardContentType;
223 if ((!isAClearingAction() && clipboard_name == constants.default_clipboard_name && clipboard_entry == constants.default_clipboard_entry && action != Action::Status)
224 || force) { // exclude Status because it does this manually
225 ClipboardContent content;
226 if (envVarIsTrue("CLIPBOARD_NOREMOTE")) return;
227 content = getRemoteClipboard();
228 if (content.type() == Text) {
229 convertFromGUIClipboard(content.text());
230 copying.mime = !content.mime().empty() ? content.mime() : inferMIMEType(content.text()).value_or("text/plain");
231 }
232 }
233}
234
235void syncWithGUIClipboard(bool force) {
236 using enum ClipboardContentType;

Callers 1

mainFunction · 0.85

Calls 6

isAClearingActionFunction · 0.85
envVarIsTrueFunction · 0.85
getRemoteClipboardFunction · 0.85
convertFromGUIClipboardFunction · 0.85
inferMIMETypeFunction · 0.85
typeMethod · 0.80

Tested by

no test coverage detected