summaryrefslogtreecommitdiff
path: root/.a/work-mode.sh
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2022-08-04 17:41:27 +0300
committerSyndamia <kamen@syndamia.com>2022-08-04 17:41:27 +0300
commit80b4c81b618d4e75b301ac1dd5adfb47f91deca7 (patch)
treebc7d94935b273a1aa9b1a1b69c2bbc853c8a32e7 /.a/work-mode.sh
parenta47706a5bd5ee5be16e3fe443b6008cac9ee741d (diff)
downloaddotfiles-80b4c81b618d4e75b301ac1dd5adfb47f91deca7.tar
dotfiles-80b4c81b618d4e75b301ac1dd5adfb47f91deca7.tar.gz
dotfiles-80b4c81b618d4e75b301ac1dd5adfb47f91deca7.zip
Moved a lot of stuff to a new folder called .a
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