From 275beaa95ad47432f72cf6796930837c7441bfae Mon Sep 17 00:00:00 2001 From: "Ivan K. Boikov" Date: Sat, 25 Jan 2025 19:17:06 +0100 Subject: Less emoji-cringe --- scripts/.local/bin/dmnt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/.local/bin/dmnt') diff --git a/scripts/.local/bin/dmnt b/scripts/.local/bin/dmnt index 7175b6e..8183162 100755 --- a/scripts/.local/bin/dmnt +++ b/scripts/.local/bin/dmnt @@ -44,11 +44,11 @@ $normalparts" | sed "/^$/d;s/ *$//")" test -n "$alldrives" # Feed all found drives to dmenu and get user choice. -chosen="$(echo "$alldrives" | $DMENU -l 16 -p "Mount which drive?" -i)" +chosen="$(echo "$alldrives" | $DMENU -l 16 -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 | $DMENU -i -p "Mount this drive where?")" + mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | $DMENU -i -p "Set mount point")" test -n "$mp" if [ ! -d "$mp" ]; then mkdiryn=$(printf "No\\nYes" | $DMENU -i -p "$mp does not exist. Create it?") @@ -59,7 +59,7 @@ getmount(){ attemptmount(){ # Attempt to mount without a mountpoint, to see if drive is in fstab. sudo -A mount "$1" || return 1 - notify-send "💾Drive Mounted." "$chosen mounted." + notify-send "Drive mounted" "$chosen" exit } @@ -69,7 +69,7 @@ case "$chosen" in chosen="${chosen:1}" # This is a bashism. attemptmount "$chosen" || getmount sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)" - notify-send "💾Drive Mounted." "$chosen mounted to $mp." + notify-send "Drive mounted" "$chosen -> $mp." ;; 🔒*) @@ -104,16 +104,16 @@ case "$chosen" in sudo -A mount -o uid="$(id -u)",gid="$(id -g)" "/dev/mapper/usb$num" "$mp" fi - notify-send "🔓Decrypted drive Mounted." "$chosen decrypted and mounted to $mp." + notify-send "Drive mounted" "$chosen -> $mp" ;; 📱*) - notify-send "❗Note" "Remember to allow file access on your phone now." + notify-send "Allow file access on your phone" getmount chosen="${chosen%%:*}" chosen="${chosen:1}" # This is a bashism. sudo -A simple-mtpfs -o allow_other --device "$chosen" "$mp" - notify-send "🤖 Android Mounted." "Android device mounted to $mp." + notify-send "Android mounted" "$mp" ;; esac -- cgit v1.2.3