summaryrefslogtreecommitdiff
path: root/README.md
blob: 7ba151429cb141ad973d250a75e40c6c5c3a44a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# osc-notify

This is a [Tabby](https://github.com/Eugeny/tabby) plugin. It creates a system
notification when an OSC 9 escape code sequence is printed. OSC 9 is in this
format:

```sh
OSC 9 ; [message] ST
```

Clicking the notification brings Tabby to the front and switches to the exact
tab/pane that emitted the sequence. The notification title reflects the tab's
current title at the time the sequence is received.

The OSC 9 title is cleaned up: it prefers a user-set custom tab name, and when
the title looks like a filesystem path (e.g. a shell tab showing its cwd) only
the last path segment is used instead of the full, often-truncated path.

`OSC 777 ; notify ; title ; body` (the rxvt/urxvt notification form) is also
supported, letting a program set an explicit title and body:

```sh
# creates a notification titled 'Build' with body 'Done'
printf "\033]777;notify;Build;Done\a"
```

### Example commands

```sh
# creates a notification that says 'hello'
printf "\033]9;hello\a"
# for tmux, use the passthrough escape sequence. allow-passthrough should be
# enabled
printf "\033Ptmux;\033\x1b]9;hello\x07\033\\"
```