dylanaraps/neofetch

Add Windows Terminal font support

Offen

#1.513 geöffnet am 25.07.2020

 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Shell (1.784 Forks)batch import
EnhancementHelp Wanted

Repository-Metriken

Stars
 (23.710 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide