dylanaraps/neofetch

Add Windows Terminal font support

开放

#1,513 创建于 2020年7月25日

 (4 条评论) (0 个反应) (0 位负责人)Shell (1,784 个派生)batch import
EnhancementHelp Wanted

仓库指标

星标
 (23,710 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南