4 ms·
I’ve set my shell to discreetly play the sound of a mouse button click upon completion of any command that ran for longer than 20 seconds. That choice of sound
by aendruk 2y ago
I’ve set my shell to discreetly play the sound of a mouse button click upon completion of any command that ran for longer than 20 seconds. That choice of sound has the convenient effect that no one else seems to consciously notice it.
- idreyn 2y agoBeen thinking about this. Do you have a snippet you can share?
- aendruk 2y agoZSH plugin: _click_preexec() { _click_start_seconds=${_click_start_seconds:-$SECONDS} } _click_precmd() { [[ $+_click_start_seconds ]] || return if (( SECONDS - _click_start_seconds >= 20 )); then pw-play 'mouse_click.wav' &! fi unset _click_start_seconds } preexec_functions+=(_click_preexec) precmd_functions+=(_click_precmd) Mouse click sound: https://freesound.org/s/223445 https://freesound.org/s/223445