Updated sound script(still broken)
This commit is contained in:
parent
400722ca1d
commit
49601a56be
@ -7,15 +7,16 @@ import os
|
|||||||
import i3ipc
|
import i3ipc
|
||||||
|
|
||||||
|
|
||||||
def play_sound(self, i3, event, sounds = sounds):
|
|
||||||
os.system(sounds[event]
|
|
||||||
|
|
||||||
|
|
||||||
# sound command dictionary
|
# sound command dictionary
|
||||||
sounds = {'newWindow': 'play -n synth .25 sin 440:880 sin 480:920 remix - norm -3 pitch -500',
|
sounds = {'newWindow': 'play -n synth .25 sin 440:880 sin 480:920 remix - norm -3 pitch -500',
|
||||||
'modeKey': 'play -qV0 "|sox -np synth .07 sq 400" "|sox -np synth .5 sq 800" fade h 0 .5 .5 norm -20',
|
'modeKey': 'play -qV0 "|sox -np synth .07 sq 400" "|sox -np synth .5 sq 800" fade h 0 .5 .5 norm -20',
|
||||||
'modeDefaultKey': 'play -qV0 "|sox -np synth .07 sq 400" "|sox -np synth .5 sq 800" fade h 0 .5 .5 norm -20 reverse'}
|
'modeDefaultKey': 'play -qV0 "|sox -np synth .07 sq 400" "|sox -np synth .5 sq 800" fade h 0 .5 .5 norm -20 reverse'}
|
||||||
|
|
||||||
|
def play_sound(event, sounds = sounds):
|
||||||
|
os.system(sounds[event])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
i3 = i3ipc.Connection()
|
i3 = i3ipc.Connection()
|
||||||
|
|
||||||
i3.on('window::new', play_sound("newWindow"))
|
i3.on('window::new', play_sound("newWindow"))
|
||||||
|
Loading…
Reference in New Issue
Block a user