-A added to sudo in mount scripts
This commit is contained in:
parent
9225981291
commit
0013b79d6e
2 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ drives="$(lsblk -rpo "$COLS" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}
|
||||||
[ -z "$drives" ] && exit 1
|
[ -z "$drives" ] && exit 1
|
||||||
chosen="$(echo "$drives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
chosen="$(echo "$drives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
||||||
[ -z "$chosen" ] && exit 1
|
[ -z "$chosen" ] && exit 1
|
||||||
sudo mount "$chosen" && exit 0
|
sudo -A mount "$chosen" && exit 0
|
||||||
# You may want to change the line below for more suggestions for mounting.
|
# You may want to change the line below for more suggestions for mounting.
|
||||||
# I.e. you can increase the depth of the search, or add directories.
|
# I.e. you can increase the depth of the search, or add directories.
|
||||||
# This will increase the load time briefly though.
|
# This will increase the load time briefly though.
|
||||||
|
@ -18,6 +18,6 @@ mp="$(find /mnt /media /mount /home -type d -maxdepth 5 2>/dev/null | dmenu -i -
|
||||||
[ "$mp" = "" ] && exit 1
|
[ "$mp" = "" ] && exit 1
|
||||||
if [ ! -d "$mp" ]; then
|
if [ ! -d "$mp" ]; then
|
||||||
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?")
|
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?")
|
||||||
[ "$mkdiryn" = "Yes" ] && sudo mkdir -p "$mp"
|
[ "$mkdiryn" = "Yes" ] && sudo -A mkdir -p "$mp"
|
||||||
fi
|
fi
|
||||||
sudo mount "$chosen" "$mp" && pgrep -x dunst && notify-send "$chosen mounted to $mp."
|
sudo -A mount "$chosen" "$mp" && pgrep -x dunst && notify-send "$chosen mounted to $mp."
|
||||||
|
|
|
@ -9,4 +9,4 @@ drives=$(lsblk -rpo "$COLS" | awk '$2=="part"&&$4!~/boot|home|SWAP/&&length($4)>
|
||||||
[ -z "$drives" ] && exit
|
[ -z "$drives" ] && exit
|
||||||
chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
|
chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
|
||||||
[ -z "$chosen" ] && exit
|
[ -z "$chosen" ] && exit
|
||||||
sudo umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
|
sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
|
||||||
|
|
Loading…
Add table
Reference in a new issue