summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.scripts/dmenumount6
-rwxr-xr-x.scripts/dmenuumount2
2 files changed, 4 insertions, 4 deletions
diff --git a/.scripts/dmenumount b/.scripts/dmenumount
index aeb9916..91683e6 100755
--- a/.scripts/dmenumount
+++ b/.scripts/dmenumount
@@ -10,7 +10,7 @@ drives="$(lsblk -rpo "$COLS" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}
[ -z "$drives" ] && exit 1
chosen="$(echo "$drives" | dmenu -i -p "Mount which drive?" | awk '{print $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.
# I.e. you can increase the depth of the search, or add directories.
# 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
if [ ! -d "$mp" ]; then
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
-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."
diff --git a/.scripts/dmenuumount b/.scripts/dmenuumount
index df40ae9..8d0928a 100755
--- a/.scripts/dmenuumount
+++ b/.scripts/dmenuumount
@@ -9,4 +9,4 @@ drives=$(lsblk -rpo "$COLS" | awk '$2=="part"&&$4!~/boot|home|SWAP/&&length($4)>
[ -z "$drives" ] && exit
chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
[ -z "$chosen" ] && exit
-sudo umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
+sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."