dylanaraps/neofetch

Add Windows Terminal font support

Aperta

#1513 aperta il 25 lug 2020

 (4 commenti) (0 reazioni) (0 assegnatari)Shell (1784 fork)batch import
EnhancementHelp Wanted

Metriche repository

Star
 (23.710 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor