Skip to content

PasteFerry (隔空贴): clipboard and file sync across macOS, Windows and Linux. Direct-first, end-to-end encrypted. Optional official access: no server to host. Independent self-hosting remains available.

309 B
Raw Blame
package power

import (
	"os"
	"os/exec"
	"strconv"
)

// caffeinate -i 阻止空闲睡眠;-w 让它在后台服务退出时自己结束,不会留下来一直挡着。
func inhibit(string) (func(), error) {
	return holdProcess(exec.Command("/usr/bin/caffeinate", "-i", "-w", strconv.Itoa(os.Getpid())))
}