new command for fifo interaction status.
This commit is contained in:
parent
8c62babd48
commit
fac8c8bfad
@ -86,6 +86,18 @@ pm() {
|
|||||||
[[ $notify ]] && notify "$1 from $2: $3"
|
[[ $notify ]] && notify "$1 from $2: $3"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status() {
|
||||||
|
# If transmitting: Payphone coin drop tones (1700+2200 Hz simultaneous, like quarter = 5 tones)
|
||||||
|
# If not transmitting: Special Information Tone (SIT) - call failed (913.8, 1370.6, 1776.7 Hz)
|
||||||
|
if [[ "$3" == "transmitting" ]]; then
|
||||||
|
[[ $sound ]] && play -n synth .025 sin 1700 sin 2200 remix - norm -12 pad 0 .025 repeat 4
|
||||||
|
[[ $notify ]] && notify "You are transmitting."
|
||||||
|
else
|
||||||
|
[[ $sound ]] && play -n synth .250 sin 913.8 pad 0 .080 : synth .250 sin 1370.6 pad 0 .080 : synth .350 sin 1776.7 remix - norm -12
|
||||||
|
[[ $notify ]] && notify "You are not transmitting."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if is_function "$1" ; then
|
if is_function "$1" ; then
|
||||||
eval "$1" "$1" "$2" "$3" &> /dev/null
|
eval "$1" "$1" "$2" "$3" &> /dev/null
|
||||||
else
|
else
|
||||||
|
9
ui.go
9
ui.go
@ -181,6 +181,14 @@ func (b *Barnard) CommandExit(ui *uiterm.Ui, cmd string) {
|
|||||||
b.Ui.Close()
|
b.Ui.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *Barnard) CommandStatus(ui *uiterm.Ui, cmd string) {
|
||||||
|
if b.Tx {
|
||||||
|
b.Notify("status", "me", "transmitting")
|
||||||
|
} else {
|
||||||
|
b.Notify("status", "me", "not transmitting")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (b *Barnard) OnClearPress(ui *uiterm.Ui, key uiterm.Key) {
|
func (b *Barnard) OnClearPress(ui *uiterm.Ui, key uiterm.Key) {
|
||||||
b.UiOutput.Clear()
|
b.UiOutput.Clear()
|
||||||
}
|
}
|
||||||
@ -283,6 +291,7 @@ func (b *Barnard) OnUiInitialize(ui *uiterm.Ui) {
|
|||||||
b.Ui.AddCommandListener(b.CommandTalk, "toggle")
|
b.Ui.AddCommandListener(b.CommandTalk, "toggle")
|
||||||
b.Ui.AddCommandListener(b.CommandTalk, "talk")
|
b.Ui.AddCommandListener(b.CommandTalk, "talk")
|
||||||
b.Ui.AddCommandListener(b.CommandExit, "exit")
|
b.Ui.AddCommandListener(b.CommandExit, "exit")
|
||||||
|
b.Ui.AddCommandListener(b.CommandStatus, "status")
|
||||||
b.Ui.AddKeyListener(b.OnFocusPress, b.Hotkeys.SwitchViews)
|
b.Ui.AddKeyListener(b.OnFocusPress, b.Hotkeys.SwitchViews)
|
||||||
b.Ui.AddKeyListener(b.OnVoiceToggle, b.Hotkeys.Talk)
|
b.Ui.AddKeyListener(b.OnVoiceToggle, b.Hotkeys.Talk)
|
||||||
b.Ui.AddKeyListener(b.OnTimestampToggle, b.Hotkeys.ToggleTimestamps)
|
b.Ui.AddKeyListener(b.OnTimestampToggle, b.Hotkeys.ToggleTimestamps)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user