This commit is contained in:
parent
c449dfcb5f
commit
559939e2f4
49 changed files with 729 additions and 252 deletions
14
.config/zsh/cd_hooks/higpu_mount
Normal file
14
.config/zsh/cd_hooks/higpu_mount
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# shellcheck disable=SC2168
|
||||
|
||||
local DIRNAME="$HOME/Services/gpu"
|
||||
local MOUNT_DIRNAME="$DIRNAME/.volumes"
|
||||
|
||||
cd::enter() {
|
||||
! mount | grep -q "$MOUNT_DIRNAME" && mount "$MOUNT_DIRNAME"
|
||||
}
|
||||
|
||||
cd::leave() {
|
||||
! fuser "$DIRNAME" >/dev/null 2>&1 && umount "$MOUNT_DIRNAME"
|
||||
}
|
||||
|
||||
# vim: ft=sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue