aboutsummaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-02-13 12:02:23 +0100
committerMateja <mail@matejamaric.com>2021-02-13 12:02:23 +0100
commit8b3518d50396f62660d2d68e6dfdc8c662d7bc7a (patch)
tree19aeda03be684082a03625173324890934ddf0c0 /.local/bin
parent1d4decc51cf0cadb1ae0eb2c0510a43d4ebd4670 (diff)
downloaddotfiles-8b3518d50396f62660d2d68e6dfdc8c662d7bc7a.tar.gz
dotfiles-8b3518d50396f62660d2d68e6dfdc8c662d7bc7a.zip
Make `unmount_usb.sh` use Rofi.rofi
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/unmount_usb.sh6
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