r/wezterm • u/Johnkree • Jun 21 '24
Launching program at Wezterm startup?
Hello... I want to start fastfetch at startup because... I like the look. So when I open Wezterm I want to start fastfetch and then start fish.
It works, I defined "config.default_prog = { '/opt/homebrew/bin/fish', '-l' }" But when I do the same with fastfetch, it wont show up no matter what I do. default_prog = { '/usr/local/bin/fastfetch' }
doesnt do anything.
1
u/groogoloog Jun 22 '24
That's probably because fastfetch executes and then exits. WezTerm is likely the wrong tool for this configuration; rather, this should likely be done in your shell config.
What you probably want to do is run fastfetch when in a fish login shell. Perhaps something like this in a ~/.config/fish/conf.d/open_with_fastfetch.fish would work (untested):
if status --is-interactive
fastfetch
endAs an aside, config.default_prog = { '/opt/homebrew/bin/fish', '-l' } is probably not what you want. You should set it to your default shell instead via:
sudo fish -c 'echo (which fish) >> /etc/shells'
chsh -s $(which fish)And delete that line from your config.
1
u/seaQueue Jun 22 '24
Use your shell's .bashrc or similar, just gate the fetch call behind an if block that looks at the terminal type or parent process.
1
1
u/CryptoLain Jul 11 '24
You're overcomplicating it;
Execute should be what you want;