Skip to content

tacogips/log_mac_sleep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log_mac_sleep

  • Take sleep / wakeup log
  • Report daily active time with the log

Download

go get github.com/tacogips/log_mac_sleep/cmd/log_mac_sleep

Output file path

  • log file path: ~/.sleeplog/log
  • daily_report_file: ~/.sleeplog/daily_active

Run

# start log
log_mac_sleep -watch
# output daily report
log_mac_sleep -daily

register to launchd

go get github.com/tacogips/log_mac_sleep

copy _plist/github.com.tacogips.log_mac_sleep.plist.example to _plist/github.com.tacogips.log_mac_sleep.plist. replace log_mac_sleep path with absolute path in your environment.

<array>
  <string>/path/to/log_mac_sleep</string>
  <string>-watch</string>
</array>

then load plist

sh register_launchd.sh

About

log current time every time you sleep/wake up your mac

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published