- [terminal-notifier](https://github.com/julienXX/terminal-notifier) - for Mac (used by default). You can change it to [dunst](https://github.com/dunst-project/dunst) for Linux or any other notifications program (see `NOTIFY_CMD` in configuration)
- [ffmpeg](https://ffmpeg.org/) - to record voice msgs and upload videos.
- [tdlib](https://tdlib.github.io/td/build.html?language=Python) - in case of incompatibility with built in package.
For example, macOS:
```sh
brew install tdlib
```
and then set in config `TDLIB_PATH`
-`urlview` to choose urls when there is multiple in message, use `URL_VIEW` in config file to use another app (it should accept urls in stdin)
- to open `stickers` and `animated` ones (thumbnail preview) you need to set in mailcap appropriate handler and have app which will open `webp` file:
```ini
image/webp; mpv %s
```
- [ranger](https://github.com/ranger/ranger), [nnn](https://github.com/jarun/nnn), [fzf](https://github.com/junegunn/fzf) - can be used to choose file when sending, customizable with `FILE_PICKER_CMD`
- [fzf](https://github.com/junegunn/fzf) - to create groups and secret chats (used for single and multiple user selection)
Mailcap file is used for deciding how to open telegram files (docs, pics, voice notes, etc.). Path to the file can be overriden with `MAILCAP_FILE` in config file.
Example: `~/.mailcap`
```ini
# media
video/*; mpv "%s"
audio/ogg; mpv --speed=1.33 "%s"
audio/mpeg; mpv --no-video "%s"
image/*; qview "%s"
# text
text/html; w3m "%s"
text/html; open -a Firefox "%s"
text/plain; less "%s"
# fallback to vim
text/*; vim "%s"
```
## Keybindings
vi like keybindings are used in the project. Can be used commands like `4j` - 4 lines down.
For navigation arrow keys also can be used.
### Chats:
-`j,k`: move up/down
-`J,K`: move 10 chats up/down
-`g`: go to top chat
-`l`: open msgs of the chat
-`m`: mute/unmute current chat
-`p`: pin/unpin current chat
-`u`: mark read/unread
-`r`: read current chat
-`c`: show list of contacts
-`dd`: delete chat or remove history
-`ng`: create new group chat
-`ns`: create new secret chat
-`/`: search in chats
-`?`: show help
## Msgs:
-`j,k`: move up/down
-`J,K`: move 10 msgs up/down
-`G`: move to the last msg (at the bottom)
-`D`: download file
-`l`: if video, pics or audio then open app specified in mailcap file, for example:
```ini
# Images
image/png; qView "%s"
audio/*; mpv "%s"
```
if text, open in `less` (to view multiline msgs)
-`e`: edit current msg
-`<space>`: select msg and jump one msg down (use for deletion or forwarding)
-`<ctrl+space>`: same as space but jumps one msg up
-`y`: yank (copy) selected msgs with <space> to internal buffer (for forwarding) and copy current msg text or path to file to clipboard
-`p`: forward (paste) yanked (copied) msgs to current chat
-`dd`: delete msg for everybody (multiple messages will be deleted if selected)
-`i or a`: insert mode, type new message
-`I or A`: open vim to write long msg and send
-`v`: record and send voice message
-`r,R`: reply to a current msg
-`sv`: send video
-`sa`: send audio
-`sp`: send picture
-`sd`: send document
-`o`: open url present in message (if multiple urls, `urlview` will be opened)
-`]`: next chat
-`[`: prev chat
-`u`: show user info (username, bio, phone, etc.)
-`c`: show chat info (e.g. secret chat encryption key, chat id, state, etc.)
-`?`: show help
-`!`: open msg with custom cmd
## Publish
Run script to automatically increase version and release