aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/mounter
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-08-14 05:46:25 +0300
committerawy <awy@awy.one>2025-08-14 05:46:25 +0300
commit222fe9a9ffc5430ea28173f01482f30b26f22648 (patch)
treed11094fe10c854cd23dfa5f49850e1facfefe116 /.local/bin/mounter
parent9e12eb5b61daa6fc864301893bc6242614777d76 (diff)
downloadhyprdots-222fe9a9ffc5430ea28173f01482f30b26f22648.tar.gz
update
Diffstat (limited to '.local/bin/mounter')
-rwxr-xr-x.local/bin/mounter12
1 files changed, 6 insertions, 6 deletions
diff --git a/.local/bin/mounter b/.local/bin/mounter
index 5828cd9..6d65c2c 100755
--- a/.local/bin/mounter
+++ b/.local/bin/mounter
@@ -23,7 +23,7 @@ lsblkoutput="$(doas lsblk -rpo "uuid,name,type,size,label,mountpoint,fstype")"
allluks="$(echo "$lsblkoutput" | rg crypto_LUKS)"
# Get a list of the LUKS drive UUIDs already decrypted.
decrypted="$(find /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-* | sed "s|.*LUKS2-||;s|-.*||")"
-# Functioning for formatting drives correctly for rofi -dmenu:
+# Functioning for formatting drives correctly for mew:
filter() { sed "s/ /:/g" | awk -F':' '$7==""{printf "%s%s (%s) %s\n",$1,$3,$5,$6}' ; }
# Get only LUKS drives that are not decrypted.
@@ -49,15 +49,15 @@ set -e
test -n "$alldrives"
-# Feed all found drives to rofi -dmenu and get user choice.
-chosen="$(echo "$alldrives" | rofi -dmenu -p "Mount which drive?" -i)"
+# Feed all found drives to mew and get user choice.
+chosen="$(echo "$alldrives" | mew -p "Mount which drive?" -i)"
# Function for prompting user for a mountpoint.
getmount(){
- mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | rofi -dmenu -i -p "Mount this drive where?")"
+ mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | mew -i -p "Mount this drive where?")"
test -n "$mp"
if [ ! -d "$mp" ]; then
- mkdiryn=$(printf "No\\nYes" | rofi -dmenu -i -p "$mp does not exist. Create it?")
+ mkdiryn=$(printf "No\\nYes" | mew -i -p "$mp does not exist. Create it?")
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || doas_askpass mkdir -p "$mp")
fi
}
@@ -94,7 +94,7 @@ case "$chosen" in
done
# Decrypt in a terminal window
- ${TERMINAL:-st} --app-id termfloat -e doas cryptsetup open "$chosen" "usb$num"
+ ${TERMINAL:-st} -a termfloat -e doas cryptsetup open "$chosen" "usb$num"
# Check if now decrypted.
test -b "/dev/mapper/usb$num"