Browse Source

term: Fix wrapper scripts in NixOS. Thanks Tdeo.

Dylan Araps 6 years ago
parent
commit
3e92b3b202
1 changed files with 10 additions and 1 deletions
  1. 10 1
      neofetch

+ 10 - 1
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