3 usb
=$
(lsblk
--noheadings --raw -o NAME
,SIZE |\
5 dmenu
-i -p "choose disk"|\
7 if [ ! "$usb" ]; then exit;fi
9 wipe
=$
(printf "no\nyes" |\
10 dmenu
-p "WARNING wipe $usb" -nb "#000" -nf "#FFF" -sb "#FF0000" -sf "#FFF")
12 dmenu
-P -p "sudo " |\
13 sudo
-S -- sh
-c "if [ $wipe = yes ] ; then\
14 dd bs=4M if=/dev/urandom of=/dev/$usb status=progress oflag=sync;fi;\
15 printf \"o\nn\np\n1\n2048\n\nw\n\" | sudo fdisk /dev/$usb;\
16 sudo mkfs.ext4 /dev/${usb}1 && notify-send 'formated ''$usb'"