From 3e92b3b202657a6c259863e8bc19f86526edb210 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 12 Jun 2019 20:29:21 +0300 Subject: [PATCH] term: Fix wrapper scripts in NixOS. Thanks Tdeo. --- neofetch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index d02c0191..62a420f1 100755 --- a/neofetch +++ b/neofetch @@ -2882,7 +2882,16 @@ get_term() { "urxvtd") term="urxvt" ;; *"nvim") term="Neovim Terminal" ;; *"NeoVimServer"*) term="VimR Terminal" ;; - *) term="${name##*/}" ;; + + *) + term="${name##*/}" + + # Fix wrapper names in NixOS. + [[ "$term" == .*-wrapped ]] && { + term="${term#.}" + term="${term%-wrapped}" + } + ;; esac done