trzsz is a simple file transfer tools, similar to lrzsz ( rz / sz ) and compatible with tmux, which works with iTerm2 and has a nice progress bar.
Project description
trzsz-iterm2
trzsz ( trz / tsz ) is a simple file transfer tools, similar to lrzsz ( rz / sz ), and compatible with tmux.
trzsz-iterm2 is a client tool for trzsz used with iTerm2.
Installation
-
With Python3
sudo python3 -m pip install --upgrade trzsz-iterm2 -
With Homebrew
brew update brew install trzsz
Configuration
-
Find out the absolute path where
trzsz-iterm2is installed.which trzsz-iterm2Change the
/usr/local/bin/trzsz-iterm2below to the real absolute path oftrzsz-iterm2. -
Open
iTerm2 -> Preferences... / Settings... -> Profiles -> (select a profile on the left) -> Advanced -> Triggers -> Edit -> [+]Name Value Note Regular Expression :(:TRZSZ:TRANSFER:[SRD]:\d+\.\d+\.\d+:\d+)No space at the end Action Run Silent Coprocess...Parameters /usr/local/bin/trzsz-iterm2 \1No space at the end Enabled ✅ Checked -
Don't check the
Use interpolated strings for parametersat the bottom. -
The
/usr/local/bin/trzsz-iterm2should be changed to the real absolute path oftrzsz-iterm2. -
Note that the
Triggersshould be configured for eachProfilein use. -
Triggersallows multiple lines, but only shows one line. Make sure don't copy a newline into it.
-
-
Open
iTerm2 -> Preferences... / Settings... -> General -> Magic, checkEnable Python API. -
Set
ITERM2_COOKIEenvironment variable for faster startup.Open
iTerm2 -> Preferences... / Settings... -> Advanced, filter byCOOKIE, selectYes.
Progress Bar
Option 1: The cooler text progress bar
-
Screenshot of text progress bar
-
Upgrade iTerm2 to
Build 3.5.20220503-nightlyor higher. -
Add
-p textto the parameters of iTerm2Trigger./usr/local/bin/trzsz-iterm2 -p text \1Don't forget to change
/usr/local/bin/trzsz-iterm2to the real absolute path oftrzsz-iterm2.
Option 2: The zenity progress bar
-
Screenshot of zenity progress bar
-
Install
zenitybrew install ncruces/tap/zenity
-
If
Mac M1install fails, try to install it withgo:brew install go go install 'github.com/ncruces/zenity/cmd/zenity@latest' sudo cp ~/go/bin/zenity /usr/local/bin/zenity
-
ls -l /usr/local/bin/zenityshould shows thezenityexecutable file or link. If not, create a soft link:sudo ln -sv $(which zenity) /usr/local/bin/zenity
-
If the progress dialog doesn't pop up in front, try upgrade zenity, and don't check
iTerm2 -> Secure Keyboard Entry.
Default save path
If you want to automatically download files to the specified directory instead of asking each time.
e.g.: Automatically download files to /Users/xxxxx/Downloads
-
Using text progress bar, change
/usr/local/bin/trzsz-iterm2 -p text \1to:/usr/local/bin/trzsz-iterm2 -p text -d '/Users/xxxxx/Downloads' \1 -
Using zenity progress bar, change
/usr/local/bin/trzsz-iterm2 \1to:/usr/local/bin/trzsz-iterm2 -p zenity -d '/Users/xxxxx/Downloads' \1
Don't forget to change /usr/local/bin/trzsz-iterm2 to the real absolute path of trzsz-iterm2.
Dragging files and directories to upload
-
Upgrade iTerm2 to
Build 3.5.20220806-nightlyor higher. -
Open
iTerm2 -> Preferences... / Settings... -> Advanced, filter byfiles are dropped into, configure as:/usr/local/bin/trzsz-iterm2 -p text dragfiles \(filenames)
Don't forget to change /usr/local/bin/trzsz-iterm2 to the real absolute path of trzsz-iterm2.
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 trzsz-iterm2-1.1.5.tar.gz.
File metadata
- Download URL: trzsz-iterm2-1.1.5.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7f6fb6359523d871d03be099a876043d039458cb6086d22d1e0f3e874283c4b
|
|
| MD5 |
176e19675f5b01051a7e3740f1f61483
|
|
| BLAKE2b-256 |
1e21e8c12001396080263407277edc85ba765ee18bed54ae6d72e83516de7d9c
|
File details
Details for the file trzsz_iterm2-1.1.5-py3-none-any.whl.
File metadata
- Download URL: trzsz_iterm2-1.1.5-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a1c8071473f33d43ba36d6e944fe4f64ca77c524f78614a8dee83f35ffe38dd
|
|
| MD5 |
8f067b130a77210fc9112f8933958cf4
|
|
| BLAKE2b-256 |
48a2be51c9b8863e5cc4e1063bb914197aac0bd0443bb411710c120605f59f7b
|