Skip to content

Commit

Permalink
feat: change curl dependency to wget
Browse files Browse the repository at this point in the history
This commit changes the dependency on curl to wget since this is
installed by default on most linux systems. Additionally documentation
was added to explain that wget is needed for the telegram feature.
  • Loading branch information
rickstaa committed Jun 10, 2023
1 parent 172f75e commit 633fc51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ By default, the notification is only sent to the operating system. We have also

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:

- `prefix + ctrl + M`: Start monitoring pane and notify in bash and telegram when it finishes.
- `prefix + ctrl + m`: Start monitoring pane and notify in bash and telegram when it finishes.

- `prefix + ctrl + alt + M`: Start monitoring a pane, return it in focus and notify in bash and telegram when it finishes.
- `prefix + ctrl + alt + m`: Start monitoring a pane, return it in focus and notify in bash and telegram when it finishes.

> **Warning**
> This feature requires [wget](https://www.gnu.org/software/wget/) to be installed on your system.
> **Note**
> 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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ telegram_available() {
# Send telegram message
# Usage: send_telegram_message <bot_id> <chat_id> <message>
send_telegram_message() {
curl "https://api.telegram.org/bot$1/sendMessage?chat_id=$2&text=$3" &> /dev/null
wget "https://api.telegram.org/bot$1/sendMessage?chat_id=$2&text=$3" &> /dev/null
}

# Send notification
Expand Down

0 comments on commit 633fc51

Please sign in to comment.