From 8b3518d50396f62660d2d68e6dfdc8c662d7bc7a Mon Sep 17 00:00:00 2001 From: Mateja Date: Sat, 13 Feb 2021 12:02:23 +0100 Subject: Make `unmount_usb.sh` use Rofi. --- .local/bin/unmount_usb.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.local/bin/unmount_usb.sh b/.local/bin/unmount_usb.sh index 764365c..1c257a8 100755 --- a/.local/bin/unmount_usb.sh +++ b/.local/bin/unmount_usb.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +shopt -s expand_aliases +# alias usb_prompt='dmenu -p' +alias usb_prompt='rofi -dmenu -p' + options=$(lsblk | grep /media/$USER | rev | cut -d ' ' -f 1 | rev) [ -n "$options" ] && opt_num=$(echo "$options" | wc -l) || opt_num=0 if [ $opt_num == 0 ]; then @@ -7,6 +11,6 @@ if [ $opt_num == 0 ]; then elif [ $opt_num == 1 ]; then udiskie-umount "$options" else - unmount_device=$(echo "$options" | dmenu -p "What device you want to unmount?") + unmount_device=$(echo "$options" | usb_prompt "What device you want to unmount?") [[ ! -z "$unmount_device" ]] && udiskie-umount "$unmount_device" fi -- cgit v1.2.3