Option to disable audio bell
This commit is contained in:
parent
d96c7d71a7
commit
f7cb3e3f9e
@ -160,6 +160,7 @@ type_map = {
|
|||||||
'window_border_width': float,
|
'window_border_width': float,
|
||||||
'wheel_scroll_multiplier': float,
|
'wheel_scroll_multiplier': float,
|
||||||
'visual_bell_duration': float,
|
'visual_bell_duration': float,
|
||||||
|
'enable_audio_bell': to_bool,
|
||||||
'click_interval': float,
|
'click_interval': float,
|
||||||
'mouse_hide_wait': float,
|
'mouse_hide_wait': float,
|
||||||
'cursor_blink_interval': float,
|
'cursor_blink_interval': float,
|
||||||
|
|||||||
@ -91,6 +91,9 @@ repaint_delay 10
|
|||||||
# seconds. Set to zero to disable.
|
# seconds. Set to zero to disable.
|
||||||
visual_bell_duration 0.0
|
visual_bell_duration 0.0
|
||||||
|
|
||||||
|
# Enable/disable the audio bell. Useful in environments that require silence.
|
||||||
|
enable_audio_bell yes
|
||||||
|
|
||||||
# The modifier keys to press when clicking with the mouse on URLs to open the URL
|
# The modifier keys to press when clicking with the mouse on URLs to open the URL
|
||||||
open_url_modifiers ctrl+shift
|
open_url_modifiers ctrl+shift
|
||||||
|
|
||||||
|
|||||||
@ -108,6 +108,7 @@ class Window:
|
|||||||
wakeup()
|
wakeup()
|
||||||
|
|
||||||
def bell(self):
|
def bell(self):
|
||||||
|
if self.opts.enable_audio_bell:
|
||||||
try:
|
try:
|
||||||
with open('/dev/tty', 'wb') as f:
|
with open('/dev/tty', 'wb') as f:
|
||||||
f.write(b'\007')
|
f.write(b'\007')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user