summaryrefslogtreecommitdiff
path: root/.a/work-mode.sh
diff options
context:
space:
mode:
Diffstat (limited to '.a/work-mode.sh')
-rwxr-xr-x.a/work-mode.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/.a/work-mode.sh b/.a/work-mode.sh
new file mode 100755
index 0000000..3c9dc73
--- /dev/null
+++ b/.a/work-mode.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [ ! -f /tmp/stopwork ]; then
+ touch /tmp/stopwork
+else
+ $(su - kamen -s /bin/bash -c "while [ -f /tmp/stopwork ]; do if [ $(date '+%H') -gt 9 ] && [ $(date '+%H') -lt 21 ]; then pkill Min; fi; sleep 1; done" &) \
+ && rm /tmp/stopwork
+fi