Socket
Socket
Sign inDemoInstall

oscclip

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

oscclip

Utilities to access the clipboard via OSC52

    0.4.1

Maintainers
1

Readme

oscclip

oscclip is a little, zero dependency python utility which utilizes the system clipboard via OSC52 escape sequences. Using these sequences, the system clipboard is accessible via SSH as well. Terminal multiplexers, such as tmux and screen are supported.

Examples

Setting the clipboard

$ echo "Foo" | osc-copy

Setting the clipboard and bypass terminal multiplexers

$ echo "Foo" | osc-copy --bypass

Reading the clipboard

$ osc-paste
Foo

Tested Terminals

  • alacritty
  • foot

For a list of terminals that support OSC52, see this table.

Caveats

tmux

There is a bug in tmux Due to this osc-paste does not work with tmux < 3.3 running in foot.

In order to make --bypass work, allow-passthrough must be enabled. Check the manpage of tmux. osc-copy issues a warning to stderr when this option is not set and --bypass is present.

Installation

Arch Linux

$ paru -S oscclip

Run via poetry

Check if your distribution provides poetry via its package management system! It might be called python-poetry, python3-poetry or similar!

Otherwise: https://python-poetry.org/docs/#installation

$ poetry install [--no-dev]
$ poetry run ocs-copy

--no-dev omits the development dependencies, such as static code checkers.

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc