A lightweight utility to copy text to the device clipboard using OSC 52.
Project description
TermuxC
Termux copy to clipboard made easy.
Also known as TermuxCopy
This dual function pip package & cli tool was made to solve an issue with Termux, not allowing copying to device clipboard easily without their companion app; This package solves that.
Cli Tool Usage:
Copy text
termuxc text
Or
echo "test" | termuxc
Copy text from file
cat filename | termuxc
Copy text from file using the read from file flag
termuxc -f filename
Copy current working directory
pwd | termuxc
Also compatible with
- bat
- grep
- curl
- head
- tail
Pip package Usage:
Copy text
from TermuxC import copy
copy("Str") # works with strings,
copy(1) # numbers
copy(1.3) # and floats!
Copy text from file
from TermuxC import copy
with open("filename", "r") as f:
content = f.read()
copy(content)
Copy current working directory
from TermuxC import copy
import os
copy(os.getcwd())
Installation
Install pip package
pip install TermuxC
Uninstallation
Uninstall pip package
pip uninstall TermuxC
Flags
| Flag | Function |
|---|---|
| -f | Read from file |
| -i | Interactive mode |
| -h | Show help menu |
| -V | Show package version |
Additional flag aliases
- --file
- --interactive
- --help
- --version
Handling special characters
Some text may get interpreted incorrectly by the bash (or zsh) interpreter, to fix this issue wrap your text in single or double quotes
Incorrect:
termuxc (
This will throw an error!
Correct:
termuxc "("
This will copy the text successfully!
Requirements:
Python 3.10+
View Package here!
Pypi - TermuxC
Create an issue here!
Issues
View changelog here!
Changelog
View the documentation here!
Documentstion
Tmux support
To allow TermuxC to work inside of termux add "set -g allow-passthrough on" to your tmux configuration file.
License
This project is licensed under the MIT license, see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file termuxc-2.6.2.tar.gz.
File metadata
- Download URL: termuxc-2.6.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b6c170acf701f36216e080142474d1244e4861bffab5a547592dc6aee1807f1
|
|
| MD5 |
0021764830d5221f6cba48aa2a7d943e
|
|
| BLAKE2b-256 |
e42c5e3146f4cbfcea1185bffd35c3ad1645f1486bc8d2b1f398ff2c7500eade
|
File details
Details for the file termuxc-2.6.2-py3-none-any.whl.
File metadata
- Download URL: termuxc-2.6.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c97d31491c75976b2d5d787e27608e08c8254496076661306b652cd836ed154
|
|
| MD5 |
db98d9a71d5b31bbb4292267245e50cd
|
|
| BLAKE2b-256 |
86851cef600cd2aefd1790987283e320de04ff322a7d70178a9ad2071d8eb9e9
|