Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khbminus/polybar-telegram
Polybar plugin to show unread number of unread chats from Telegram
https://github.com/khbminus/polybar-telegram
polybar telegram telegram-api
Last synced: 21 days ago
JSON representation
Polybar plugin to show unread number of unread chats from Telegram
- Host: GitHub
- URL: https://github.com/khbminus/polybar-telegram
- Owner: khbminus
- Created: 2021-08-27T11:59:21.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T19:02:37.000Z (over 3 years ago)
- Last Synced: 2024-06-19T20:51:57.933Z (8 months ago)
- Topics: polybar, telegram, telegram-api
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Script: polybar-telegram
A go script that shows count of unread telegram messages
It uses telegram client API with gotd. So you should get app ID and app hash
from [Telegram API](https://my.telegram.org/apps)![polybar-telegram](screenshots/1.png)
## Installation
```shell
go install github.com/Doktorkrab/polybar-telegram
```## Configuration
polybar-telegram needs some environs:
- TG_APPID / TG_APPHASH - App id and hash from Telegram app config
- PHONE - mobile phone number used for authorization
- AUTH_FILE - path to file that will use to persist login dataAfter installation, you should run `polybar-telegram` in terminal with auth flag:
```shell
# make sure polybar-telegram is in $PATH
polybar-telegram -a
```You can run `polybar-telegram` with `-u` flag show messages in unmuted chats.
You can run `polybar-telegram` with `-i` to hide the module if you have 0 unread messages.
To specify output format use `-f` flag
```shell
# {{.unread}} - number of unread messages
# {{.mentions}} - number of mentions
polybar-telegram -f "t {{.unread}} m {{.mentions}}"
```## Module
```ini
[module/telegram]
type = custom/script
exec = polybar-telegram
interval = 10
```