可愛いシステム情報表示ツールのpfetch

screenfetchやneofetchと同じようなものですが,shell script 1本で動いてロゴが可愛いです.

$ git clone https://github.com/dylanaraps/pfetch
$ pfetch/pfetch
  _____      matoken@t430s
 /  __ \     os     Debian GNU/Linux bullseye/sid
|  /    |    host   23533KJ ThinkPad T430s
|  \___-     kernel 5.2.0-2-amd64
-_           uptime 8d 3h 7m
  --_        pkgs   5796
             memory 13560M / 15924M

fpetch

現在のバージョンではロゴはこれだけあるよう.

$ grep PF_ASCII: pfetch -A999|grep \*\)
        [Aa]lpine*)
        [Aa]ndroid*)
        [Aa]rch*)
        [Aa]rco*)
        [Aa]rtix*)
        [Cc]ent[Oo][Ss]*)
        [Dd]ebian*)
        [Dd]ragon[Ff]ly*)
        [Ee]lementary*)
        [Ff]edora*)
        [Ff]ree[Bb][Ss][Dd]*)
        [Gg]entoo*)
        [Gg]uix[Ss][Dd]*|[Gg]uix*)
        [Hh]aiku*)
        [Hh]yperbola*)
        [Ll]inux*[Ll]ite*|[Ll]ite*)
        [Ll]inux*)
        [Mm]ac[Oo][Ss]*|[Dd]arwin*)
        [Mm]ageia*)
        [Mm]anjaro*)
        [Mm]inix*)
        [Mm][Xx]*)
        [Nn]et[Bb][Ss][Dd]*)
        [Nn]ix[Oo][Ss]*)
        [Oo]pen[Bb][Ss][Dd]*)
        [Oo]penSUSE*|[Oo]pen*SUSE*|SUSE*|suse*)
        [Pp]arabola*)
        [Pp]op!_[Oo][Ss]*)
        [Pp]ure[Oo][Ss]*)
        [Ss]lackware*)
        [Ss]un[Oo][Ss]|[Ss]olaris*)
        [Uu]buntu*)
        [Vv]oid*)
        *)

環境変数 PF_INFOPF_ASCII で指定したものを表示できるようです.そこでこういうscriptで表示して,

#!/usr/bin/perl
use strict;
use warnings;
use Time::HiRes 'sleep';

my @LIST=('alpine','android','arch','arco','artix','centos','debian','dragonfly','elementary','fedora','freebsd','gentoo','guixsd','haiku','hyperbola','lite','linux','macos','mageia','manjaro','mint','minix','mx','netbsd','nixos','openbsd','suse','parabola','pop!_os','pureos','slackware','sunos','ubuntu','void');

foreach my $dist ( sort @LIST ){
  my $pfetch = `clear`;
  $pfetch .= "$dist\n";
  $pfetch .= `PF_INFO=ascii PF_ASCII=$dist pfetch`;
  print $pfetch;
  sleep(0.5);
}
`PF_INFO=ascii pfetch > /dev/null`;
print "done\n";

asciinemaへのアップロード……に失敗したのでttyrecして,ttygifしてみました.

pfetch logos
$ ttyrec pfetch.tty # 録画開始
$ perl pfetch-logo.pl # logo表示
$ exit  # 録画終了
$ vi pfetch.tty # テキストエディタで頭と最後のゴミ削除
$ resize -s 11 25 # terminalを小さくしておく
$ ttygif -in pfetch.tty # gifに書き出し
$ WINDOWID=`xdotool getactivewindow` ttygif -in pfetch.tty # `cannot get screenshot` と言われる場合

元のロゴはこの ufetch の一部が使われているよう.こちらにはRaspbianもありますね.

ufetch raspbian

余録:ufetchのロゴを楽しむ
$ git clone https://gitlab.com/jschx/ufetch
$ find ./ufetch/ -name "ufetch-*" -executable \! -name "*.png" -print0 | sort -n | xargs -0 -n1 -I{} sh -c "{} 2>/dev/null; sleep 0.5"
環境
$ git log -1
commit 1ff17055b958fb2436bb9810bfba0d97c64390a4 (HEAD -> master, origin/master, origin/HEAD)
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Tue Oct 1 15:09:43 2019 +0300

    pfetch: fix bug
$ ttygif -v # https://github.com/sugyan/ttygif
0.0.3
$ ls -l `which sh`
lrwxrwxrwx 1 root root 4 Jul 19 03:15 /usr/bin/sh -> dash
$ dpkg-query -W dash perl ttyrec
dash    0.5.10.2-6
perl    5.28.1-6
ttyrec  1.0.8-5+b2
$ lsb_release -dr
Description:    Debian GNU/Linux bullseye/sid
Release:        unstable
$ uname -m
x86_64

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)