Skip to content

Commit

Permalink
chore: rename to Notify for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Nov 1, 2022
1 parent 5670c9a commit 6fd0ee9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ output.ShowCursor()
output.Copy(message)

// Trigger notification
output.Notification(title, body)
output.Notify(title, body)
```

## Mouse
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func main() {
fmt.Printf("\t%q copied to clipboard\n", hw)
fmt.Println()

termenv.Notification("Termenv", hw)
termenv.Notify("Termenv", hw)
fmt.Print("\tTriggered a notification")
fmt.Println()

Expand Down
10 changes: 5 additions & 5 deletions notification.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package termenv

// Notification triggers a notification using OSC777.
func Notification(title, body string) {
output.Notification(title, body)
// Notify triggers a notification using OSC777.
func Notify(title, body string) {
output.Notify(title, body)
}

// Notification triggers a notification using OSC777.
func (o *Output) Notification(title, body string) {
// Notify triggers a notification using OSC777.
func (o *Output) Notify(title, body string) {
_, _ = o.WriteString(OSC + "777;notify;" + title + ";" + body + ST)
}

0 comments on commit 6fd0ee9

Please sign in to comment.