dylanaraps/neofetch

Add Windows Terminal font support

Open

#1,513 opened on Jul 25, 2020

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Shell (1,792 forks)batch import
EnhancementHelp Wanted

Repository metrics

Stars
 (23,680 stars)
PR merge metrics
 (No merged PRs in 30d)

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.

Contributor guide