diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2018-08-02 14:30:01 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2018-08-02 14:30:01 -0400 |
| commit | 0013b79d6e0124f157df6304da439ec5771810f7 (patch) | |
| tree | 7c54d7bd8f615c1cc698f84b4ca2520aecea7f0b | |
| parent | 9225981291092f16368cc0db365eeafa2676eec4 (diff) | |
| download | eibhear-0013b79d6e0124f157df6304da439ec5771810f7.tar.gz eibhear-0013b79d6e0124f157df6304da439ec5771810f7.tar.zst eibhear-0013b79d6e0124f157df6304da439ec5771810f7.zip | |
-A added to sudo in mount scripts
| -rwxr-xr-x | .scripts/dmenumount | 6 | ||||
| -rwxr-xr-x | .scripts/dmenuumount | 2 |
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." |
