aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2021-03-18 09:39:34 +0100
committerPatrick Spek <p.spek@tyil.nl>2021-08-14 12:01:17 +0200
commitd6e28e0b2a8bc7498d0e7b143bb971e0892ca1f9 (patch)
tree8967978cadd10f4ad7e1c433754f59d80bce1765
parent7fe8a4fe5ff98e6001234f8109020217002502d1 (diff)
Make xblank export XBLANK_ vars for scripts
-rwxr-xr-x.local/bin/xblank4
1 files changed, 4 insertions, 0 deletions
diff --git a/.local/bin/xblank b/.local/bin/xblank
index dc675d9..0165455 100755
--- a/.local/bin/xblank
+++ b/.local/bin/xblank
@@ -52,9 +52,13 @@ main()
exit 4
fi
+ # Set some environment variables, for exposing to the scripts ran
+ export XBLANK_STATESD="$rundir/states.d"
+
# Initialize the rundir
log "Create rundir ($rundir)"
mkdir -p -- "$rundir"
+ mkdir -p -- "$XBLANK_STATESD"
printf "0\n" > "$rundir/paused"
[ ! -f "$rundir/state" ] && printf "active\n" > "$rundir/state"