Skip to main content

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

License: MIT Python Version PyPI version PyPI downloads

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("TermuxC.py", "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

Requirements:

Python 3.10+

Get Python from here!
https://www.python.org

View Package here!
https://pypi.org/project/TermuxC/

Create an issue here!
https://github.com/Ruizennis/TermuxC/issues

View changelog here!
https://github.com/Ruizennis/TermuxC/blob/main/CHANGELOG.md

View the documentation here!
https://Ruizennis.github.io/TermuxC/

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termuxc-2.5.9.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

termuxc-2.5.9-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file termuxc-2.5.9.tar.gz.

File metadata

  • Download URL: termuxc-2.5.9.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for termuxc-2.5.9.tar.gz
Algorithm Hash digest
SHA256 1c3d044454da562cc4a4bcb47ed2d12e72be73d0f063e5f749f72522f3d693f4
MD5 6b9e7a0b9d0b0d973051cb03a9346cb5
BLAKE2b-256 395676a7fc2169168cb90d86425f6a18cf4af8ad13116215f6a8e6b4f334eabd

See more details on using hashes here.

File details

Details for the file termuxc-2.5.9-py3-none-any.whl.

File metadata

  • Download URL: termuxc-2.5.9-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for termuxc-2.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5b41eaebb17d9c96475048d261d9c589f365e78979655a69beadd6325594c271
MD5 64231058a82e614358cceb0e7d22efd8
BLAKE2b-256 73c37e33f8edcf581c0af72ca29e0b5327def80e40cb3911b6a2f5daaf96e3a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page