diff options
Diffstat (limited to 'ar/.local')
| -rwxr-xr-x | ar/.local/bin/ecrypt | 2 | ||||
| -rwxr-xr-x | ar/.local/bin/mounter | 8 | ||||
| -rwxr-xr-x | ar/.local/bin/statusbar/sb-ecrypt | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/ar/.local/bin/ecrypt b/ar/.local/bin/ecrypt index 4240c71..d16d746 100755 --- a/ar/.local/bin/ecrypt +++ b/ar/.local/bin/ecrypt @@ -25,7 +25,7 @@ attempt_mount() { } targets="$HOME/.secret" -mounts="$HOME/Private" +mounts="$HOME/Secret" pw="default" [ -d "$targets" ] || mkdir -p "$targets" [ -d "$mounts" ] || mkdir -p "$mounts" diff --git a/ar/.local/bin/mounter b/ar/.local/bin/mounter index c8eabbf..e62f61b 100755 --- a/ar/.local/bin/mounter +++ b/ar/.local/bin/mounter @@ -83,6 +83,13 @@ done | filter)" # Get all normal, non-encrypted or decrypted partitions that are not mounted. normalparts="$(echo "$lsblkoutput" | grep -v crypto_LUKS | grep -v 'LVM2_member' | grep -v 'part 1M' | grep 'part\|rom\|crypt' | sed "s/^/💾 /" | filter)" +# Get unpartitioned raw disks (disks with no partition children that are not mounted). +rawdisks="$(echo "$lsblkoutput" | awk ' + $3=="disk" {disks[$2]=$0} + $3=="part" {dev=$2; gsub(/p?[0-9]+$/, "", dev); haspart[dev]=1} + END {for (d in disks) if (!(d in haspart)) print disks[d]} +' | sed "s/^/💾 /" | filter)" + # Get all available IP addresses with open Samba shares in the wlan0 subnet, excluding eth0 IP smbips="$(sudo arp-scan --interface=eth0 --interface=wlan0 --localnet | grep -vEi '(EFM Networks|DUP:)' | awk '/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/{print $1}')" @@ -140,6 +147,7 @@ alldrives="$(echo "$phones $iphones $unopenedluks $normalparts +$rawdisks $smbs" | sed "/^$/d;s/ *$//")" # Quit the script if a sequential command fails. diff --git a/ar/.local/bin/statusbar/sb-ecrypt b/ar/.local/bin/statusbar/sb-ecrypt index f07b994..9ba6e26 100755 --- a/ar/.local/bin/statusbar/sb-ecrypt +++ b/ar/.local/bin/statusbar/sb-ecrypt @@ -7,4 +7,4 @@ case $BLOCK_BUTTON in 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac -mount | grep -q "$HOME/Private" && echo "🔑" || echo "🔒" +mount | grep -q "$HOME/Secret" && echo "🔑" || echo "🔒" |
