💾 Archived View for darknesscode.xyz › linux › tg-telegram.gmi captured on 2023-05-24 at 17:55:57. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-05)

-=-=-=-=-=-=-

Install tg-telegram TUI

Requirements

The only requirement for tg to run is

Also you need pip, if is not installed in your system

Archi Linux

sudo pacman -S python-pip

Void Linux

sudo xbps-install -S python3-pip

Arch Linux AUR

Tg is in the AUR repos in arch

yay -S telegram-tg

Install from source

To install tg from source here are the repo and the commands you need to run

git clone https://github.com/paul-nameless/tg.git
cd tg
pip install python-telegram
pip install .
tg

In *Void Linux* the executable file is installed in /home/user/.local/bin/tg, you need to move the tg file to /usr/local/bin/

sudo cp ~/.local/bin/tg /usr/local/bin

Also we can do a symlink

sudo ln -s ~/.local/bin/tg /usr/local/bin

Configuration

The configuration file for tg is located in /home/user/.config/tg/confi.py

Simple config

# should start with + (plus) and contain country code
PHONE = "[phone number in international format]"

Configuration

Advanced configuration

Mailcap file

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

# 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

Here

----------

Home

Linux

Notes

MicroLog

----------

© DarknessCode