home · contact · privacy
Reorganize. master
authorChristian Heller <c.heller@plomlompom.de>
Sun, 23 Mar 2025 22:38:17 +0000 (23:38 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 23 Mar 2025 22:38:17 +0000 (23:38 +0100)
testing/home/all/.bashrc
testing/home/all/.nonpath_bins/plomlib.file_dot_variants [new file with mode: 0644]
testing/home/all/.nonpath_bins/plomlib.sh [deleted file]
testing/home/all/.profile
testing/home/desktop/.local/bin/borgplom
testing/home/desktop/.local/bin/vol
testing/home/desktop/.nonpath_bins/plomlib.audio_dev_is_mute [new file with mode: 0644]
testing/home/desktop/.nonpath_bins/plomlib.get_passphrase [new file with mode: 0644]
testing/home/desktop/.nonpath_bins/plomlib.sh.desktop [deleted file]
testing/home/t490s/.nonpath_bins/status.sh
testing/scripts/setup_secrets.sh

index 851118b9cd8841bf33f7cabd6118c40abd593b5c..115837e36d8c284027ebda734286b77bc092ba74 100644 (file)
@@ -25,4 +25,5 @@ PS3="${tput_color}select: ${tput_reset}"
 PS4="${tput_color}+ ${tput_reset}"
 
 # include others
 PS4="${tput_color}+ ${tput_reset}"
 
 # include others
-dot_shell_file_variants "${HOME}/\.bashrc"
+. "${HOME}/.nonpath_bins/plomlib.file_dot_variants"
+file_dot_variants "${HOME}/\.bashrc"
diff --git a/testing/home/all/.nonpath_bins/plomlib.file_dot_variants b/testing/home/all/.nonpath_bins/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
+}
diff --git a/testing/home/all/.nonpath_bins/plomlib.sh b/testing/home/all/.nonpath_bins/plomlib.sh
deleted file mode 100644 (file)
index a5b1cb0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-dot_shell_file_variants () {
-    for FILE in ${1}\.*; do
-        if [ -f "${FILE}" ]; then
-            . "${FILE}"
-        fi
-    done
-}
-
-dot_shell_file_variants "${HOME}/.nonpath_bins/plomlib.sh"
index fb0e2a43053b6028507afcef4c139c039afdf918..d4f1e09d7cfbcf9ba39b82b058f451204a9a8335 100644 (file)
@@ -7,9 +7,6 @@
 # useful for providing environment variables to non-shell applications started
 # within a login session.
 
 # useful for providing environment variables to non-shell applications started
 # within a login session.
 
-# for: dot_shell_file_variants
-. "${HOME}"/.nonpath_bins/plomlib.sh
-
 eval $(ssh-agent) && ssh-add
 
 PATH_BASHRC="${HOME}/.bashrc"
 eval $(ssh-agent) && ssh-add
 
 PATH_BASHRC="${HOME}/.bashrc"
@@ -22,4 +19,5 @@ PATH_LOCAL_BIN="${HOME}/.local/bin"
 export PATH
 
 # include others
 export PATH
 
 # include others
-dot_shell_file_variants "${HOME}/\.profile"
+. "${HOME}/.nonpath_bins/plomlib.file_dot_variants"
+file_dot_variants "${HOME}/\.profile"
index 8a9eead05954a9fed6697a3282d6787f28f11047..d9511b43659283a9a9d12a3347bd60c71d46eb17 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/sh
 set -e
 
 #!/bin/sh
 set -e
 
-. "${HOME}/.nonpath_bins/plomlib.sh"
-# for: get_passphrase
+. "${HOME}/.nonpath_bins/plomlib.get_passphrase"
 
 PATH_BORGKEYS="${HOME}/.config/borg/keys"
 NAME_REPO=borg
 
 PATH_BORGKEYS="${HOME}/.config/borg/keys"
 NAME_REPO=borg
index 0ae80778298e96db205565517f257bab8171e78e..cf49262176c02dcf20df08aec8f6f3b947dad83a 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/sh
 set -e
 
 #!/bin/sh
 set -e
 
-. "${HOME}/.nonpath_bins/plomlib.sh"
-# for: audio_dev_is_mute
+. "${HOME}/.nonpath_bins/plomlib.audio_dev_is_mute"
 
 MAX_LOUDNESS=150
 
 
 MAX_LOUDNESS=150
 
diff --git a/testing/home/desktop/.nonpath_bins/plomlib.audio_dev_is_mute b/testing/home/desktop/.nonpath_bins/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/.nonpath_bins/plomlib.get_passphrase b/testing/home/desktop/.nonpath_bins/plomlib.get_passphrase
new file mode 100644 (file)
index 0000000..6e3f0ff
--- /dev/null
@@ -0,0 +1,6 @@
+get_passphrase() {
+    stty -echo
+    read PASSPHRASE
+    stty echo
+    printf "${PASSPHRASE}"
+}
diff --git a/testing/home/desktop/.nonpath_bins/plomlib.sh.desktop b/testing/home/desktop/.nonpath_bins/plomlib.sh.desktop
deleted file mode 100644 (file)
index e50a77b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-get_passphrase() {
-    stty -echo
-    read PASSPHRASE
-    stty echo
-    printf "${PASSPHRASE}"
-}
-
-audio_dev_is_mute() {
-    [ "$(pactl get-sink-mute 0)" = "Mute: yes" ]
-}
index e353f694cd5f6f78206bac73efb9654194715df1..9794d2e2d10ff83e75f74d2fedf199d460b52b54 100755 (executable)
@@ -2,8 +2,7 @@
 # see sway-bar(5) and swaybar-protocol(7)
 set -e
 
 # see sway-bar(5) and swaybar-protocol(7)
 set -e
 
-. "${HOME}/.nonpath_bins/plomlib.sh"
-# for: audio_dev_is_mute
+. "${HOME}/.nonpath_bins/plomlib.audio_dev_is_mute"
 
 SYSCLASS_DIR=/sys/class
 
 
 SYSCLASS_DIR=/sys/class
 
index ea805010b0406dbf968541b0fc81b3aec19891a5..6135927801b80426740cb0ce2a293c8d92802318 100755 (executable)
@@ -14,8 +14,7 @@ cd $(dirname "$0")
 # - PATH_USER_HOME
 # - USERNAME
 
 # - PATH_USER_HOME
 # - USERNAME
 
-. "${PATH_USER_HOME}/.nonpath_bins/plomlib.sh.desktop"
-# for: get_passphrase
+. "${PATH_USER_HOME}/.nonpath_bins/plomlib.get_passphrase"
 
 PATH_REL_SECRETS=to_usb
 export PATH_SECRETS="${PATH_USER_HOME}/${PATH_REL_SECRETS}"
 
 PATH_REL_SECRETS=to_usb
 export PATH_SECRETS="${PATH_USER_HOME}/${PATH_REL_SECRETS}"