You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tmux plugin to notify you when processes complete.
9
+
Tmux plugin to notify you when processes are complete.
10
10
11
11
Notification is via libnotify and visual bell raised in the tmux window. Visual bells can be mapped (in the terminal level) to X11 urgency bit and handled by your window manager.
12
12
13
13
## Use cases
14
14
15
-
-When you have already started a process in a pane and wish to be notified; that is can't use a manual trigger
16
-
-Working in different containers (Docker) -> can't choose the shell -> and can't use a shell level feature
17
-
-Working over ssh but your tmux is on client side
15
+
- When you have already started a process in a pane and wish to be notified, that is when you can't use a manual trigger.
16
+
- Working in different containers (Docker) -> can't choose the shell -> and can't use a shell level feature
17
+
- Working over ssh, but your tmux is on the client-side
18
18
19
19
## Install
20
20
@@ -41,41 +41,46 @@ Use `prefix + I` to install.
41
41
-`notify-send` or `osascript`.
42
42
43
43
> **Note**
44
-
> Works on Linux and macOS (note: only actively tested on Linux).
44
+
> Works on Linux and macOS (note: only actively tested on Linux).
45
45
46
46
## Configuration
47
47
48
48
### Enable verbose notification
49
49
50
-
By default, the notification text is set to `Tmux pane task completed!`. We have also included a verbose output option. When enabled information about the pane, window and session in which the task has completed is given.
50
+
By default, the notification text is set to `Tmux pane task completed!`. We have also included a verbose output option. When enabled, information about the pane, window, and session the task has completed is given.
51
51
52
-
Put `set -g @tnotify-verbose 'on'` in `.tmux.conf` to enable this.
52
+
Put `set -g @tnotify-verbose 'on'` in the `.tmux.conf` config file to enable this.
53
53
54
54
#### Change the verbose notification message
55
55
56
-
To change the verbose notification text put `set -g @tnotify-verbose-msg 'put your notification text here'` in `.tmux.conf`. You can use all the tmux variables in your notification text. Some useful tmux aliases are:
56
+
To change the verbose notification text, put `set -g @tnotify-verbose-msg 'put your notification text here'` in the `.tmux.conf` config file. You can use all the tmux variables in your notification text. Some useful tmux aliases are:
57
57
58
-
-`#D`: Pane id
59
-
-`#P`: Pane index
60
-
-`#T`: Pane title
61
-
-`#S`: Session name
62
-
-`#I`: Window index
63
-
-`#W`: Window name
58
+
-`#D`: Pane id
59
+
-`#P`: Pane index
60
+
-`#T`: Pane title
61
+
-`#S`: Session name
62
+
-`#I`: Window index
63
+
-`#W`: Window name
64
64
65
-
For the full list of aliases and variables you are referred to the `FORMATS`section of the [tmux manual](http://man7.org/linux/man-pages/man1/tmux.1.html).
65
+
For the full list of aliases and variables you are referred to the `FORMATS` section of the [tmux manual](http://man7.org/linux/man-pages/man1/tmux.1.html).
66
66
67
67
### Change monitor update period
68
68
69
69
By default, the monitor sleep period is set to 10 seconds. This means that tmux-notify checks the pane activity every 10 seconds.
70
70
71
-
Put `set -g @tnotify-sleep-duration 'desired duration'` in `.tmux.conf` to change this duration.
71
+
Put `set -g @tnotify-sleep-duration 'desired duration" in the`.tmux.conf\` file to change this duration.
72
72
73
73
**NOTE:** Keep in mind that there is a trade-off between notification speed (short sleep duration) and the amount of memory this tool needs.
74
74
75
+
### Add additional shell suffixes
76
+
77
+
The tmux notify script uses your shell prompt suffix to check whether a command has finished. It looks for the `$`, `#` and `%` suffixes by default. If you customise your shell to use different shell suffixes, you can add them by putting `set -g @tnotify-prompt-suffixes 'put your comma-separated bash suffix list here'` in the`.tmux.conf\` file.
78
+
79
+
Feel free to open [a pull](https://github.com/ChanderG/tmux-notify/pulls) request or [issue](https://github.com/ChanderG/tmux-notify/issues) if you think your shell prompt suffix should be included by default.
80
+
75
81
## How does it work
76
82
77
-
Pretty naive approach actually. Checks if pane content ends in $ every 10 seconds.
78
-
Will add other prompt end characters as needed.
83
+
The pretty naive approach. Checks if pane content ends with the bash prompt suffixes mentioned above every 10 seconds.
0 commit comments