diff options
author | Mateja <mail@matejamaric.com> | 2021-02-13 12:02:23 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-02-13 12:02:23 +0100 |
commit | 8b3518d50396f62660d2d68e6dfdc8c662d7bc7a (patch) | |
tree | 19aeda03be684082a03625173324890934ddf0c0 | |
parent | 1d4decc51cf0cadb1ae0eb2c0510a43d4ebd4670 (diff) | |
download | dotfiles-8b3518d50396f62660d2d68e6dfdc8c662d7bc7a.tar.gz dotfiles-8b3518d50396f62660d2d68e6dfdc8c662d7bc7a.zip |
Make `unmount_usb.sh` use Rofi.rofi
-rwxr-xr-x | .local/bin/unmount_usb.sh | 6 |
1 files changed, 5 insertions, 1 deletions
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 |