From 556b8cb7d8180b23bb9ada8d6d16dd5e790cb1f4 Mon Sep 17 00:00:00 2001 From: Jeremiah Ticket Date: Tue, 26 Sep 2023 06:38:02 -0600 Subject: [PATCH] Added a window close sound to the sound script. --- scripts/sound.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/sound.py b/scripts/sound.py index 85d971a..85523f2 100755 --- a/scripts/sound.py +++ b/scripts/sound.py @@ -12,6 +12,9 @@ i3 = i3ipc.Connection() def on_new_window(self,i3): system('play -n synth .25 sin 440:880 sin 480:920 remix - norm -3 pitch -500 &') +def on_close_window(self,i3): + system('play -n synth .25 sin 880:440 sin 920:480 remix - norm -3 pitch -500 &') + def on_mode(self,event): mode= event.change if mode == 'ratpoison': @@ -42,6 +45,7 @@ def on_fullscreen(self,i3): i3 = i3ipc.Connection() i3.on('window::new', on_new_window) +i3.on('window::close', on_close_window) i3.on(Event.MODE, on_mode) i3.on('workspace::focus', on_workspace_focus) i3.on('window::move', on_workspace_move)