update scripts to be nix compatible

This commit is contained in:
Barrett Ruth 2026-02-10 20:53:05 -05:00
parent 3d2d57ddff
commit 070455ac33
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
4 changed files with 71 additions and 79 deletions

View file

@ -1,4 +1,10 @@
#!/bin/sh
# X11 utilities -- only usable under X11 sessions
[ "$XDG_SESSION_TYPE" = "x11" ] || {
echo "x: requires X11 session (current: ${XDG_SESSION_TYPE:-unknown})" >&2
exit 1
}
require() {
for cmd in "$@"; do