[Share Experiences] fastfetch 系统信息查看命令 不显示左侧 LOGO 的方法
Tofloor
poster avatar
字甲达宾
deepin
2025-04-07 07:16
Author

fastfetch 系统信息查看命令 不显示左侧 LOGO 的方法

2025.4.07

最近的 Deepin 25 Alpha 测试活动,需要附上 neofetch 或者 fastfetch 命令输出的本机硬件信息。

除了可以截图,也可以直接 复制 输出的文字信息(但是需要隐藏左右的 LOGO 图案,否则显示的信息会很混乱)

优点:复制 文字内容,比截图、再上传图片,要快得多、更方便。

方法:使用 --logo none 选项(作用:不显示 左侧 LOGO)

fastfetch --logo none

或者

fastfetch -l none

Reply Favorite View the author
All Replies
大多时候吃素
deepin
2025-04-07 09:18
#1

牛的

Reply View the author
wlly-lzh
deepin
2025-04-07 15:08
#2

like

Reply View the author
MeGusta
deepin
2025-04-07 16:08
#3

赞,学习了。

Reply View the author
hotime
deepin
2025-04-07 18:35
#4

我是这样的:

  • 生成当前fastfetch配置
fastfetch --gen-config
  • 移除输出内容中最后的空行以及不必要的色块
    修改配置文件:~/.config/fastfetch/config.jsonc,删除"break"、"colors",修改后内容如下:
{
  "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
  "modules": [
    "title",
    "separator",
    "os",
    "host",
    "kernel",
    "uptime",
    "packages",
    "shell",
    "display",
    "de",
    "wm",
    "wmtheme",
    "theme",
    "icons",
    "font",
    "cursor",
    "terminal",
    "terminalfont",
    "cpu",
    "gpu",
    "memory",
    "swap",
    "disk",
    "localip",
    "battery",
    "poweradapter",
    "locale"
  ]
}
  • 安装xlicp,以便可以通过命令直接将输出内容复制至剪贴板
    sudo apt install xclip
    
  • ~/.bash_aliases创建别名,省去输入冗长的命令
#fastfetch
alias ff='fastfetch'
alias ffclip='fastfetch -l none | head -c -1 | xclip -selection clipboard'
  • 手动加载一下 ~/.bash_aliases,尝试使用 ffclip
    source ~/.bash_aliases
    

补充:

  • 创建别名那里,可以更加激进一点,在输出文本的前后加上markdown格式的字符,让它在粘贴到帖子中时,直接就是properties代码块的样式
#fastfetch
alias ff='fastfetch'
alias ffclip='fastfetch -l none | ( echo "\`\`\`properties"; cat; echo -n "\`\`\`" ) | xclip -selection clipboard'
  • 帖子中粘贴后效果如下:
hotime@Miix4-dp25
-----------------
OS: Deepin beige 25 x86_64
Host: 80QL (Lenovo ideapad MIIX 700-12ISK)
Kernel: Linux 6.6.71-amd64-desktop-hwe
Uptime: 52 mins
Packages: 1859 (dpkg)
Shell: bash 5.2.21
Display (SDC4144): 2160x1440 @ 60 Hz in 12″ [Built-in]
DE: DDE
WM: KWin (X11)
Theme: deepin [GTK2]
Icons: nirvana [GTK2]
Cursor: bloom
Terminal: deepin-terminal 6.0.17
Terminal Font: Noto Sans Mono (14pt)
CPU: Intel(R) Core(TM) m3-6Y30 (4) @ 2.20 GHz
GPU: Intel HD Graphics 515 @ 0.85 GHz [Integrated]
Memory: 2.84 GiB / 3.72 GiB (76%)
Swap: 560.75 MiB / 4.40 GiB (12%)
Disk (/): 7.08 GiB / 22.47 GiB (32%) - ext4
Disk (/persistent): 32.69 GiB / 88.08 GiB (37%) - ext4
Local IP (wlp1s0): 192.168.1.59/24
Battery (L15L4P71): 71% [Discharging]
Locale: zh_CN.UTF-8
Reply View the author