feat: desktop-agent für windows, macos und linux
Go-Programm lc-agent: sendet neu kopierten Text als Clip ins Projekt "Zwischenablage" und übernimmt eigene Clips anderer Geräte live in die Zwischenablage. Von Passwort-Managern markierte Inhalte werden nie gesendet; Größengrenze, Ausschlussmuster, nur die letzten 50 eigenen Clips. Wiederholt beim Start, bis der Server erreichbar ist; beendet sich bei widerrufenem Token mit Exit-Code 3. Build für alle Plattformen per build.sh im Container, Autostart-Vorlagen für alle drei Systeme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
db700fd003
commit
4aebac5336
23 files changed
+1894
-1
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# Windows: start lc-agentw.exe (no console window) at login via the Startup folder.
|
||||
# Run in PowerShell from the folder containing lc-agentw.exe:
|
||||
# powershell -ExecutionPolicy Bypass -File autostart-windows.ps1
|
||||
$target = Join-Path $env:LOCALAPPDATA "lan-clipboard"
|
||||
New-Item -ItemType Directory -Force -Path $target | Out-Null
|
||||
Copy-Item -Force (Join-Path $PSScriptRoot "lc-agentw.exe") $target
|
||||
Copy-Item -Force (Join-Path $PSScriptRoot "lc-agent.exe") $target
|
||||
|
||||
$shell = New-Object -ComObject WScript.Shell
|
||||
$link = $shell.CreateShortcut((Join-Path ([Environment]::GetFolderPath("Startup")) "LAN-Clipboard Agent.lnk"))
|
||||
$link.TargetPath = Join-Path $target "lc-agentw.exe"
|
||||
$link.Arguments = "run -log `"$target\agent.log`""
|
||||
$link.WorkingDirectory = $target
|
||||
$link.Save()
|
||||
Write-Host "Autostart eingerichtet. Jetzt einmalig einrichten mit:"
|
||||
Write-Host " & `"$target\lc-agent.exe`" setup"
|
||||
Write-Host "Danach abmelden/anmelden oder lc-agentw.exe direkt starten. Protokoll: $target\agent.log"
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!--
|
||||
macOS LaunchAgent: starts lc-agent at login.
|
||||
cp lc-agent-macos-apple /usr/local/bin/lc-agent (Intel: lc-agent-macos-intel)
|
||||
cp lan-clipboard.agent.plist ~/Library/LaunchAgents/
|
||||
launchctl load ~/Library/LaunchAgents/lan-clipboard.agent.plist
|
||||
Replace USERNAME below with your macOS user name.
|
||||
-->
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>lan-clipboard.agent</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/local/bin/lc-agent</string>
|
||||
<string>run</string>
|
||||
<string>-log</string>
|
||||
<string>/Users/USERNAME/Library/Logs/lc-agent.log</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<dict>
|
||||
<key>SuccessfulExit</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>ThrottleInterval</key>
|
||||
<integer>30</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,20 @@
|
||||
# systemd user unit for Linux.
|
||||
# cp lc-agent-linux-amd64 ~/.local/bin/lc-agent && chmod +x ~/.local/bin/lc-agent
|
||||
# cp lc-agent.service ~/.config/systemd/user/
|
||||
# systemctl --user enable --now lc-agent
|
||||
# Log: journalctl --user -u lc-agent -f
|
||||
[Unit]
|
||||
Description=LAN-Clipboard agent (clipboard sync)
|
||||
# Needs the graphical session for the clipboard
|
||||
After=graphical-session.target
|
||||
PartOf=graphical-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=%h/.local/bin/lc-agent run
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
# Exit code 3: token revoked; restarting would not help
|
||||
RestartPreventExitStatus=3
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
Reference in new issue
Block a user