mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +00:00
term: Fix wrapper scripts in NixOS. Thanks Tdeo.
This commit is contained in:
7
neofetch
7
neofetch
@@ -2884,12 +2884,15 @@ get_term() {
|
|||||||
*"NeoVimServer"*) term="VimR Terminal" ;;
|
*"NeoVimServer"*) term="VimR Terminal" ;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
# Fix issues with long process names on Linux.
|
||||||
|
[[ $os == Linux ]] && term=$(realpath "/proc/$parent/exe")
|
||||||
|
|
||||||
term="${name##*/}"
|
term="${name##*/}"
|
||||||
|
|
||||||
# Fix wrapper names in NixOS.
|
# Fix wrapper names in NixOS.
|
||||||
[[ "$distro" == NixOS* && $term == .*-* ]] && {
|
[[ $term == .*-wrapped ]] && {
|
||||||
term="${term#.}"
|
term="${term#.}"
|
||||||
term="${term%-*}"
|
term="${term%-wrapped}"
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user