aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'dot_local/bin')
-rw-r--r--dot_local/bin/executable__sandbox-net-parser2
-rw-r--r--dot_local/bin/executable_dictate2
-rwxr-xr-xdot_local/bin/executable_linkhandler2
-rw-r--r--dot_local/bin/executable_ocr2
-rw-r--r--dot_local/bin/executable_on-battery-suspend2
-rwxr-xr-xdot_local/bin/executable_record4
-rwxr-xr-xdot_local/bin/executable_rqr2
-rw-r--r--dot_local/bin/executable_streamlink2
-rwxr-xr-xdot_local/bin/executable_togreta2
-rwxr-xr-xdot_local/bin/executable_tokodi2
-rwxr-xr-xdot_local/bin/executable_wqr2
-rw-r--r--dot_local/bin/executable_yt-dlp2
12 files changed, 13 insertions, 13 deletions
diff --git a/dot_local/bin/executable__sandbox-net-parser b/dot_local/bin/executable__sandbox-net-parser
index 3189d00..6b55d08 100644
--- a/dot_local/bin/executable__sandbox-net-parser
+++ b/dot_local/bin/executable__sandbox-net-parser
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
# Sandbox wrapper for tools that parse data from untrusted network
# sources (yt-dlp, streamlink). The threat model is RCE in a
# subtitle / muxer / extractor that walks the user's home directory
diff --git a/dot_local/bin/executable_dictate b/dot_local/bin/executable_dictate
index bf1157c..7ad80bb 100644
--- a/dot_local/bin/executable_dictate
+++ b/dot_local/bin/executable_dictate
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
# Push-to-talk dictation. Toggle: 1st invocation starts recording;
# 2nd stops, transcribes via whisper.cpp, types the result into the focused
# window with wtype, and copies it to the clipboard.
diff --git a/dot_local/bin/executable_linkhandler b/dot_local/bin/executable_linkhandler
index a440634..e44dcc1 100755
--- a/dot_local/bin/executable_linkhandler
+++ b/dot_local/bin/executable_linkhandler
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
resolve_url() {
if [ -f "$1" ]; then
diff --git a/dot_local/bin/executable_ocr b/dot_local/bin/executable_ocr
index 5ce8b08..aeadb51 100644
--- a/dot_local/bin/executable_ocr
+++ b/dot_local/bin/executable_ocr
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
# OCR a screen region (default) or an image file → clipboard.
#
# Usage:
diff --git a/dot_local/bin/executable_on-battery-suspend b/dot_local/bin/executable_on-battery-suspend
index 2f39cc7..93155d6 100644
--- a/dot_local/bin/executable_on-battery-suspend
+++ b/dot_local/bin/executable_on-battery-suspend
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env dash
# Suspend the system, but only if running on battery. Used as the
# swayidle `timeout` action so idle suspends save battery without ever
# firing while the laptop is plugged in.
diff --git a/dot_local/bin/executable_record b/dot_local/bin/executable_record
index ff57758..ac88771 100755
--- a/dot_local/bin/executable_record
+++ b/dot_local/bin/executable_record
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
pid_file="/tmp/recordpid"
log_file="/tmp/record.log"
@@ -9,7 +9,7 @@ pid_exists() {
is_running() {
if pid_exists; then
- ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1
+ kill -0 "$(cat "$pid_file")" >/dev/null 2>&1 || return 1
else
return 1
fi
diff --git a/dot_local/bin/executable_rqr b/dot_local/bin/executable_rqr
index 335f55b..76ea698 100755
--- a/dot_local/bin/executable_rqr
+++ b/dot_local/bin/executable_rqr
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
text="$(zbarcam -q -1 --raw)"
printf '%s' "$text" | wl-copy
diff --git a/dot_local/bin/executable_streamlink b/dot_local/bin/executable_streamlink
index d13a66d..591fffd 100644
--- a/dot_local/bin/executable_streamlink
+++ b/dot_local/bin/executable_streamlink
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
# Thin wrapper: run streamlink inside _sandbox-net-parser. The
# sandbox keeps `/` bind-mounted, so streamlink's configured player
# (`flatpak run io.mpv.Mpv` — see ~/.config/streamlink/config) is reachable
diff --git a/dot_local/bin/executable_togreta b/dot_local/bin/executable_togreta
index 9a189f9..3aa0afb 100755
--- a/dot_local/bin/executable_togreta
+++ b/dot_local/bin/executable_togreta
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
if [ -z "$1" ]; then
url=$(wl-paste)
diff --git a/dot_local/bin/executable_tokodi b/dot_local/bin/executable_tokodi
index aec226c..469f851 100755
--- a/dot_local/bin/executable_tokodi
+++ b/dot_local/bin/executable_tokodi
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
if [ -z "$1" ]; then
url=$(wl-paste)
diff --git a/dot_local/bin/executable_wqr b/dot_local/bin/executable_wqr
index f878fdf..5f9d36d 100755
--- a/dot_local/bin/executable_wqr
+++ b/dot_local/bin/executable_wqr
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
if [ -z "$1" ]; then
text=$(wl-paste)
diff --git a/dot_local/bin/executable_yt-dlp b/dot_local/bin/executable_yt-dlp
index 87947a8..df62831 100644
--- a/dot_local/bin/executable_yt-dlp
+++ b/dot_local/bin/executable_yt-dlp
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env dash
# Thin wrapper: run yt-dlp inside _sandbox-net-parser. See that
# script for the threat model and the SANDBOX=0 escape hatch.
exec _sandbox-net-parser "$HOME/.nix-profile/bin/yt-dlp" "$@"