Files
iceyrazor b95ae4c5c9 - moved system scripts to here
- config changes
- fixed my backup scripts. rsync -a
- added dmenu script
- fixed finds in env.sh
2025-06-30 00:05:45 -05:00

36 lines
597 B
Bash
Executable File

#!/bin/bash
sudo="sudo"
[ doas ] && sudo="doas"
umo=0
while getopts "u" opt; do
case "$opt" in
u) umo=1
;;
esac
done
shift $((OPTIND-1))
[ "${1:-}" = "--" ] && shift
if [ $umo == 1 ]; then
nf=4
else
nf=3
fi
parts="$(lsblk -rno path,size,type,mountpoint | grep -e part -e lvm | awk "NF==$nf {print \$1, \$2, \$3, \$4}")"
# choice="$(printf "$parts" | rofi -dmenu "beans" | sed 's/ .*//')"
choice="$(printf "$parts" | fzf | sed 's/ .*//')"
[ "$choice" == "" ] && exit 0
if [ $umo == 1 ]; then
$sudo umount $choice
else
$sudo mount $choice ~/u
fi