home · contact · privacy
Move .plomlib.sh to more generally named .plomlib
authorChristian Heller <c.heller@plomlompom.de>
Tue, 15 Apr 2025 11:05:09 +0000 (13:05 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 15 Apr 2025 11:05:09 +0000 (13:05 +0200)
36 files changed:
bookworm/home/all/.bashrc
bookworm/home/all/.plomlib.sh/file_dot_variants [deleted file]
bookworm/home/all/.plomlib/file_dot_variants [new file with mode: 0644]
bookworm/home/all/.profile
bookworm/scripts/lib/setup_users
testing/home/all/.plomlib.sh/file_dot_variants [deleted symlink]
testing/home/all/.plomlib/file_dot_variants [new symlink]
testing/home/desktop/.plomlib.sh/abort [deleted symlink]
testing/home/desktop/.plomlib.sh/abort_if_exists [deleted symlink]
testing/home/desktop/.plomlib.sh/audio_dev_is_mute [deleted file]
testing/home/desktop/.plomlib.sh/constants_borg [deleted symlink]
testing/home/desktop/.plomlib.sh/constants_secrets [deleted symlink]
testing/home/desktop/.plomlib.sh/constants_ssh [deleted symlink]
testing/home/desktop/.plomlib.sh/constants_user [deleted symlink]
testing/home/desktop/.plomlib.sh/expect_min_n_args [deleted symlink]
testing/home/desktop/.plomlib.sh/expect_n_args [deleted symlink]
testing/home/desktop/.plomlib.sh/get_passphrase [deleted symlink]
testing/home/desktop/.plomlib.sh/mount_secrets [deleted symlink]
testing/home/desktop/.plomlib.sh/path_tmp_timestamped [deleted symlink]
testing/home/desktop/.plomlib.sh/print_usage [deleted file]
testing/home/desktop/.plomlib.sh/retry_until [deleted symlink]
testing/home/desktop/.plomlib/abort [new symlink]
testing/home/desktop/.plomlib/abort_if_exists [new symlink]
testing/home/desktop/.plomlib/audio_dev_is_mute [new file with mode: 0644]
testing/home/desktop/.plomlib/constants_borg [new symlink]
testing/home/desktop/.plomlib/constants_secrets [new symlink]
testing/home/desktop/.plomlib/constants_ssh [new symlink]
testing/home/desktop/.plomlib/constants_user [new symlink]
testing/home/desktop/.plomlib/expect_min_n_args [new symlink]
testing/home/desktop/.plomlib/expect_n_args [new symlink]
testing/home/desktop/.plomlib/get_passphrase [new symlink]
testing/home/desktop/.plomlib/mount_secrets [new symlink]
testing/home/desktop/.plomlib/path_tmp_timestamped [new symlink]
testing/home/desktop/.plomlib/print_usage [new file with mode: 0644]
testing/home/desktop/.plomlib/retry_until [new symlink]
testing/home/t490s/.nonpath_bins/status.sh

index 636c40854b8188fcb0d23cf56a7889e545e9f146..e74831500aba0e3919636e85014b46c9970baed9 100644 (file)
@@ -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 (file)
index 1c1bf69..0000000
+++ /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 (file)
index 0000000..1c1bf69
--- /dev/null
@@ -0,0 +1,7 @@
+file_dot_variants() {
+    for FILE in ${1}\.*; do
+        if [ -f "${FILE}" ]; then
+            . "${FILE}"
+        fi
+    done
+}
index 13fa4226a1836873242f7fae74e054f9086c6404..51acedda7cdce77839dc1f920f70ced40b6fbea3 100644 (file)
@@ -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"
index 0d8f21b0b059c703fcfd9e71521c0625ab4a62b1..349c6a3bd353010765662b4411255ce6b5fb9b98 100644 (file)
@@ -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 (symlink)
index f616819..0000000
+++ /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 (symlink)
index 0000000..f616819
--- /dev/null
@@ -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 (symlink)
index 3afad55..0000000
+++ /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 (symlink)
index 8ea409a..0000000
+++ /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 (file)
index e28da40..0000000
+++ /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 (symlink)
index 1cc05f7..0000000
+++ /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 (symlink)
index 85c9977..0000000
+++ /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 (symlink)
index 7b0ccb4..0000000
+++ /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 (symlink)
index 79ec36f..0000000
+++ /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 (symlink)
index 2966623..0000000
+++ /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 (symlink)
index a0925a1..0000000
+++ /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 (symlink)
index 3d542b5..0000000
+++ /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 (symlink)
index 86f3878..0000000
+++ /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 (symlink)
index 0752df5..0000000
+++ /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 (file)
index b1d6204..0000000
+++ /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 (symlink)
index 2c75318..0000000
+++ /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 (symlink)
index 0000000..3afad55
--- /dev/null
@@ -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 (symlink)
index 0000000..8ea409a
--- /dev/null
@@ -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 (file)
index 0000000..e28da40
--- /dev/null
@@ -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 (symlink)
index 0000000..1cc05f7
--- /dev/null
@@ -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 (symlink)
index 0000000..85c9977
--- /dev/null
@@ -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 (symlink)
index 0000000..7b0ccb4
--- /dev/null
@@ -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 (symlink)
index 0000000..79ec36f
--- /dev/null
@@ -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 (symlink)
index 0000000..2966623
--- /dev/null
@@ -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 (symlink)
index 0000000..a0925a1
--- /dev/null
@@ -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 (symlink)
index 0000000..3d542b5
--- /dev/null
@@ -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 (symlink)
index 0000000..86f3878
--- /dev/null
@@ -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 (symlink)
index 0000000..0752df5
--- /dev/null
@@ -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 (file)
index 0000000..b1d6204
--- /dev/null
@@ -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 (symlink)
index 0000000..2c75318
--- /dev/null
@@ -0,0 +1 @@
+../../../scripts/lib/retry_until
\ No newline at end of file
index 379ef4ac2e54aa67b05453a9ba44bd298373ef27..2de135806cf99e8617c3d23425723de8f7c3d9ec 100755 (executable)
@@ -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