diff options
Diffstat (limited to 'modules/scripts')
| -rw-r--r-- | modules/scripts/gopass-ssh-load/script.sh | 3 | ||||
| -rw-r--r-- | modules/scripts/gpg-backup/script.sh | 2 | ||||
| -rw-r--r-- | modules/scripts/neomutt-sync/script.sh | 10 | ||||
| -rw-r--r-- | modules/scripts/screen-recording/script.sh | 6 | ||||
| -rw-r--r-- | modules/scripts/yazi-file-chooser/script.sh | 14 |
5 files changed, 17 insertions, 18 deletions
diff --git a/modules/scripts/gopass-ssh-load/script.sh b/modules/scripts/gopass-ssh-load/script.sh index 43c83b0..be7d9d1 100644 --- a/modules/scripts/gopass-ssh-load/script.sh +++ b/modules/scripts/gopass-ssh-load/script.sh @@ -16,8 +16,7 @@ if ssh-add -l 2>/dev/null | grep -qE "(ED25519|RSA|ECDSA)"; then exit 0 fi -# GOPASS_SSH_KEYS: space-separated list of gopass entry names under ssh/ -# e.g. GOPASS_SSH_KEYS="github gitlab work-server" +# GOPASS_SSH_KEYS holds a space-separated list of gopass entry names under ssh if [ -z "${GOPASS_SSH_KEYS:-}" ]; then echo "Error: GOPASS_SSH_KEYS is not set. Example: GOPASS_SSH_KEYS=\"github gitlab\"" >&2 exit 1 diff --git a/modules/scripts/gpg-backup/script.sh b/modules/scripts/gpg-backup/script.sh index 0d74d1c..c8e7363 100644 --- a/modules/scripts/gpg-backup/script.sh +++ b/modules/scripts/gpg-backup/script.sh @@ -126,7 +126,7 @@ do_import() { echo " Run 'gpg --list-secret-keys' to confirm." } -# --- main --- +# Main if [[ $# -ne 2 ]]; then usage diff --git a/modules/scripts/neomutt-sync/script.sh b/modules/scripts/neomutt-sync/script.sh index b2db42a..02e03e7 100644 --- a/modules/scripts/neomutt-sync/script.sh +++ b/modules/scripts/neomutt-sync/script.sh @@ -26,9 +26,9 @@ button_key_inactive_color = (YELLOW,BLACK,OFF) button_label_inactive_color = (YELLOW,BLACK,OFF) EOF -# 2. Run the sync and indexing progress bar +# Run the sync and indexing progress bar ( - # --- PHASE 1: mbsync --- + # mbsync phase script -q -e -c "mbsync -a" /dev/null | awk -v RS='\r' ' { c_str = "" @@ -47,15 +47,15 @@ EOF fflush() }' - # --- PHASE 2: notmuch --- + # notmuch phase printf "XXX\n100\nIndexing new mail with notmuch...\nXXX\n" notmuch new > "$NOTMUCH_LOG" 2>&1 ) | dialog --title "$TITLE" --gauge "Initializing..." 8 80 0 -# 3. Format the captured notmuch output into a single clean line +# Format the captured notmuch output into a single clean line CLEAN_OUT=$(tr '\n' ' ' < "$NOTMUCH_LOG" | sed 's/ */ /g') -# 4. Display final results and wait for user input (Enter/Esc) to dismiss +# Display final results and wait for user input dialog --title "$TITLE" --msgbox "Done!\n$CLEAN_OUT" 8 80 clear diff --git a/modules/scripts/screen-recording/script.sh b/modules/scripts/screen-recording/script.sh index c2dafbe..dad0483 100644 --- a/modules/scripts/screen-recording/script.sh +++ b/modules/scripts/screen-recording/script.sh @@ -7,7 +7,7 @@ YELLOW='\033[1;33m' RED='\033[0;31m' NC='\033[0m' -# --- 1. ARGUMENT PARSING --- +# Argument parsing SELECT_MODE=false while [[ "$#" -gt 0 ]]; do case $1 in @@ -16,7 +16,7 @@ while [[ "$#" -gt 0 ]]; do shift done -# --- 2. GEOMETRY SELECTION --- +# Geometry selection GEOMETRY="" if [ "$SELECT_MODE" = true ]; then @@ -34,7 +34,7 @@ if [ "$SELECT_MODE" = true ]; then fi fi -# --- 3. START RECORDING --- +# Start recording FILENAME="$OUT_DIR/recording-$(date +%Y%m%d-%H%M%S).mp4" echo -e "${GREEN}Recording started!${NC}" diff --git a/modules/scripts/yazi-file-chooser/script.sh b/modules/scripts/yazi-file-chooser/script.sh index e02c742..5e4b229 100644 --- a/modules/scripts/yazi-file-chooser/script.sh +++ b/modules/scripts/yazi-file-chooser/script.sh @@ -1,8 +1,8 @@ -# $1 = multiple selection (1/0) -# $2 = directory select mode (1/0) -# $3 = save file mode (1/0) -# $4 = initial directory path -# $5 = output path file (where portal expects selected paths) +# $1 toggles multiple selection +# $2 toggles directory select mode +# $3 toggles save file mode +# $4 is the initial directory path +# $5 is the output path file # multiple="$1" directory="$2" @@ -12,9 +12,9 @@ out="$5" # Pick directory vs single/multiple file if [ "$directory" = "1" ]; then - # --cwd-file outputs the final working directory path when exiting + # Outputs the final working directory path on exit exec yazi "$path" --cwd-file="$out" else - # --chooser-file writes all selected file path(s) to $out on exit + # Writes all selected file paths to the output file on exit exec yazi "$path" --chooser-file="$out" fi |
