Del código fuente -:gnome -el reloj parece usar dos archivos de sonido -:
En mi sistema, estos archivos están en la carpeta /usr/share/sounds/freedesktop/stereo
.
Por lo tanto, podría hacer una copia de seguridad -de los dos archivos de sonido -originales y reemplazarlos por otros archivos de sonido -(preferiblemente de la misma carpeta ).
Вот что у меня есть. Это не идеально, но:
chpwd
и chpwd_functions
и думаю восстановить их правильно; Он выглядит сложным и хрупким, поэтому я не совсем уверен в крайних случаях. Известные проблемы:
/
для каталога. Например, вкладкаcd1 / echo /bi
вставляет n/
, ноcd1 / echo bi
вкладка вставляет только n
(, тогда какecho bi
вкладка вставляетn/
). #compdef cd1 cd1_glob
# cd for one command
_cd1_in () {
setopt local_options local_traps
# Cleanup:
# * Restore the old directory. We do this only if cd succeeded beause
# the restoration can do the wrong thing in corner cases (renamed
# directory).
# * Restore the chpwd hook function and the hook array.
trap 'if ((_cd1_cd_succeeded)); then cd $OLDPWD; fi
if [[ -n $_cd1_chpwd_function ]]; then
functions[chpwd]=$_cd1_chpwd_function
fi
' EXIT INT
builtin cd $words[2] 2>/dev/null || { _cd1_cd_succeeded=0; return 1; }
shift 2 words; ((CURRENT -= 2))
_normal
}
_cd1 () {
if ((CURRENT > 2)); then
setopt local_options no_auto_pushd unset
local _cd1_cd_succeeded=1
# Save the current directory and the chpwd hook. They will be restored
# by the exit trap in _cd1_in.
local _cd1_chpwd_function=$functions[chpwd]
# Save the current directory in $OLDPWD. _cd_in will call cd, which would
# generally call cd
local OLDPWD=$PWD
# Turn off the chpwd hook function and the associated hook array.
local chpwd_functions=
unset -f chpwd 2>/dev/null
# Call a separate function to do the work. Its exit trap will take care
# of cleanup. The reason to have a separate function is so that the
# local variables defined here can be used in the exit trap.
_cd1_in
else
_dirs
fi
}
_cd1 "$@"