term: Fix wrapper scripts in NixOS. Thanks Tdeo.
This commit is contained in:
parent
4f727b1de3
commit
c0cfcb3b36
1 changed files with 5 additions and 2 deletions
7
neofetch
7
neofetch
|
@ -2884,12 +2884,15 @@ get_term() {
|
|||
*"NeoVimServer"*) term="VimR Terminal" ;;
|
||||
|
||||
*)
|
||||
# Fix issues with long process names on Linux.
|
||||
[[ $os == Linux ]] && term=$(realpath "/proc/$parent/exe")
|
||||
|
||||
term="${name##*/}"
|
||||
|
||||
# Fix wrapper names in NixOS.
|
||||
[[ "$distro" == NixOS* && $term == .*-* ]] && {
|
||||
[[ $term == .*-wrapped ]] && {
|
||||
term="${term#.}"
|
||||
term="${term%-*}"
|
||||
term="${term%-wrapped}"
|
||||
}
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue