printrun-src/dot.pronsolerc.example

Tue, 19 Jan 2021 20:44:16 +0100

author
mdd
date
Tue, 19 Jan 2021 20:44:16 +0100
changeset 44
310be640a303
parent 15
0bbb006204fc
permissions
-rw-r--r--

Added tag WORKING_BEFORE_UPGRADE_TO_GITMASTER for changeset f7e9bd735ce1

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