From: Christian Heller <c.heller@plomlompom.de>
Date: Tue, 15 Apr 2025 11:05:09 +0000 (+0200)
Subject: Move .plomlib.sh to more generally named .plomlib
X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/process?a=commitdiff_plain;h=6d033d68acf9273f98edc85878aee4db85a3917e;p=config

Move .plomlib.sh to more generally named .plomlib
---

diff --git a/bookworm/home/all/.bashrc b/bookworm/home/all/.bashrc
index 636c408..e748315 100644
--- a/bookworm/home/all/.bashrc
+++ b/bookworm/home/all/.bashrc
@@ -25,5 +25,5 @@ PS3="${tput_color}select: ${tput_reset}"
 PS4="${tput_color}+ ${tput_reset}"
 
 # include others
-. "${HOME}/.plomlib.sh/file_dot_variants"
+. "${HOME}/.plomlib/file_dot_variants"
 file_dot_variants "${HOME}/\.bashrc"
diff --git a/bookworm/home/all/.plomlib.sh/file_dot_variants b/bookworm/home/all/.plomlib.sh/file_dot_variants
deleted file mode 100644
index 1c1bf69..0000000
--- a/bookworm/home/all/.plomlib.sh/file_dot_variants
+++ /dev/null
@@ -1,7 +0,0 @@
-file_dot_variants() {
-    for FILE in ${1}\.*; do
-        if [ -f "${FILE}" ]; then
-            . "${FILE}"
-        fi
-    done
-}
diff --git a/bookworm/home/all/.plomlib/file_dot_variants b/bookworm/home/all/.plomlib/file_dot_variants
new file mode 100644
index 0000000..1c1bf69
--- /dev/null
+++ b/bookworm/home/all/.plomlib/file_dot_variants
@@ -0,0 +1,7 @@
+file_dot_variants() {
+    for FILE in ${1}\.*; do
+        if [ -f "${FILE}" ]; then
+            . "${FILE}"
+        fi
+    done
+}
diff --git a/bookworm/home/all/.profile b/bookworm/home/all/.profile
index 13fa422..51acedd 100644
--- a/bookworm/home/all/.profile
+++ b/bookworm/home/all/.profile
@@ -16,5 +16,5 @@ PATH_LOCAL_BIN="${HOME}/.local/bin"
 export PATH
 
 # include others
-. "${HOME}/.plomlib.sh/file_dot_variants"
+. "${HOME}/.plomlib/file_dot_variants"
 file_dot_variants "${HOME}/\.profile"
diff --git a/bookworm/scripts/lib/setup_users b/bookworm/scripts/lib/setup_users
index 0d8f21b..349c6a3 100644
--- a/bookworm/scripts/lib/setup_users
+++ b/bookworm/scripts/lib/setup_users
@@ -16,7 +16,7 @@ setup_users() {
     copy_dirtree "${_PATH_CONF_HOME}" "${PATH_USER_HOME}" ${_MIN_TAGS} ${_TAGS_USER}
     mkdir -p "${_PATH_USER_BIN}"
     cd "${_PATH_USER_BIN}"
-    ln -s ../../.plomlib.sh lib
+    ln -s ../../.plomlib lib
     cd - > /dev/null
     chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_HOME}"
 }
