summary history branches tags files
commit:d195e53734138c673eca83aa4fe3cb502068ea16
author:Trevor Bentley
committer:Trevor Bentley
date:Thu Nov 16 00:24:21 2017 +0100
parents:48a1510f6da3e0c766d59290740015d11ae75ce2
Updated README
diff --git a/README.md b/README.md
line changes: +65/-1
index f916a73..ba1984a
--- a/README.md
+++ b/README.md
@@ -17,8 +17,72 @@ Circadian uses a suite of 'idle heuristics' to determine when a system is idle. 
 
 When all of its heuristics determine that your system has been idle for long enough, Circadian will execute a command.  This is typically a simple power suspend, but it can be configured to any desired action.
 
+It can execute another command when it detects that the system woke back up.
+
 Circadian exists because modern Linux distros already support suspend-on-idle, but it is apparently a very buggy and unreliable domain.  After you've followed your distro's advice of poking a handful of conf files, tweaking a few XML hierarchies, writing a few scripts, wafting the smoke of burning sage across your keyboard, suspending gem stones from your machine, and whatever else may be recommended... perhaps try Circadian.
 
 ## Status
 
-Completely unfinished.  Perhaps don't try it *now*.
+"Works for me".  You try.  You give feedback on GitHub, or to <trevor@trevorbentley.com>.
+
+## Installing
+
+### Debian x86-64
+
+* Download [Circadian 0.3.0](https://github.com/mrmekon/circadian/releases/download/0.3.0/circadian_0.3.0-1_amd64.deb)
+
+```
+$ sudo dpkg -i circadian_0.3.0-1_amd64.deb
+```
+
+Edit /etc/circadian.conf to configure.  The default is to suspend with systemd after 2 hours of idle.
+
+When you are happy with the config, continue:
+
+```
+$ sudo systemctl enable circadian
+$ sudo systemctl start circadian
+```
+
+
+### Any other system with systemd
+
+Install manually.  It's easy.
+
+```
+$ git clone https://github.com/mrmekon/circadian.git
+$ cd circadian
+$ cargo build --release
+$ sudo cp target/release/circadian /usr/bin/
+$ sudo cp resources/circadian.conf.in /etc/circadian.conf
+$ sudo cp resources/circadian.service /etc/systemd/system/
+$ sudo systemctl enable circadian
+$ sudo systemctl start circadian
+```
+
+### Non-systemd systems
+
+Follow systemd instructions, and port circadian.service to whatever format you want.
+
+## Dependencies
+
+* Might need to install
+    * xssstate
+    * xprintidle
+    * netstat
+    * rustc + cargo (if building locally)
+* Should already have
+    * grep
+    * awk
+    * w
+    * id
+    * uptime
+    * pgrep
+    * cat
+    * sh
+
+## Usage
+
+* Should run as root, ideally from systemd.
+* Config is in: /etc/circadian.conf (it is documented)
+* `pkill -SIGUSR1 circadian` will dump info to syslog.  Use that to see if it's working, or find out why it isn't sleeping.