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 trzsz-iterm2
-
With Homebrew
brew install trzsz
Configuration
-
Find out the absolute path where
trzsz-iterm2
is installed.which trzsz-iterm2
Change the
/usr/local/bin/trzsz-iterm2
below to the real absolute path oftrzsz-iterm2
. -
Open
iTerm2 -> Preferences... -> Profiles -> (select a profile on the left) -> Advanced -> Triggers -> Edit -> [+]
Name Value Note Regular Expression :(:TRZSZ:TRANSFER:[SR]:\d+\.\d+\.\d+:\d+)
No space at the end Action Run Silent Coprocess...
Parameters /usr/local/bin/trzsz-iterm2 \1
No space at the end Enabled ✅ Checked -
Don't check the
Use interpolated strings for parameters
at the bottom. -
The
/usr/local/bin/trzsz-iterm2
should be changed to the real absolute path oftrzsz-iterm2
. -
Note that the
Triggers
should be configured for eachProfile
in use. -
Triggers
allows multiple lines, but only shows one line. Make sure don't copy a newline into it.
-
Progress Bar
Option 1: The zenity progress bar
-
Install zenity
brew install ncruces/tap/zenity
-
If
Mac M1
install 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/zenity
should shows thezenity
executable file or link. If not, create a soft link:sudo ln -sv $(which zenity) /usr/local/bin/zenity
Option 2: The cooler text progress bar
Under development...
-
Upgrade iTerm2 to
Build 3.4.16
( not release yet ) or higher -
Add
-p text
to the parameters of iTerm2 Trigger./usr/local/bin/trzsz-iterm2 -p text \1
Don't forget to change
/usr/local/bin/trzsz-iterm2
to the real absolute path oftrzsz-iterm2
. -
Open
iTerm2 -> Preferences... -> General -> Magic
, checkEnabel Python API
.
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
Hashes for trzsz_iterm2-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c048d4f5f840277893b6508567da2f9a0071a41a787bd6ea003d9cd36b41cf |
|
MD5 | 9075398f9716b108866d53455b2c97f1 |
|
BLAKE2b-256 | a1cab88bbc21f7736fc19463d780c2053210c906b59c56a76b5e0c4307c77095 |