Configuration (~/.trzsz.conf)

The trzsz local wrapper can be customized via a simple, text-based configuration file. This allows you to streamline your workflow by setting default directories and modifying upload behaviors.

Configuration File Location

The wrapper looks for the configuration file in your user's home directory:

  • Linux / macOS: ~/.trzsz.conf
  • Windows: C:\Users\<your_username>\.trzsz.conf

File Format

The configuration file uses a standard Key = Value syntax.

  • Keys are case-insensitive internally, though PascalCase is the convention.
  • Lines starting with a # are treated as comments and ignored.
  • Whitespace around the = is ignored.

Example Configuration File

# My Custom trzsz configurations
DefaultUploadPath = ~/Projects/SourceCode/
DefaultDownloadPath = /Users/username/Downloads/
DragFileUploadCommand = trz -y
ProgressColorPair = B14FFF 00FFA3

Available Configuration Options

DefaultUploadPath

  • Description: Specifies the default directory that the graphical file selection dialog will open to when you execute trz on the remote server.
  • When to use: If you frequently upload files from a specific project directory, setting this saves you from navigating your local filesystem every time you upload.
  • Default: empty (The OS decides the default path, usually the last opened directory or the user's Documents folder).
  • Example: DefaultUploadPath = /Users/username/Documents/Deployments/

DefaultDownloadPath

  • Description: Specifies an automatic save location for files downloaded via the tsz command. If this is configured, the local directory selection dialog will not appear, and files will be saved silently and automatically to this path.
  • When to use: Highly recommended for power users who want a fast, frictionless download experience, sending all files directly to their local Downloads folder.
  • Default: empty (Always prompts the user with a directory selection dialog).
  • Example: DefaultDownloadPath = ~/Downloads/trzsz_drops/

DragFileUploadCommand

  • Description: Defines the exact shell command that the trzsz wrapper executes on the remote server when you drag and drop a file into the terminal.
  • When to use:
    • Set to trz -y if you want drag-and-drop to automatically overwrite existing files on the server without failing.
    • Set to rz if you are working with legacy servers and need drag-and-drop to initiate a Zmodem transfer.
  • Default: trz
  • Example: DragFileUploadCommand = trz -y

ProgressColorPair

  • Description: Customizes the aesthetics of the terminal progress bar. It accepts exactly two 6-character hex color codes separated by a space. The progress bar will dynamically render a color gradient transitioning from the first color on the left to the second color on the right.
  • Note: Do not include the # symbol in the hex codes.
  • Default: empty (Uses standard terminal foreground colors).
  • Example: ProgressColorPair = B14FFF 00FFA3 (Creates a gradient from Purple to vibrant Green).