initial commit

This commit is contained in:
Bernardo Magri
2026-04-01 17:06:01 +01:00
parent 12cdfaeeef
commit 33deeb494b
526 changed files with 12287 additions and 1 deletions

18
bin/nomarchy-drive-select Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
# Select a drive from a list with info that includes space and brand. Used by nomarchy-drive-set-password.
if (($# == 0)); then
drives=$(lsblk -dpno NAME | grep -E '/dev/(sd|hd|vd|nvme|mmcblk|xv)')
else
drives="$@"
fi
drives_with_info=""
while IFS= read -r drive; do
[[ -n $drive ]] || continue
drives_with_info+="$(nomarchy-drive-info "$drive")"$'\n'
done <<<"$drives"
selected_drive="$(printf "%s" "$drives_with_info" | gum choose --header "Select drive")" || exit 1
printf "%s\n" "$selected_drive" | awk '{print $1}'