aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/menublk
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin/menublk')
-rwxr-xr-xdotfiles/.local/bin/menublk12
1 files changed, 5 insertions, 7 deletions
diff --git a/dotfiles/.local/bin/menublk b/dotfiles/.local/bin/menublk
index 7af7a7f..64d28fd 100755
--- a/dotfiles/.local/bin/menublk
+++ b/dotfiles/.local/bin/menublk
@@ -8,8 +8,6 @@
# Yaroslav de la Peña Smirnov
-. ~/.config/bemenurc
-
readarray -t blkdevs <<< "$(lsblk -r -o NAME,TYPE,FSTYPE,MOUNTPOINT | tail -n +2)"
notify_and_end() {
@@ -59,7 +57,7 @@ mount_dev() {
fstype="$(lsblk -r -o FSTYPE "/dev/$1" | tail -n 1)"
part="/dev/$1"
if [ "$fstype" = "crypto_LUKS" ]; then
- password="$(echo "" | bemenu -p "Enter passphrase for encrypted drive:" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --ff="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")"
+ password="$(echo "" | rofi -dmenu -password -p "Enter passphrase for encrypted drive" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --ff="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")"
if [ -z "$password" ]; then
exit 0
fi
@@ -113,23 +111,23 @@ poweroff_dev() {
fi
}
-action="$(printf "mount\nunmount\npoweroff\n" | bemenu -p "What to do?" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")"
+action="$(printf "mount\nunmount\npoweroff\n" | rofi -dmenu -matching prefix -p "What to do?" )"
case "$action" in
mount)
- blkdev="$(get_mountable | bemenu -p "Choose device to mount:" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")"
+ blkdev="$(get_mountable | rofi -dmenu -p "Choose device to mount" )"
if [ -z "$blkdev" ]; then
exit 0
fi
mount_dev "$blkdev";;
unmount)
- blkdev="$(get_unmountable | bemenu -p "Choose device to umount:" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")"
+ blkdev="$(get_unmountable | rofi -dmenu -p "Choose device to umount" )"
if [ -z "$blkdev" ]; then
exit 0
fi
unmount_dev "$blkdev";;
poweroff)
- blkdev="$(get_usb_storage | bemenu -p "Choose device to power off:" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")"
+ blkdev="$(get_usb_storage | rofi -dmenu -p "Choose device to power off" )"
if [ -z "$blkdev" ]; then
exit 0
fi