Check if the user is currently working on MacOS.
server side:
- go to
server - copy
config_example.jsontoconfig.json, and edit it by yourself. - using
go run server.goto start server. - you also can using
make start-serverto start server instead step 3.
client side:
- make sure you have installed go and python
- create a python virtual environment using
python -m venv .venv, And install dependencies usingpip install -r requirements.txt - copy
config_example.jsontoconfig.json, and edit it by yourself. - go to
client - using
go run client.goto start client in your mac. - you also can using
make start-clientto start client instead step 5.
automatically start client when mac boot to see Mac README.
port: The port that server will listen on, Required.user_name: The user name will be shown in the web page, Required.dingtalk_id: The DingTalk ID of the user, click快速联系will jumps to profile page in DingTalk.
server_address: The URL of the server, Required.expected_ssid: The expected SSID of the Wi-Fi network, if the client is not connected to this SSID, it will be considered offline. Optional.
client/screen_lock.py script can check macos screen status, if users macos is never locked. It means user are working now on mac. If it locked or disconnect network, it means user is offline.
Inspired from changkun/office
License: MIT