Skip to content

sercanarga/go-bt-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Go BT Lock

Locks the screen in Windows using the distance value (RSSI) of your Bluetooth device.

Build

  1. Download the ZIP file using git clone or the link.
  2. Customize the values in the main.go file.
deviceMAC       = ""                       // Bluetooth Device MAC ID
minRSSI   int16 = -60                      // Minimum RSSI tolerance value of the bluetooth device
timeout         = 20 * time.Second         // Timeout Time
adapter         = bluetooth.DefaultAdapter // Bluetooth Receiver
  1. Take the windowless build.
go build -ldflags -H=windowsgui .

Add Startup

To add it to startup, use WIN+R to open the run window and enter the command shell:startup. Can copy the compiled bt-lock.exe file to the startup folder. It will then run at startup.

Performance

In the tests I did, I found that it uses about 2.7mb of RAM and 0.2% to 1% CPU usage.