aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xstatus15
1 files changed, 15 insertions, 0 deletions
diff --git a/status b/status
index af5c190..5cd6678 100755
--- a/status
+++ b/status
@@ -49,8 +49,23 @@ help() {
echo " -d - run daemon"
}
+install_unit() {
+ printf "prefix: "
+ read prefix
+ ln -s "$HOME/.local/bin/$1" "$HOME/.local/share/status/$prefix$1"
+}
+
+remove_unit() {
+ unit=$(ls ~/.local/share/status/*$1)
+ printf "remove unit $unit? [Y/n]"
+ read $response
+ [ -z "$response" -o "$response" = "Y" ] && rm "$unit"
+}
+
case "$1" in
-d) daemon;;
-u) echo "update $2" > $CMDFIFO;;
-h) help;;
+ -i)install_unit $2;;
+ -r)remove_unit $2;;
esac