dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 0013b79d6e0124f157df6304da439ec5771810f7
parent 9225981291092f16368cc0db365eeafa2676eec4
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Thu,  2 Aug 2018 14:30:01 -0400

-A added to sudo in mount scripts

Diffstat:
M.scripts/dmenumount | 6+++---
M.scripts/dmenuumount | 2+-
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 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 @@ -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."