printrun-src/dot.pronsolerc.example

Fri, 24 Aug 2018 10:27:47 +0200

author
mdd
date
Fri, 24 Aug 2018 10:27:47 +0200
changeset 38
700241b53fe7
parent 15
0bbb006204fc
permissions
-rw-r--r--

disabled power management, since it prevents also going monitor to sleep

15
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
1 # Sample .pronsolerc file - copy this into your home directory and rename it to .pronsolerc
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
2 !print "Loaded " + self.rc_filename
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
3
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
4 macro fan
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
5 !global _fan
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
6 !if '_fan' in globals() and _fan:
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
7 !_fan = 0
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
8 M107
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
9 !if hasattr(self,"cur_button") and self.cur_button is not None:
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
10 !self.onecmd('button %d "fan (off)" /c green fan' % self.cur_button)
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
11 !else:
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
12 !_fan = 1
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
13 M106
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
14 !if hasattr(self,"cur_button") and self.cur_button is not None:
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
15 !self.onecmd('button %d "fan (on)" /c yellow fan' % self.cur_button)
0bbb006204fc Added printrun sourcecode from
mbayer
parents:
diff changeset
16 button 0 "fan (off)" /c "green" fan

mercurial