aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/mounter
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-07-30 20:30:23 +0300
committerawy <awy@awy.one>2025-07-30 20:30:23 +0300
commit6a42018cf2d55f9a8e8f9809415556cd50028590 (patch)
tree93e6871b100832b6fd0942e4586729c7580270a3 /.local/bin/mounter
parentbd77fbce81efc16fc91dd7cc9d9807e27d70d064 (diff)
downloadhyprdots-6a42018cf2d55f9a8e8f9809415556cd50028590.tar.gz
rofi
Diffstat (limited to '.local/bin/mounter')
-rwxr-xr-x.local/bin/mounter10
1 files changed, 5 insertions, 5 deletions
diff --git a/.local/bin/mounter b/.local/bin/mounter
index 6d65c2c..b8b3ab2 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 mew:
+# Functioning for formatting drives correctly for rofi -dmenu:
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 mew and get user choice.
-chosen="$(echo "$alldrives" | mew -p "Mount which drive?" -i)"
+# Feed all found drives to rofi -dmenu and get user choice.
+chosen="$(echo "$alldrives" | rofi -dmenu -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 | mew -i -p "Mount this drive where?")"
+ mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | rofi -dmenu -i -p "Mount this drive where?")"
test -n "$mp"
if [ ! -d "$mp" ]; then
- mkdiryn=$(printf "No\\nYes" | mew -i -p "$mp does not exist. Create it?")
+ mkdiryn=$(printf "No\\nYes" | rofi -dmenu -i -p "$mp does not exist. Create it?")
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || doas_askpass mkdir -p "$mp")
fi
}