From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 21 Mar 2025 18:09:10 +0000 (+0100)
Subject: Improve.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/conditions?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=config

Improve.
---

diff --git a/testing/home/all/.nonpath_bins/plomlib.sh b/testing/home/all/.nonpath_bins/plomlib.sh
new file mode 100644
index 0000000..61907b2
--- /dev/null
+++ b/testing/home/all/.nonpath_bins/plomlib.sh
@@ -0,0 +1,7 @@
+dot_shell_file_variants () {
+    for FILE in ${1}\.*; do
+        if [ -f "${FILE}" ]; then
+            . "${FILE}"
+        fi
+    done
+}
diff --git a/testing/home/all/.profile b/testing/home/all/.profile
index 3e0f3bd..1039ec7 100644
--- a/testing/home/all/.profile
+++ b/testing/home/all/.profile
@@ -7,6 +7,8 @@
 # useful for providing environment variables to non-shell applications started
 # within a login session.
 
+. "${HOME}"/.nonpath_bins/plomlib.sh
+
 eval $(ssh-agent) && ssh-add
 
 PATH_BASHRC="${HOME}/.bashrc"
@@ -19,8 +21,4 @@ PATH_LOCAL_BIN="${HOME}/.local/bin"
 export PATH
 
 # include others
-for FILE in ${HOME}/\.profile\.*; do
-    if [ -f "${FILE}" ]; then
-        . "${FILE}"
-    fi
-done
+dot_shell_file_variants "${HOME}/\.profile"
diff --git a/testing/home/desktop/.nonpath_bins/plomlib.sh b/testing/home/desktop/.nonpath_bins/plomlib.sh
deleted file mode 100644
index 43e9aca..0000000
--- a/testing/home/desktop/.nonpath_bins/plomlib.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-get_passphrase() {
-    stty -echo
-    printf "\nPassphrase: "
-    read PASSPHRASE
-    stty echo
-    echo "" # newline so user knows their input return was accepted
-}
-
diff --git a/testing/home/desktop/.nonpath_bins/plomlib.sh.desktop b/testing/home/desktop/.nonpath_bins/plomlib.sh.desktop
new file mode 100644
index 0000000..43e9aca
--- /dev/null
+++ b/testing/home/desktop/.nonpath_bins/plomlib.sh.desktop
@@ -0,0 +1,8 @@
+get_passphrase() {
+    stty -echo
+    printf "\nPassphrase: "
+    read PASSPHRASE
+    stty echo
+    echo "" # newline so user knows their input return was accepted
+}
+