fix: fix dmenu(u)mount emoticons

This commit is contained in:
David 2020-09-06 21:49:21 +02:00
parent 1c54c9363c
commit eceb0c921b
2 changed files with 5 additions and 5 deletions

View File

@ -31,13 +31,13 @@ mountusb() { \
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; *) sudo -A mount "$chosen" "$mp"; user="$(whoami)";
ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
esac esac
notify-send " USB mounting" "$chosen mounted to $mp." notify-send " USB mounting" "$chosen mounted to $mp."
} }
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')" usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')"
if [ -z "$usbdrives" ]; then if [ -z "$usbdrives" ]; then
notify-send -u "critical" -t 3000 " USB ERROR" "No drive to mount." notify-send -u "critical" -t 3000 " USB ERROR" "No drive to mount."
else else
notify-send "USB drive(s) detected." notify-send "USB drive(s) detected."
mountusb mountusb

View File

@ -16,9 +16,9 @@ if [ -z "$chosen" ]; then
exit exit
else else
if sudo -A umount "$chosen" ; then if sudo -A umount "$chosen" ; then
notify-send " USB unmounting" "$chosen unmounted." notify-send " USB unmounting" "$chosen unmounted."
else else
notify-send -u "critical" -t 3000 " USB ERROR" "Unmounting failed." notify-send -u "critical" -t 3000 " USB ERROR" "Unmounting failed."
fi fi
fi fi
} }
@ -27,7 +27,7 @@ usbdrives=$(lsblk -nrpo "name,type,size,mountpoint" | awk \
'$2=="part"&&$4!~/\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}') '$2=="part"&&$4!~/\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}')
if [ -z "$usbdrives" ]; then if [ -z "$usbdrives" ]; then
notify-send -u "critical" -t 3000 " USB ERROR" "No drive to unmount." notify-send -u "critical" -t 3000 " USB ERROR" "No drive to unmount."
else else
unmountusb unmountusb
fi fi