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
Copy file name to clipboardExpand all lines: README.md
+27-13Lines changed: 27 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@
8
8
9
9
Tmux plugin to notify you when processes are complete.
10
10
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.
11
+
Notifications are done via libnotify, and visual bells are 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
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 shelllevel feature
17
-
- Working over ssh, but your tmux is on the client-side
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
@@ -28,11 +28,11 @@ Use `prefix + I` to install.
28
28
29
29
## Usage
30
30
31
-
`prefix + m`: Start monitoring a pane and notify when it finishes.
31
+
-`prefix + m`: Start monitoring a pane and notify when it finishes.
32
32
33
-
`prefix + alt + m`: Start monitoring a pane, return it in focus and notify when it finishes.
33
+
-`prefix + alt + m`: Start monitoring a pane, return it in focus and notify when it finishes.
34
34
35
-
`prefix + M`: Cancel monitoring of a pane.
35
+
-`prefix + M`: Cancel monitoring of a pane.
36
36
37
37
## Pre-requisites
38
38
@@ -47,13 +47,13 @@ Use `prefix + I` to install.
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 the task has completed is given.
50
+
The notification text is defaulted to `Tmux pane task completed!`. We have also included a verbose output option. Information about the pane, window, and session the task has completed is given when enabled.
51
51
52
-
Put `set -g @tnotify-verbose 'on'` in the `.tmux.conf` config file to enable this.
52
+
To enable this, put `set -g @tnotify-verbose 'on'` in the `.tmux.conf` config file.
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 the `.tmux.conf` config file. 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
58
-`#D`: Pane id
59
59
-`#P`: Pane index
@@ -62,19 +62,33 @@ To change the verbose notification text, put `set -g @tnotify-verbose-msg 'put y
62
62
-`#I`: Window index
63
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 complete 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
+
67
+
### Enable telegram channel notifications
68
+
69
+
By default, the notification is only sent to the operating system. We have also included a telegram channel notification option. When enabled, a notification is sent to a user-specified telegram channel.
70
+
71
+
Put both `set -g @tnotify-telegram-bot-id 'your telegram bot id'` and `set -g @tnotify-telegram-channel-id 'your channel id'` in the `.tmux.conf` config file to enable this. Additionally, you can use the `set -g @tnotify-telegram-all 'on'` option to send all notifications to telegram. After enabling this option, the following key bindings are available:
72
+
73
+
-`prefix + ctrl + M`: Start monitoring pane and notify in bash and telegram when it finishes.
74
+
75
+
-`prefix + ctrl + alt + M`: Start monitoring a pane, return it in focus and notify in bash and telegram when it finishes.
76
+
77
+
> **Note**
78
+
> You can get your telegram bot id by creating a bot using [BotFather](https://core.telegram.org/bots#6-botfather) and your channel id by sending your channel invite link to the `@username_to_id_bot` bot.
66
79
67
80
### Change monitor update period
68
81
69
82
By default, the monitor sleep period is set to 10 seconds. This means that tmux-notify checks the pane activity every 10 seconds.
70
83
71
-
Put `set -g @tnotify-sleep-duration 'desired duration" in the`.tmux.conf\` file to change this duration.
84
+
Put `set -g @tnotify-sleep-duration 'desired duration'` in the`.tmux.conf` file to change this duration.
72
85
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.
86
+
> **Warning**
87
+
> Remember that there is a trade-off between notification speed (short sleep duration) and the amount of memory this tool needs.
74
88
75
89
### Add additional shell suffixes
76
90
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.
91
+
The Tmux notify script uses your shell prompt suffix to check whether a command has finished. By default, it looks for the `$`, `#` and `%` suffixes. 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
92
79
93
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.
0 commit comments