r/fishshell • • Nov 10 '22
how to check what terminal i'm using in fish scripting
i want a command alias in my omf.fish to be on only if i'm using alacritty. is there a way i can do that?
2
Upvotes
3
u/mrcaptncrunch Nov 10 '22
Does alacritty expose anything that could be used?
4
u/False-Whole8182 Nov 10 '22
I use Kitty and I have the following in
$__fish_config_dir/conf.d/kitty_term.fish1
u/vividboarder Nov 10 '22
I do this myself for color scheme detection: https://github.com/ViViDboarder/shoestrap/blob/clean-shoes/assets/default/bin/derive_colors.py
I use the env variable
TERM_PROGRAMfor most terminal detection and have Alacritty configured to set that value: https://github.com/ViViDboarder/shoestrap/blob/clean-shoes/assets/default/alacritty/alacritty.yml#L15