-- Leo's gemini proxy

-- Connecting to darknesscode.xyz:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

Install tg-telegram TUI


Requirements


The only requirement for tg to run is


Python 3.8


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

-- Response ended

-- Page fetched on Tue May 21 21:11:20 2024