Last active
August 23, 2022 23:08
-
-
Save siikamiika/92d84d406ccab43dcc98ff0510548397 to your computer and use it in GitHub Desktop.
clipboard sync windows
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
powershell "$prev = Get-Clipboard -Raw; while ($true) { $cur = Get-Clipboard -Raw; if ($cur -ne $prev) { [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($cur)); $prev = $cur } else { Start-Sleep -Milliseconds 500 } }" | secure_bus --remote-server-addr <host>:<port> --sentinel-byte 10 | powershell "foreach ($line in $input) { $text = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($line)); if ($text -ne '') { Set-Clipboard -Value $text } }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment