Currently this project is only suitable when the host machine is a windows machine.
synergy-listener listens for changes in a synergy 3 host's log file, parses the tail-end, and writes what computer is currently being controlled to a .txt
file. You can then hook into this .txt
file via other applications/processes to react based on which computer is currently being controlled. For example, the advanced scene switcher plugin for obs can switch scenes based on the contents of a text file, the coordinates of your mouse, and more. I combine this with the obs ndi plugin to send a video feed from each PC in my setup to my capture pc. From there, I can automatically switch to whatever scene represents whichever display / section of a display on whichever computer I'm currently controlling with synergy. See the video below to witness this in action.
synergy-listener-example_a.mp4
Run the following command in powershell.
winget install Microsoft.PowerShell Git.Git
Run the following command in PowerShell in the directory you desire (ie cd ~/Documents
).
git clone https://github.com/ninbura/synergy-listener
- Create
config.json
in the root of the repository you just cloned.-
New-Item -Type File -Name config.json
-
- Provide the
SynergryLogPath
,OutputFileDirectory
, &RetryOnFailure
within said configuraiton.-
{ "SynergyLogPath": "C:/ProgramData/Synergy/logs/synergy.log", "OutputFileDirectory": "//192.168.2.4/a-sexy-capturer/Users/gabri/Documents", "RetryOnFailure": true }
-
- The
RetryOnFailure
option will make synergy-listener attempt to relocate the relevant files/paths set in the configuration if it can't find them. Useful if you're using network locations.
Simply run ~install.bat
at the root of the repository as administrator. After this, the proccess should automatically startup with your computer. From now on, when you switch computers with Synergy, the current-computer.txt
file should contain the computer currently being controlled by Synergy. current-computer.txt
should be located within your specified OutputFileDirectory
.
If you're running into issues, or it seems like synergy-listener isn't running; check the synergry-listener.log
file in root where you cloned the repo.
- Run
~stop.bat
as administrator to stop the schedule task. - Run
~restart.bat
as administrator to restart the task if it's not working, or if you've updated theconfig.json
file. - Run
~uninstall.bat
as administrator to uninstall and remove the task, feel free to delete the repository after this.