Created
December 21, 2015 10:00
-
-
Save hluk/b1f69df944335f41242b to your computer and use it in GitHub Desktop.
CopyQ - Synchronize Clipboard with Other Sessions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Command] | |
Automatic=true | |
Command=" | |
copyq: | |
// Select session to send data to. | |
var sessions = [ | |
\"my_session_2\", | |
\"my_session_3\", | |
\"my_session_4\", | |
] | |
function passInput(session_name, command) { | |
execute( | |
\"copyq\", \"-s\", session_name, | |
command, \"application/x-copyq-item\", \"-\", | |
null, input()) | |
} | |
function syncNewItem(session_name) { | |
passInput(session_name, \"write\") | |
} | |
function syncClipboard(session_name) { | |
passInput(session_name, \"clipboard\") | |
} | |
for (var i in sessions) { | |
// Set clipboard in each session. | |
//syncClipboard(sessions[i]) | |
// Add new item in each session. | |
syncNewItem(sessions[i]) | |
}" | |
Icon=\xf065 | |
Input=text/plain | |
Name=Synchronize Clipboard with Other Sessions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved to copyq-commands repository.