Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iTerm2 trigger on bell

Tags:

iterm2

I'd like to trigger an action whenever I receive a bell character.

Currently I have a trigger with \a as the regular expression and "bounce dock icon" as the action. When I echo \a I can see the visual bell notification but the trigger does not bounce the dock icon. What am I doing wrong?

iterm2 preferences

like image 208
Nick Tomlin Avatar asked Mar 14 '26 11:03

Nick Tomlin


1 Answers

Bouncing the Dock Icon only works if the application is not currently the active app.

Try this in your shell:

sleep 2 ; echo ^G # Ctrl-v + Ctrl-g

After you press return on the line, switch to another application within 2 seconds... The iTerm dock icon will bounce to notify you that iTerm received a BEL and needs your attention.

enter image description here

like image 186
SushiHangover Avatar answered Mar 17 '26 04:03

SushiHangover



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!