Browse Source

Add docstrings

Alois Mahdal 10 years ago
parent
commit
a9aafc5c3f
1 changed files with 24 additions and 0 deletions
  1. 24
    0
      bin/eeiam.in

+ 24
- 0
bin/eeiam.in View File

@@ -37,12 +37,18 @@ usage() {
37 37
 #
38 38
 
39 39
 familiars_at() {
40
+    #
41
+    # daemons specific to $1 location plus the rest
42
+    #
40 43
     test -n "$1" || usagef "location"
41 44
     iniread -p iam.needing.at.$1 iam.ini
42 45
     iniread -p iam.needing.at.ANY iam.ini
43 46
 }
44 47
 
45 48
 where_i_am() {
49
+    #
50
+    # what is my physical location?
51
+    #
46 52
     if=$(iniread -p iam.using.if iam.ini)
47 53
     gwmac=$(arp | grep "^gateway\\>.*\\<$if\$" | tr ' ' '\n' | grep :)
48 54
     iniread -p iam.seeing.gw.$gwmac iam.ini | grep . || echo OUT
@@ -54,6 +60,9 @@ where_i_am() {
54 60
 #
55 61
 
56 62
 i_am_afk() {
63
+    #
64
+    # away from keyboard; blocks until i'm back again
65
+    #
57 66
     mocp --pause
58 67
     slock
59 68
 }
@@ -63,6 +72,9 @@ i_am_at() {
63 72
 }
64 73
 
65 74
 i_am_back() {
75
+    #
76
+    # returning to work (should be called by other subcommands)
77
+    #
66 78
     local f fbin
67 79
     for f in $(familiars_at $(where_i_am));
68 80
     do
@@ -73,6 +85,9 @@ i_am_back() {
73 85
 }
74 86
 
75 87
 i_am_gone() {
88
+    #
89
+    # gone fishin'
90
+    #
76 91
     kdestroy
77 92
     killall $(familiars_at $(where_i_am))
78 93
     i_am_afk
@@ -80,14 +95,23 @@ i_am_gone() {
80 95
 }
81 96
 
82 97
 i_am_moving() {
98
+    #
99
+    # to other train or dreamland, but localhost must sleep now
100
+    #
83 101
     die "not implemented"   # hint: use zleep
84 102
 }
85 103
 
86 104
 i_am_ooo() {
105
+    #
106
+    # too dangerous to implement
107
+    #
87 108
     die "not implemented"
88 109
 }
89 110
 
90 111
 i_am_wfh() {
112
+    #
113
+    # too dangerous to implement
114
+    #
91 115
     die "not implemented"
92 116
 }
93 117