Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new kitty terminal with yazi while using TMUX doesn't work #2306

Closed
3 tasks done
vimscientist69 opened this issue Feb 8, 2025 · 2 comments · Fixed by #2310
Closed
3 tasks done

Create new kitty terminal with yazi while using TMUX doesn't work #2306

vimscientist69 opened this issue Feb 8, 2025 · 2 comments · Fixed by #2310
Labels
bug Something isn't working

Comments

@vimscientist69
Copy link

What system are you running Yazi on?

Linux X11

What terminal are you running Yazi in?

kitty 0.39.1 created by Kovid Goyal

yazi --debug output

Yazi
    Version: 25.2.7 (Arch Linux 2025-02-07)
    Debug  : false
    Triple : aarch64-unknown-linux-gnu (linux-aarch64)
    Rustc  : 1.84.1 (e71f9a9a 2025-01-27)

Ya
    Version: 25.2.7 (Arch Linux 2025-02-07)

Emulator
    TERM                : Some("tmux-256color")
    TERM_PROGRAM        : Some("tmux")
    TERM_PROGRAM_VERSION: Some("next-3.6")
    Brand.from_env      : Some(Kitty)
    Emulator.detect     : Emulator { kind: Left(Kitty), light: false, cell_size: Some((9, 19)) }
    Emulator.detect_full: Ok(Emulator { kind: Left(Kitty), light: false, cell_size: Some((9, 19)) })

Adapter
    Adapter.matches: Kgp

Desktop
    XDG_SESSION_TYPE           : Some("wayland")
    WAYLAND_DISPLAY            : Some("wayland-1")
    DISPLAY                    : Some(":1")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: Some("882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff_1739015696_431455728")
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Neovim
    NVIM          : false
    Neovim version: 0.10.4

Variables
    SHELL           : Some("/usr/bin/zsh")
    EDITOR          : None
    VISUAL          : None
    YAZI_FILE_ONE   : None
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: None

Text Opener
    default     : Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-create: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-rename: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

Multiplexers
    TMUX               : true
    tmux version       : 3.6
    tmux build flags   : enable-sixel=Unsupported
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file          : 5.46
    ueberzugpp    : 2.9.6
    ffmpeg/ffprobe: 7.1 / 7.1
    pdftoppm      : 25.01.0
    magick        : 7.1.1-43
    fzf           : 0.57.0
    fd/fdfind     : 10.2.0 / No such file or directory (os error 2)
    rg            : 14.1.1
    chafa         : 1.14.5
    zoxide        : No such file or directory (os error 2)
    7zz/7z        : No such file or directory (os error 2) / No such file or directory (os error 2)
    jq            : 1.7.1

Clipboard
    wl-copy/paste: 2.2.1 / 2.2.1
    xclip        : No such file or directory (os error 2)
    xsel         : No such file or directory (os error 2)

Describe the bug

I have a simple script that starts up yazi in a new terminal. This script doesn't work when I execute it when having TMUX open in Kitty.

#!/usr/bin/env bash

hydeScrDir="$(dirname "$(realpath "$(which wallpaper.sh)")")"
terminalFileExplorer="${1:-yazi}"

# shellcheck disable=SC1091
source "${hydeScrDir}/globalcontrol.sh"

if pkg_installed $terminalFileExplorer; then
        term=$(grep -E '^\s*'"$term" "$HOME/.config/hypr/keybindings.conf" | cut -d '=' -f2 | xargs) # dumb search the config
        term=${TERMINAL:-$term}                                                                      # Use env var
        term=${SYSMONITOR_TERMINAL:-$term}                                                           # use the declared variable
	pkill -x $terminalFileExplorer || $term $terminalFileExplorer &
fi

This is the output I am getting when executing the script:

Image

It works when I detach TMUX and just execute it in normal ZSH shell without TMUX open.

Image

Minimal reproducer

All context and reproduction outlined above.

Anything else?

All context and reproduction outlined above.

Checklist

  • I tried the latest nightly build, and the issue is still reproducible
  • I updated the debug information (yazi --debug) input box to the nightly that I tried
  • I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)
@sxyazi
Copy link
Owner

sxyazi commented Feb 9, 2025

Please try #2310

@vimscientist69
Copy link
Author

Please try #2310

Yeah it works now. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants