aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/menublk
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-05-18 01:17:06 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-05-18 01:17:06 +0300
commita36aadab60c09bff3a055b0442971aa5e8a87a27 (patch)
tree0026c02065a0cf35478386312aeb5cb732192469 /dotfiles/.local/bin/menublk
parent484181c25cba61469254e24bff578cff5189c8a7 (diff)
downloadswayrice-a36aadab60c09bff3a055b0442971aa5e8a87a27.tar.gz
swayrice-a36aadab60c09bff3a055b0442971aa5e8a87a27.zip
WIP: rofi
* Moved basically all menu scripts to use rofi * Updated some custom desktop entries * Updated list of packages. TODO: make a better installer script/package list. * Removed some old and extraneous scripts. * Other minor changes to config.
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..499fe5d 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 -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 -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