diff --git a/testing/home/all/.plomlib.sh/file_dot_variants b/testing/home/all/.plomlib.sh/file_dot_variants
deleted file mode 120000
index f616819..0000000
--- a/testing/home/all/.plomlib.sh/file_dot_variants
+++ /dev/null
@@ -1 +0,0 @@
-../../../../bookworm/home/all/.plomlib.sh/file_dot_variants
\ No newline at end of file
diff --git a/testing/home/all/.plomlib/file_dot_variants b/testing/home/all/.plomlib/file_dot_variants
new file mode 120000
index 0000000..f616819
--- /dev/null
+++ b/testing/home/all/.plomlib/file_dot_variants
@@ -0,0 +1 @@
+../../../../bookworm/home/all/.plomlib.sh/file_dot_variants
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/abort b/testing/home/desktop/.plomlib.sh/abort
deleted file mode 120000
index 3afad55..0000000
--- a/testing/home/desktop/.plomlib.sh/abort
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/abort
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/abort_if_exists b/testing/home/desktop/.plomlib.sh/abort_if_exists
deleted file mode 120000
index 8ea409a..0000000
--- a/testing/home/desktop/.plomlib.sh/abort_if_exists
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/abort_if_exists
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/audio_dev_is_mute b/testing/home/desktop/.plomlib.sh/audio_dev_is_mute
deleted file mode 100644
index e28da40..0000000
--- a/testing/home/desktop/.plomlib.sh/audio_dev_is_mute
+++ /dev/null
@@ -1,3 +0,0 @@
-audio_dev_is_mute() {
-    [ "$(pactl get-sink-mute 0)" = "Mute: yes" ]
-}
diff --git a/testing/home/desktop/.plomlib.sh/constants_borg b/testing/home/desktop/.plomlib.sh/constants_borg
deleted file mode 120000
index 1cc05f7..0000000
--- a/testing/home/desktop/.plomlib.sh/constants_borg
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/constants_borg
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/constants_secrets b/testing/home/desktop/.plomlib.sh/constants_secrets
deleted file mode 120000
index 85c9977..0000000
--- a/testing/home/desktop/.plomlib.sh/constants_secrets
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/constants_secrets
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/constants_ssh b/testing/home/desktop/.plomlib.sh/constants_ssh
deleted file mode 120000
index 7b0ccb4..0000000
--- a/testing/home/desktop/.plomlib.sh/constants_ssh
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/constants_ssh
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/constants_user b/testing/home/desktop/.plomlib.sh/constants_user
deleted file mode 120000
index 79ec36f..0000000
--- a/testing/home/desktop/.plomlib.sh/constants_user
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/constants_user
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/expect_min_n_args b/testing/home/desktop/.plomlib.sh/expect_min_n_args
deleted file mode 120000
index 2966623..0000000
--- a/testing/home/desktop/.plomlib.sh/expect_min_n_args
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/expect_min_n_args
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/expect_n_args b/testing/home/desktop/.plomlib.sh/expect_n_args
deleted file mode 120000
index a0925a1..0000000
--- a/testing/home/desktop/.plomlib.sh/expect_n_args
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/expect_n_args
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/get_passphrase b/testing/home/desktop/.plomlib.sh/get_passphrase
deleted file mode 120000
index 3d542b5..0000000
--- a/testing/home/desktop/.plomlib.sh/get_passphrase
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/get_passphrase
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/mount_secrets b/testing/home/desktop/.plomlib.sh/mount_secrets
deleted file mode 120000
index 86f3878..0000000
--- a/testing/home/desktop/.plomlib.sh/mount_secrets
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/mount_secrets
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/path_tmp_timestamped b/testing/home/desktop/.plomlib.sh/path_tmp_timestamped
deleted file mode 120000
index 0752df5..0000000
--- a/testing/home/desktop/.plomlib.sh/path_tmp_timestamped
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/path_tmp_timestamped
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib.sh/print_usage b/testing/home/desktop/.plomlib.sh/print_usage
deleted file mode 100644
index b1d6204..0000000
--- a/testing/home/desktop/.plomlib.sh/print_usage
+++ /dev/null
@@ -1,37 +0,0 @@
-print_usage() {
-    echo 'Usage:'
-    echo "${USAGE_LINES}" | while read _LINE; do
-        echo "  $(basename $0) ${_LINE}"
-    done
-    echo "\n${USAGE_DESCRIPTION}\n"
-    _var_of() { eval printf '"%s"' '"${'"${1}${2}"'}"'; }
-    _build_index() {
-        _ARGS="$(_var_of 'USAGE_ARGS_' ${_IDX})"
-        if [ ! -z "${_ARGS}" ]; then
-            _ARGS=" ${_ARGS}"
-        fi
-        _NAME="${_IDX}" 
-        _ALT_NAME="$(_var_of 'USAGE_NAME_' ${_IDX})" 
-        if [ ! -z "${_ALT_NAME}" ]; then
-            _NAME="${_ALT_NAME}"
-        fi
-        _KEY="  ${_NAME}${_ARGS}"
-        _LEN_KEY=$(echo -n "${_KEY}" | wc -c)
-    }
-    _MAX_LEN_KEY=0
-    for _IDX in ${USAGE_INDICES}; do
-        _build_index
-        if [ "${_LEN_KEY}" -gt "${_MAX_LEN_KEY}" ]; then
-            _MAX_LEN_KEY="${_LEN_KEY}"
-        fi
-    done
-    for _IDX in ${USAGE_INDICES}; do
-        _build_index
-        printf '%s' "${_KEY}"
-        _LEN_GAP=$(calc "${_MAX_LEN_KEY} - ${_LEN_KEY} + 4")
-        for _ in $(seq 1 ${_LEN_GAP}); do
-            printf ' '
-        done
-        printf '%s\n' "$(_var_of 'USAGE_DESC_' ${_IDX})"
-    done
-}
diff --git a/testing/home/desktop/.plomlib.sh/retry_until b/testing/home/desktop/.plomlib.sh/retry_until
deleted file mode 120000
index 2c75318..0000000
--- a/testing/home/desktop/.plomlib.sh/retry_until
+++ /dev/null
@@ -1 +0,0 @@
-../../../scripts/lib/retry_until
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/abort b/testing/home/desktop/.plomlib/abort
new file mode 120000
index 0000000..3afad55
--- /dev/null
+++ b/testing/home/desktop/.plomlib/abort
@@ -0,0 +1 @@
+../../../scripts/lib/abort
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/abort_if_exists b/testing/home/desktop/.plomlib/abort_if_exists
new file mode 120000
index 0000000..8ea409a
--- /dev/null
+++ b/testing/home/desktop/.plomlib/abort_if_exists
@@ -0,0 +1 @@
+../../../scripts/lib/abort_if_exists
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/audio_dev_is_mute b/testing/home/desktop/.plomlib/audio_dev_is_mute
new file mode 100644
index 0000000..e28da40
--- /dev/null
+++ b/testing/home/desktop/.plomlib/audio_dev_is_mute
@@ -0,0 +1,3 @@
+audio_dev_is_mute() {
+    [ "$(pactl get-sink-mute 0)" = "Mute: yes" ]
+}
diff --git a/testing/home/desktop/.plomlib/constants_borg b/testing/home/desktop/.plomlib/constants_borg
new file mode 120000
index 0000000..1cc05f7
--- /dev/null
+++ b/testing/home/desktop/.plomlib/constants_borg
@@ -0,0 +1 @@
+../../../scripts/lib/constants_borg
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/constants_secrets b/testing/home/desktop/.plomlib/constants_secrets
new file mode 120000
index 0000000..85c9977
--- /dev/null
+++ b/testing/home/desktop/.plomlib/constants_secrets
@@ -0,0 +1 @@
+../../../scripts/lib/constants_secrets
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/constants_ssh b/testing/home/desktop/.plomlib/constants_ssh
new file mode 120000
index 0000000..7b0ccb4
--- /dev/null
+++ b/testing/home/desktop/.plomlib/constants_ssh
@@ -0,0 +1 @@
+../../../scripts/lib/constants_ssh
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/constants_user b/testing/home/desktop/.plomlib/constants_user
new file mode 120000
index 0000000..79ec36f
--- /dev/null
+++ b/testing/home/desktop/.plomlib/constants_user
@@ -0,0 +1 @@
+../../../scripts/lib/constants_user
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/expect_min_n_args b/testing/home/desktop/.plomlib/expect_min_n_args
new file mode 120000
index 0000000..2966623
--- /dev/null
+++ b/testing/home/desktop/.plomlib/expect_min_n_args
@@ -0,0 +1 @@
+../../../scripts/lib/expect_min_n_args
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/expect_n_args b/testing/home/desktop/.plomlib/expect_n_args
new file mode 120000
index 0000000..a0925a1
--- /dev/null
+++ b/testing/home/desktop/.plomlib/expect_n_args
@@ -0,0 +1 @@
+../../../scripts/lib/expect_n_args
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/get_passphrase b/testing/home/desktop/.plomlib/get_passphrase
new file mode 120000
index 0000000..3d542b5
--- /dev/null
+++ b/testing/home/desktop/.plomlib/get_passphrase
@@ -0,0 +1 @@
+../../../scripts/lib/get_passphrase
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/mount_secrets b/testing/home/desktop/.plomlib/mount_secrets
new file mode 120000
index 0000000..86f3878
--- /dev/null
+++ b/testing/home/desktop/.plomlib/mount_secrets
@@ -0,0 +1 @@
+../../../scripts/lib/mount_secrets
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/path_tmp_timestamped b/testing/home/desktop/.plomlib/path_tmp_timestamped
new file mode 120000
index 0000000..0752df5
--- /dev/null
+++ b/testing/home/desktop/.plomlib/path_tmp_timestamped
@@ -0,0 +1 @@
+../../../scripts/lib/path_tmp_timestamped
\ No newline at end of file
diff --git a/testing/home/desktop/.plomlib/print_usage b/testing/home/desktop/.plomlib/print_usage
new file mode 100644
index 0000000..b1d6204
--- /dev/null
+++ b/testing/home/desktop/.plomlib/print_usage
@@ -0,0 +1,37 @@
+print_usage() {
+    echo 'Usage:'
+    echo "${USAGE_LINES}" | while read _LINE; do
+        echo "  $(basename $0) ${_LINE}"
+    done
+    echo "\n${USAGE_DESCRIPTION}\n"
+    _var_of() { eval printf '"%s"' '"${'"${1}${2}"'}"'; }
+    _build_index() {
+        _ARGS="$(_var_of 'USAGE_ARGS_' ${_IDX})"
+        if [ ! -z "${_ARGS}" ]; then
+            _ARGS=" ${_ARGS}"
+        fi
+        _NAME="${_IDX}" 
+        _ALT_NAME="$(_var_of 'USAGE_NAME_' ${_IDX})" 
+        if [ ! -z "${_ALT_NAME}" ]; then
+            _NAME="${_ALT_NAME}"
+        fi
+        _KEY="  ${_NAME}${_ARGS}"
+        _LEN_KEY=$(echo -n "${_KEY}" | wc -c)
+    }
+    _MAX_LEN_KEY=0
+    for _IDX in ${USAGE_INDICES}; do
+        _build_index
+        if [ "${_LEN_KEY}" -gt "${_MAX_LEN_KEY}" ]; then
+            _MAX_LEN_KEY="${_LEN_KEY}"
+        fi
+    done
+    for _IDX in ${USAGE_INDICES}; do
+        _build_index
+        printf '%s' "${_KEY}"
+        _LEN_GAP=$(calc "${_MAX_LEN_KEY} - ${_LEN_KEY} + 4")
+        for _ in $(seq 1 ${_LEN_GAP}); do
+            printf ' '
+        done
+        printf '%s\n' "$(_var_of 'USAGE_DESC_' ${_IDX})"
+    done
+}
diff --git a/testing/home/desktop/.plomlib/retry_until b/testing/home/desktop/.plomlib/retry_until
new file mode 120000
index 0000000..2c75318
--- /dev/null
+++ b/testing/home/desktop/.plomlib/retry_until
@@ -0,0 +1 @@
+../../../scripts/lib/retry_until
\ No newline at end of file
diff --git a/testing/home/t490s/.nonpath_bins/status.sh b/testing/home/t490s/.nonpath_bins/status.sh
index 379ef4a..2de1358 100755
--- a/testing/home/t490s/.nonpath_bins/status.sh
+++ b/testing/home/t490s/.nonpath_bins/status.sh
@@ -2,7 +2,7 @@
 # see sway-bar(5) and swaybar-protocol(7)
 set -e
 
-. "${HOME}/.plomlib.sh/audio_dev_is_mute"
+. "${HOME}/.plomlib/audio_dev_is_mute"
 
 SYSCLASS_DIR=/sys/class