aboutsummaryrefslogtreecommitdiff
path: root/.scripts/islocked
diff options
context:
space:
mode:
authorMarvin Borner2023-03-17 18:24:01 +0100
committerMarvin Borner2023-03-17 18:24:01 +0100
commita8a6c3a400174cf476ec8e75bb2e5a5b0afb34da (patch)
treef7fa93658fffd6dd7f8fd664f907fb1a8f3da772 /.scripts/islocked
parent031698ddaa8d7f8224358932b8e69e7f22d43963 (diff)
Script sync
Diffstat (limited to '.scripts/islocked')
-rwxr-xr-x.scripts/islocked5
1 files changed, 5 insertions, 0 deletions
diff --git a/.scripts/islocked b/.scripts/islocked
new file mode 100755
index 0000000..9f2c7ef
--- /dev/null
+++ b/.scripts/islocked
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# fails if locked
+
+(pgrep -x "slock" 2>/dev/null) && exit 1 || exit 0