dylanaraps/neofetch

Add Windows Terminal font support

Ouverte

#1 513 ouverte le 25 juil. 2020

 (4 commentaires) (0 réaction) (0 personne assignée)Shell (1 784 forks)batch import
EnhancementHelp Wanted

Métriques du dépôt

Stars
 (23 710 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Currently output of Terminal is just /dev/pts/* on WSL2 and /dev/tty* on WSL1. Besides, no term font is shown. When running on Windows Terminal, variables $WT_PROFILE_ID and $WT_SESSION is available.

--- neofetch	2020-07-25 01:31:17.290000000 +0800
+++ file	2020-07-25 10:36:19.370000000 +0800
@@ -3136,6 +3136,9 @@
     [[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2"
     [[ "$SSH_CONNECTION" ]] && term="$SSH_TTY"
 
+    # Windows Terminal temporarily support
+    [[ "$WT_SESSION" ]] && term="Windows Terminal"
+
     # Check $PPID for terminal emulator.
     while [[ -z "$term" ]]; do
         parent="$(get_ppid "$parent")"

As for term fonts, default configuration file is /mnt/<disk>/Users/<Username in Windows>/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json.

However, I don't know how to deal with json.

Guide contributeur