sassman/t-rec-rs

Panics on alacritty / tmux / fish

mhausenblas opened this issue · 3 comments

Describe the bug
Program panics on launch.

To Reproduce
Steps to reproduce the behavior:

  1. Install using brew
  2. Run t-rec

Expected behavior
Some help or overview, rather it panics with:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Env variable 'WINDOWID' was not set.

Caused by:
    environment variable not found', src/macos/mod.rs:51:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version Numbers of your System:

  • OS: MacOS
  • Version: 10.15.7
  • Terminal: Alacritty
  • Shell: Fish and tmux

Additional context
My overall setup is available via https://mhausenblas.medium.com/my-taf-setup-faa6bd0f1076

Thanks @mhausenblas for your bug report.

could you please try if the following workaround would prevent the panic?

find the window id of alacritty:

t-rec --ls-win | grep -i alacritty
Alacritty | 7324

then use this window id explicitly:

WINDOWID=7324 t-rec

If this then works, then this is a duplicate of #44 and you could support my PR that got declined by commenting on it.

The maintainer of alacritty was not very amused to integrate this fix, even though all other mac programs seems to implement this sort of hack.

the panic is now fixed, and a more helpful error msg is provided (see #66).
You can find the fixes available in v0.5.2, the brew update takes normally a bit.

Thanks a lot for the ultra-speedy fix @sassman I really appreciate it! Now, I did the brew upgrade t-rec dance and I can confirm with t-rec -V that I am on 0.5.2 and that it doesn't panic anymore but provide helpful guidance.