|
@@ -100,6 +100,21 @@ sound_is_muted() {
|
100
|
100
|
}
|
101
|
101
|
|
102
|
102
|
|
|
103
|
+#
|
|
104
|
+# hooks
|
|
105
|
+#
|
|
106
|
+
|
|
107
|
+run_hook() {
|
|
108
|
+ local name=$1
|
|
109
|
+ local cmd=$2
|
|
110
|
+ local arg=$3
|
|
111
|
+ saturnin conf -p iam.hooking.$name.$cmd \
|
|
112
|
+ | SATURNIN_IAM_CMD=$cmd \
|
|
113
|
+ SATURNIN_IAM_ARG=$arg \
|
|
114
|
+ bash
|
|
115
|
+}
|
|
116
|
+
|
|
117
|
+
|
103
|
118
|
#
|
104
|
119
|
# subcommand handlers
|
105
|
120
|
#
|
|
@@ -234,4 +249,6 @@ available_commands | grep -qse ^$1 || usage
|
234
|
249
|
|
235
|
250
|
shift
|
236
|
251
|
|
|
252
|
+run_hook before $cmd $1
|
237
|
253
|
i_am_$cmd $1
|
|
254
|
+run_hook after $cmd $1
|