diff --git a/Makefile b/Makefile index c458a3eb..8ab1b255 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ $(APP_NAME)-%: $(TARGET)-% @touch -r "$(APP_BINARY)" "$(TARGET_DIR_OSX)/$(APP_NAME)" install-terminfo: - @tic -xe rio -o $(APP_EXTRAS_DIR) $(TERMINFO) + @tic -xe xterm-rio,rio -o $(APP_EXTRAS_DIR) $(TERMINFO) release-macos: app-universal @codesign --remove-signature "$(TARGET_DIR_OSX)/$(APP_NAME)" diff --git a/docs/docs/install/linux.md b/docs/docs/install/linux.md index c239fd7e..72f0e16b 100644 --- a/docs/docs/install/linux.md +++ b/docs/docs/install/linux.md @@ -92,7 +92,7 @@ If the command returns an error, install the terminfo manually: ```bash curl -o rio.terminfo https://raw.githubusercontent.com/raphamorim/rio/main/misc/rio.terminfo -sudo tic -xe rio rio.terminfo +sudo tic -xe xterm-rio,rio rio.terminfo rm rio.terminfo ``` diff --git a/docs/docs/install/terminfo.md b/docs/docs/install/terminfo.md index 629ebad5..f7e19bf0 100644 --- a/docs/docs/install/terminfo.md +++ b/docs/docs/install/terminfo.md @@ -3,7 +3,7 @@ title: 'Terminfo' language: 'en' --- -To make sure Rio works correctly, the "rio" terminfo must be used. The rio terminfo will be picked up automatically if it is installed. +To make sure Rio works correctly, the Rio terminfo must be used. The rio terminfo will be picked up automatically if it is installed. If the following command returns without any errors, the rio terminfo is already installed: @@ -13,12 +13,21 @@ infocmp rio If it is not present already, you can install it globally with the following command: -When cloned locally, from the root of the repository run `sudo tic -xe rio misc/rio.terminfo` +When cloned locally, from the root of the repository run `sudo tic -xe xterm-rio,rio misc/rio.terminfo` If the source code has not been cloned locally: ```sh curl -o rio.terminfo https://raw.githubusercontent.com/raphamorim/rio/main/misc/rio.terminfo -sudo tic -xe rio rio.terminfo +sudo tic -xe xterm-rio,rio rio.terminfo rm rio.terminfo ``` + +## Terminfo Entries + +The Rio terminfo provides two entries: + +- `rio`: The primary terminfo entry used by the `TERM` environment variable +- `xterm-rio`: A compatibility entry for applications that look for "xterm-" prefixed terminals to detect capabilities + +Both entries provide the same terminal capabilities, ensuring compatibility with a wide range of applications. diff --git a/docs/docs/releases.md b/docs/docs/releases.md index ca2c6bb0..3be6f65e 100644 --- a/docs/docs/releases.md +++ b/docs/docs/releases.md @@ -109,6 +109,12 @@ language: 'en' - `man 5 rio` - Complete configuration file format documentation - `man 5 rio-bindings` - Key bindings reference and customization guide - Available in `extra/man/` directory with build instructions +- **Terminfo Compatibility**: Improved terminal compatibility by adding `xterm-rio` terminfo entry + - Added `xterm-rio` as primary terminfo entry with `rio` as alias for better application compatibility + - Applications that look for "xterm-" prefixed terminals (like termwiz-based apps) now work correctly + - Maintains `TERM=rio` environment variable for consistency with terminal identity + - Fixes crashes with applications like `gitu` and other termwiz-based terminal programs + - Follows same pattern as other modern terminals (Alacritty, Ghostty) for maximum compatibility ### Technical Details diff --git a/frontends/rioterm/src/main.rs b/frontends/rioterm/src/main.rs index bc064a67..3ef8b6a5 100644 --- a/frontends/rioterm/src/main.rs +++ b/frontends/rioterm/src/main.rs @@ -41,7 +41,7 @@ const LOG_LEVEL_ENV: &str = "RIO_LOG_LEVEL"; pub fn setup_environment_variables(config: &rio_backend::config::Config) { #[cfg(unix)] - let terminfo = if teletypewriter::terminfo_exists("rio") { + let terminfo = if teletypewriter::terminfo_exists("rio") || teletypewriter::terminfo_exists("xterm-rio") { "rio" } else { "xterm-256color" diff --git a/misc/rio.terminfo b/misc/rio.terminfo index 294cc18c..b2324138 100644 --- a/misc/rio.terminfo +++ b/misc/rio.terminfo @@ -1,5 +1,8 @@ -rio, +xterm-rio, use=rio+base, + +rio, + use=xterm-rio, rs1=\Ec\E]104\007, ccc, colors#0x100, pairs#0x7FFF, diff --git a/pkgRio.nix b/pkgRio.nix index 364b148c..0cf8825d 100644 --- a/pkgRio.nix +++ b/pkgRio.nix @@ -84,7 +84,7 @@ in # Install terminfo files install -dm 755 "$out/share/terminfo/r/" - tic -xe rio,rio-direct -o "$out/share/terminfo" misc/rio.terminfo + tic -xe xterm-rio,rio,rio-direct -o "$out/share/terminfo" misc/rio.terminfo '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications/ mv misc/osx/Rio.app/ $out/Applications/