linux:bat_cowsay_figlet_toilet_lolcat_neofetch

bat、cowsay、figlet、toilet、lolcat、neofetch

$ sudo dnf install -y bat cowsay figlet toilet lolcat neofetch

メタデータの期限切れの最終確認: 2:18:03 前の 2024年03月08日 10時26分44秒 に実施しました。
依存関係が解決しました。
==============================================================================================================
 パッケージ                Arch            バージョン                                  リポジトリー     サイズ
==============================================================================================================
インストール:
 bat                       x86_64          0.24.0-3.fc39                               updates          2.5 M
 cowsay                    noarch          3.7.0-10.fc39                               updates           51 k
 figlet                    x86_64          2.2.5-26.20151018gita565ae1.fc39            fedora           137 k
 lolcat                    x86_64          1.4-2.fc39                                  fedora            21 k
 neofetch                  noarch          7.1.0-10.fc39                               fedora            89 k
 toilet                    x86_64          0.3-15.fc39                                 fedora           730 k
依存関係のインストール:
 catimg                    x86_64          2.7.0-9.fc39                                fedora            55 k
 gdk-pixbuf2-xlib          x86_64          2.40.2-7.fc39                               fedora            56 k
 imlib2                    x86_64          1.11.1-3.fc39                               fedora           259 k
 libXxf86dga               x86_64          1.1.5-11.fc39                               fedora            20 k
 perl-NKF                  x86_64          1:2.1.4-30.fc39                             fedora           143 k
 w3m                       x86_64          0.5.3-61.git20230121.fc39                   fedora           1.1 M
弱い依存関係のインストール:
 caca-utils                x86_64          0.99-0.69.beta20.fc39                       updates           98 k
 w3m-img                   x86_64          0.5.3-61.git20230121.fc39                   fedora            23 k
 xdpyinfo                  x86_64          1.3.3-4.fc39                                fedora            26 k
 xrandr                    x86_64          1.5.2-3.fc39                                fedora            46 k
 xwininfo                  x86_64          1.1.5-7.fc39                                fedora            32 k

トランザクションの概要
==============================================================================================================
インストール  17 パッケージ

ダウンロードサイズの合計: 5.4 M
インストール後のサイズ: 12 M
パッケージのダウンロード:
(1/17): catimg-2.7.0-9.fc39.x86_64.rpm                                         39 kB/s |  55 kB     00:01    
(2/17): gdk-pixbuf2-xlib-2.40.2-7.fc39.x86_64.rpm                              31 kB/s |  56 kB     00:01    
(3/17): figlet-2.2.5-26.20151018gita565ae1.fc39.x86_64.rpm                     71 kB/s | 137 kB     00:01    
(4/17): libXxf86dga-1.1.5-11.fc39.x86_64.rpm                                   48 kB/s |  20 kB     00:00    
(5/17): lolcat-1.4-2.fc39.x86_64.rpm                                           44 kB/s |  21 kB     00:00    
(6/17): imlib2-1.11.1-3.fc39.x86_64.rpm                                       225 kB/s | 259 kB     00:01    
(7/17): neofetch-7.1.0-10.fc39.noarch.rpm                                     221 kB/s |  89 kB     00:00    
(8/17): perl-NKF-2.1.4-30.fc39.x86_64.rpm                                     176 kB/s | 143 kB     00:00    
(9/17): w3m-img-0.5.3-61.git20230121.fc39.x86_64.rpm                           71 kB/s |  23 kB     00:00    
(10/17): toilet-0.3-15.fc39.x86_64.rpm                                        677 kB/s | 730 kB     00:01    
(11/17): xdpyinfo-1.3.3-4.fc39.x86_64.rpm                                     109 kB/s |  26 kB     00:00    
(12/17): xwininfo-1.1.5-7.fc39.x86_64.rpm                                     116 kB/s |  32 kB     00:00    
(13/17): xrandr-1.5.2-3.fc39.x86_64.rpm                                        98 kB/s |  46 kB     00:00    
(14/17): caca-utils-0.99-0.69.beta20.fc39.x86_64.rpm                          196 kB/s |  98 kB     00:00    
(15/17): cowsay-3.7.0-10.fc39.noarch.rpm                                       96 kB/s |  51 kB     00:00    
(16/17): w3m-0.5.3-61.git20230121.fc39.x86_64.rpm                             348 kB/s | 1.1 MB     00:03    
(17/17): bat-0.24.0-3.fc39.x86_64.rpm                                         662 kB/s | 2.5 MB     00:03    
--------------------------------------------------------------------------------------------------------------
合計                                                                          507 kB/s | 5.4 MB     00:10     
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
  準備             :                                                                                      1/1 
  インストール中   : xwininfo-1.1.5-7.fc39.x86_64                                                        1/17 
  インストール中   : xrandr-1.5.2-3.fc39.x86_64                                                          2/17 
  インストール中   : toilet-0.3-15.fc39.x86_64                                                           3/17 
  インストール中   : perl-NKF-1:2.1.4-30.fc39.x86_64                                                     4/17 
  インストール中   : w3m-0.5.3-61.git20230121.fc39.x86_64                                                5/17 
  インストール中   : libXxf86dga-1.1.5-11.fc39.x86_64                                                    6/17 
  インストール中   : xdpyinfo-1.3.3-4.fc39.x86_64                                                        7/17 
  インストール中   : imlib2-1.11.1-3.fc39.x86_64                                                         8/17 
  インストール中   : caca-utils-0.99-0.69.beta20.fc39.x86_64                                             9/17 
  インストール中   : gdk-pixbuf2-xlib-2.40.2-7.fc39.x86_64                                              10/17 
  インストール中   : w3m-img-0.5.3-61.git20230121.fc39.x86_64                                           11/17 
  インストール中   : catimg-2.7.0-9.fc39.x86_64                                                         12/17 
  インストール中   : neofetch-7.1.0-10.fc39.noarch                                                      13/17 
  インストール中   : cowsay-3.7.0-10.fc39.noarch                                                        14/17 
  インストール中   : bat-0.24.0-3.fc39.x86_64                                                           15/17 
  インストール中   : lolcat-1.4-2.fc39.x86_64                                                           16/17 
  インストール中   : figlet-2.2.5-26.20151018gita565ae1.fc39.x86_64                                     17/17 
  scriptletの実行中: figlet-2.2.5-26.20151018gita565ae1.fc39.x86_64                                     17/17 
  検証             : catimg-2.7.0-9.fc39.x86_64                                                          1/17 
  検証             : figlet-2.2.5-26.20151018gita565ae1.fc39.x86_64                                      2/17 
  検証             : gdk-pixbuf2-xlib-2.40.2-7.fc39.x86_64                                               3/17 
  検証             : imlib2-1.11.1-3.fc39.x86_64                                                         4/17 
  検証             : libXxf86dga-1.1.5-11.fc39.x86_64                                                    5/17 
  検証             : lolcat-1.4-2.fc39.x86_64                                                            6/17 
  検証             : neofetch-7.1.0-10.fc39.noarch                                                       7/17 
  検証             : perl-NKF-1:2.1.4-30.fc39.x86_64                                                     8/17 
  検証             : toilet-0.3-15.fc39.x86_64                                                           9/17 
  検証             : w3m-0.5.3-61.git20230121.fc39.x86_64                                               10/17 
  検証             : w3m-img-0.5.3-61.git20230121.fc39.x86_64                                           11/17 
  検証             : xdpyinfo-1.3.3-4.fc39.x86_64                                                       12/17 
  検証             : xrandr-1.5.2-3.fc39.x86_64                                                         13/17 
  検証             : xwininfo-1.1.5-7.fc39.x86_64                                                       14/17 
  検証             : bat-0.24.0-3.fc39.x86_64                                                           15/17 
  検証             : caca-utils-0.99-0.69.beta20.fc39.x86_64                                            16/17 
  検証             : cowsay-3.7.0-10.fc39.noarch                                                        17/17 

インストール済み:
  bat-0.24.0-3.fc39.x86_64                                 caca-utils-0.99-0.69.beta20.fc39.x86_64           
  catimg-2.7.0-9.fc39.x86_64                               cowsay-3.7.0-10.fc39.noarch                       
  figlet-2.2.5-26.20151018gita565ae1.fc39.x86_64           gdk-pixbuf2-xlib-2.40.2-7.fc39.x86_64             
  imlib2-1.11.1-3.fc39.x86_64                              libXxf86dga-1.1.5-11.fc39.x86_64                  
  lolcat-1.4-2.fc39.x86_64                                 neofetch-7.1.0-10.fc39.noarch                     
  perl-NKF-1:2.1.4-30.fc39.x86_64                          toilet-0.3-15.fc39.x86_64                         
  w3m-0.5.3-61.git20230121.fc39.x86_64                     w3m-img-0.5.3-61.git20230121.fc39.x86_64          
  xdpyinfo-1.3.3-4.fc39.x86_64                             xrandr-1.5.2-3.fc39.x86_64                        
  xwininfo-1.1.5-7.fc39.x86_64                            

完了しました!

figlet フォントのダウンロード🤔

$ git clone --depth 1 https://github.com/xero/figlet-fonts.git

Cloning into 'figlet-fonts'...
remote: Enumerating objects: 413, done.
remote: Counting objects: 100% (413/413), done.
remote: Compressing objects: 100% (382/382), done.
remote: Total 413 (delta 31), reused 409 (delta 31), pack-reused 0
Receiving objects: 100% (413/413), 1.31 MiB | 2.02 MiB/s, done.
Resolving deltas: 100% (31/31), done.

使い方

カラーテーマの一覧🤔

$ bat --list-themes

Theme: 1337

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Coldark-Cold

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Coldark-Dark

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: DarkNeon

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Dracula

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: GitHub

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Monokai Extended

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Monokai Extended Bright

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Monokai Extended Light

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Monokai Extended Origin

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Nord

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: OneHalfDark

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: OneHalfLight

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Solarized (dark)

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Solarized (light)

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Sublime Snazzy

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: TwoDark

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: Visual Studio Dark+

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: ansi

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: base16

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: base16-256

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: gruvbox-dark

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: gruvbox-light

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Theme: zenburn

  // Output the square of a number.
  fn print_square(num: f64) {
      let result = f64::powf(num, 2.0);
      println!("The square of {:.2} is {:.2}.", num, result);
  }

Further themes can be installed to '/home/tomoyan/.config/bat/themes', and are added to the cache with `bat cache --build`. For more information, see:

  https://github.com/sharkdp/bat#adding-new-themes

サポート言語の一覧🤔

$ bat --list-languages

ActionScript              as
Ada                       adb, ads, gpr
Apache Conf               envvars, htaccess, HTACCESS, htgroups, HTGROUPS, htpasswd, HTPASSWD, .htaccess, 
                          .HTACCESS, .htgroups, .HTGROUPS, .htpasswd, .HTPASSWD, /etc/apache2/**/*.conf, 
                          /etc/apache2/sites-*/**/*, httpd.conf
AppleScript               applescript, script editor
ARM Assembly              s, S
AsciiDoc (Asciidoctor)    adoc, ad, asciidoc
ASP                       asa
Assembly (x86_64)         yasm, nasm, asm, inc, mac
Authorized Keys           authorized_keys, pub, authorized_keys2
AWK                       awk
Batch File                bat, cmd
BibTeX                    bib
Bourne Again Shell (bash) sh, bash, zsh, ash, .bash_aliases, .bash_completions, .bash_functions, 
                          .bash_login, .bash_logout, .bash_profile, .bash_variables, .bashrc, .profile, 
                          .textmate_init, .zlogin, .zlogout, .zprofile, .zshenv, .zshrc, PKGBUILD, ebuild, 
                          eclass, **/bat/config, /etc/profile, os-release, *.ksh
C                         c
C#                        cs, csx
C++                       cpp, cc, cp, cxx, c++, h, hh, hpp, hxx, h++, inl, ipp, *.h
Cabal                     cabal
Clojure                   clj, cljc, cljs, edn
CMake                     CMakeLists.txt, cmake
CMake C Header            h.in
CMake C++ Header          hh.in, hpp.in, hxx.in, h++.in
CMakeCache                CMakeCache.txt
CoffeeScript              coffee, Cakefile, coffee.erb, cson
Comma Separated Values    csv, tsv
Command Help              cmd-help, help
CpuInfo                   cpuinfo
Crontab                   tab, crontab, cron.d
Crystal                   cr
CSS                       css, css.erb, css.liquid
D                         d, di
Dart                      dart
Diff                      diff, patch
Dockerfile                Dockerfile, dockerfile, .Dockerfile, Containerfile
DotENV                    .env, .env.dist, .env.local, .env.sample, .env.example, .env.template, .env.test, 
                          .env.test.local, .env.testing, .env.dev, .env.development, .env.development.local, 
                          .env.prod, .env.production, .env.production.local, .env.dusk.local, .env.staging, 
                          .env.default, .env.defaults, .envrc, .flaskenv, env, env.example, env.sample, 
                          env.template
Elixir                    ex, exs
Elm                       elm
Email                     eml, msg, mbx, mboxz, /var/spool/mail/*, /var/mail/*
Erlang                    erl, hrl, Emakefile, emakefile, escript
F#                        fs, fsi, fsx, *.fs
Fish                      fish
Fortran (Fixed Form)      f, F, f77, F77, for, FOR, fpp, FPP
Fortran (Modern)          f90, F90, f95, F95, f03, F03, f08, F08
Fortran Namelist          namelist
fstab                     fstab, crypttab, mtab
Git Attributes            attributes, gitattributes, .gitattributes, /home/tomoyan/.config/git/attributes
Git Commit                COMMIT_EDITMSG, MERGE_MSG, TAG_EDITMSG
Git Config                gitconfig, .gitconfig, .gitmodules, /home/tomoyan/.config/git/config
Git Ignore                exclude, gitignore, .gitignore, /home/tomoyan/.config/git/ignore
Git Link                  .git
Git Log                   gitlog
Git Mailmap               .mailmap, mailmap
Git Rebase Todo           git-rebase-todo
GLSL                      vs, gs, vsh, fsh, gsh, vshader, fshader, gshader, vert, frag, geom, tesc, tese, 
                          comp, glsl, mesh, task, rgen, rint, rahit, rchit, rmiss, rcall
gnuplot                   gp, gpl, gnuplot, gnu, plot, plt
Go                        go
GraphQL                   graphql, graphqls, gql
Graphviz (DOT)            dot, DOT, gv
Groff/troff               groff, troff, 1, 2, 3, 4, 5, 6, 7, 8, 9
Groovy                    groovy, gvy, gradle, Jenkinsfile
group                     group
Haskell                   hs
Highlight non-printables  show-nonprintable
hosts                     hosts
HTML                      html, htm, shtml, xhtml
HTML (ASP)                asp
HTML (EEx)                html.eex, html.leex
HTML (Erlang)             yaws
HTML (Jinja2)             htm.j2, html.j2, xhtml.j2, xml.j2
HTML (Rails)              rails, rhtml, erb, html.erb
HTML (Tcl)                adp
HTML (Twig)               twig, html.twig
HTTP Request and Response http
INI                       ini, INI, inf, INF, reg, REG, lng, cfg, CFG, desktop, url, URL, .editorconfig, 
                          .coveragerc, .pylintrc, .gitlint, .hgrc, hgrc, **/systemd/**/*.conf, 
                          **/systemd/**/*.example, *.automount, *.device, *.dnssd, *.link, *.mount, 
                          *.netdev, *.network, *.nspawn, *.path, *.service, *.scope, *.slice, *.socket, 
                          *.swap, *.target, *.timer, *.hook
Java                      java, bsh
Java Properties           properties
Java Server Page (JSP)    jsp
JavaScript                htc
JavaScript (Babel)        js, mjs, jsx, babel, es6, cjs, *.pac
JavaScript (Rails)        js.erb
Jinja2                    j2, jinja2, jinja
JQ                        jq
JSON                      json, sublime-settings, sublime-menu, sublime-keymap, sublime-mousemap, 
                          sublime-theme, sublime-build, sublime-project, sublime-completions, 
                          sublime-commands, sublime-macro, sublime-color-scheme, ipynb, Pipfile.lock, 
                          *.jsonl, *.sarif
jsonnet                   jsonnet, libsonnet, libjsonnet
Julia                     jl
Known Hosts               known_hosts, known_hosts.old
Kotlin                    kt, kts
LaTeX                     tex, ltx
Lean                      lean
Less                      less, css.less
Lisp                      lisp, cl, clisp, l, mud, el, scm, ss, lsp, fasl
Literate Haskell          lhs
LiveScript                ls, Slakefile, ls.erb
LLVM                      ll
log                       log
Lua                       lua, *.nse
Makefile                  make, GNUmakefile, makefile, Makefile, makefile.am, Makefile.am, makefile.in, 
                          Makefile.in, OCamlMakefile, mak, mk
Manpage                   man
Markdown                  md, mdown, markdown, markdn
MATLAB                    matlab
MediaWiki                 mediawiki, wikipedia, wiki
MemInfo                   meminfo
NAnt Build File           build
nginx                     conf.erb, nginx.conf, mime.types, fastcgi_params, scgi_params, uwsgi_params, 
                          /etc/nginx/**/*.conf, /etc/nginx/sites-*/**/*, nginx.conf, mime.types
Nim                       nim, nims, nimble
Ninja                     ninja
Nix                       nix
NSIS                      nsi, nsh, bnsi, bnsh, nsdinc
Objective-C               m
Objective-C++             mm
OCaml                     ml, mli
OCamllex                  mll
OCamlyacc                 mly
orgmode                   org
Pascal                    pas, p, dpr
passwd                    passwd
Perl                      pl, pc, pm, pmc, pod, t
PHP                       php, php3, php4, php5, php7, phps, phpt, phtml
Plain Text                txt
PowerShell                ps1, psm1, psd1
Protocol Buffer           proto, protodevel
Protocol Buffer (TEXT)    pb.txt, proto.text, textpb, pbtxt, prototxt
Puppet                    pp, epp
PureScript                purs
Python                    py, py3, pyw, pyi, pyx, pyx.in, pxd, pxd.in, pxi, pxi.in, rpy, cpy, SConstruct, 
                          Sconstruct, sconstruct, SConscript, gyp, gypi, Snakefile, vpy, wscript, bazel, 
                          bzl
QML                       qml, qmlproject
R                         R, r, Rprofile
Racket                    rkt
Rd (R Documentation)      rd
Rego                      rego
Regular Expression        re
Requirements.txt          requirements.txt, requirements.in, pip
resolv                    resolv.conf
reStructuredText          rst, rest
Robot Framework           robot, resource
Ruby                      rb, Appfile, Appraisals, Berksfile, Brewfile, capfile, cgi, Cheffile, config.ru, 
                          Deliverfile, Fastfile, fcgi, Gemfile, gemspec, Guardfile, irbrc, jbuilder, 
                          Podfile, podspec, prawn, rabl, rake, Rakefile, Rantfile, rbx, rjs, ruby.rail, 
                          Scanfile, simplecov, Snapfile, thor, Thorfile, Vagrantfile
Ruby Haml                 haml
Ruby on Rails             rxml, builder
Ruby Slim                 slim, skim
Rust                      rs, *.ron
Salt State (SLS)          sls
Sass                      sass
Scala                     scala, sbt, sc
SCSS                      scss
SML                       sml, cm, sig
Solidity                  sol
SQL                       sql, ddl, dml
SQL (Rails)               erbsql, sql.erb
SSH Config                ssh_config, **/.ssh/config
SSHD Config               sshd_config
Strace                    strace
Stylus                    styl, stylus
Svelte                    svlt, svelte
Swift                     swift
syslog                    syslog
SystemVerilog             sv, svh, vh
Tcl                       tcl
Terraform                 tf, tfvars, hcl
TeX                       sty, cls
Textile                   textile
Todo.txt                  todo.txt, done.txt
TOML                      toml, tml, Cargo.lock, Gopkg.lock, Pipfile, pdm.lock, poetry.lock
TypeScript                ts, mts, cts
TypeScriptReact           tsx
varlink                   varlink
Verilog                   v, V
VimHelp                   vimhelp
VimL                      vim, vimrc, gvimrc, .vimrc, .gvimrc, _vimrc, _gvimrc
Vue Component             vue
Vyper                     vy
WGSL                      wgsl
XML                       xml, xsd, xslt, tld, dtml, rng, rss, opml, svg, xaml
YAML                      yaml, yml, sublime-syntax, .clang-format, fish_history
Zig                       zig

fzf をインストールしてテーマをプレビューする🤔

$ bat --list-themes | fzf --preview="bat --theme={} --color=always ~/.bashrc"

bat_fzf_001

設定

公式: Adding or changing file type associations - sharkdp/bat: A cat(1) clone with wings. 翻訳

デフォルトでは以下の場所に config を置く🤔

$ bat --config-dir

/home/tomoyan/.config/bat

$ bat --config-file

/home/tomoyan/.config/bat/config

初期状態ではディレクトリが存在しないので、作成して config ファイルを編集する🤔

$ mkdir -p $(bat --config-dir)
$ nano $(bat --config-file)

# Use C++ syntax for Arduino .ino files
--map-syntax "*.ino:C++"

# Use ".gitignore"-style highlighting for ".ignore" files
--map-syntax ".ignore:Git Ignore"

# Use Bourne Again Shell (bash) syntax for .commonshrc files
--map-syntax ".commonshrc:Bourne Again Shell (bash)"

Or

$ bat --generate-config-file

Success! Config file written to /home/tomoyan/.config/bat/config

$ bat $(bat --config-file)

───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────
       File: /home/tomoyan/.config/bat/config
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
   1    # This is `bat`s configuration file. Each line either contains a comment or
   2    # a command-line option that you want to pass to `bat` by default. You can
   3    # run `bat --help` to get a list of all possible configuration options.
   4    
   5    # Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
   6    # for a list of all available themes
   7    #--theme="TwoDark"
   8    
   9    # Enable this to use italic text on the terminal. This is not supported on all
  10    # terminal emulators (like tmux, by default):
  11    #--italic-text=always
  12    
  13    # Uncomment the following line to disable automatic paging:
  14    #--paging=never
  15    
  16    # Uncomment the following line if you are using less version >= 551 and want to
  17    # enable mouse scrolling support in `bat` when running inside tmux. This might
  18    # disable text selection, unless you press shift.
  19    #--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
  20    
  21    # Syntax mappings: map a certain filename pattern to a language.
  22    #   Example 1: use the C++ syntax for Arduino .ino files
  23    #   Example 2: Use ".gitignore"-style highlighting for ".ignore" files
  24    #--map-syntax "*.ino:C++"
  25    #--map-syntax ".ignore:Git Ignore"
───────┴──────────────────────────────────────────────────────────────────────────────────────────────────────

pager を使用しない、枠線が必要ない場合は、さらに設定を追加する🤔

$ echo '--paging=never' >> $(bat --config-file)
$ echo '--style=numbers' >> $(bat --config-file)
$ bat $(bat --config-file)

   1 # Use C++ syntax for Arduino .ino files
   2 --map-syntax "*.ino:C++"
   3 
   4 # Use ".gitignore"-style highlighting for ".ignore" files
   5 --map-syntax ".ignore:Git Ignore"
   6 
   7 # Use Bourne Again Shell (bash) syntax for .commonshrc files
   8 --map-syntax ".commonshrc:Bourne Again Shell (bash)"
   9
  10 --paging=never
  11 --style=numbers

設定を確認する😉

$ bat --list-languages

〜省略〜
Bourne Again Shell (bash) sh, bash, zsh, ash, .bash_aliases, .bash_completions, .bash_functions, 
                          .bash_login, .bash_logout, .bash_profile, .bash_variables, .bashrc, .profile, 
                          .textmate_init, .zlogin, .zlogout, .zprofile, .zshenv, .zshrc, PKGBUILD, ebuild, 
                          eclass, **/bat/config, /etc/profile, os-release, *.ksh, .commonshrc
〜省略〜

参考文献

· 2024/03/18 01:44 · ともやん

$ echo haruo world | figlet -f 'Bloody' -d ~/figlet-fonts -w 100 | lolcat

██░ ██ ▄▄▄ ██▀███ █ ▒█████ ░ ▒█████ ██▀███ ██ ▓█████▄ ▓██░ ██▒▒████▄ ▓██ ▒ ██▒ ██ ▓██▒▒██▒ ██▒ ▓█░ █ ░█░▒██▒ ██▒▓██ ▒ ██▒▓██▒ ▒██▀ ██ ▒██▀▀██░▒██ ▀█▄ ▓██ ░▄█ ▒▓██ ▒██░▒██░ ██▒ ▒█░ █ ░█ ▒██░ ██▒▓██ ░▄█ ▒▒██░ ░██ ░▓█ ░██ ░██▄▄▄▄██ ▒██▀▀█▄ ▓▓█ ░██░▒██ ██░ ░█░ █ ░█ ▒███░▒██▀▀█▄ ▒██░ ░▓█▄ ░▓█▒░██▓ ▓███▒░██▓ ▒██▒▒▒█████▓ ░ ████▓▒░ ░░██▒██▓ ░ ████▓▒░░██▓ ▒██▒░██████▒░▒████ ░░▒░▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░▒▓▒ ▒ ▒ ░ ▒░▒░▒░ ▓░▒ ▒ ░ ▒░▒░▒░ ░ ▒▓ ░▒▓░░ ▒░▓▒▒▓ ▒ ░▒░▒▒ ░ ░▒ ░ ▒░░░▒░ ░ ░ ▒ ▒░ ▒ ░ ░ ▒ ▒░ ░▒ ░ ▒░░ ░ ▒ ░ ░ ▒ ░ ░░ ░ ░░ ░░░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░

$ neofetch

.',;::::;,'. tomoyan@WICKED-BEAT .';:cccccccccccc:;,. ------------------- .;cccccccccccccccccccccc;. OS: Fedora release 39 (Thirty Nine) x86_64 .:cccccccccccccccccccccccccc:. Host: W25AEZ .;ccccccccccccc;.:dddl:.;ccccccc;. Kernel: 6.6.14-200.fc39.x86_64 .:ccccccccccccc;OWMKOOXMWd;ccccccc:. Uptime: 4 days, 5 hours, 33 mins .:ccccccccccccc;KMMc;cc;xMMc:ccccccc:. Packages: 3158 (rpm), 11 (flatpak) ,cccccccccccccc;MMM.;cc;;WW::cccccccc, Shell: zsh 5.9 :cccccccccccccc;MMM.;cccccccccccccccc: Resolution: 1366x768 :ccccccc;oxOOOo;MMM0OOk.;cccccccccccc: DE: GNOME 45.3 cccccc:0MMKxdd:;MMMkddc.;cccccccccccc; WM: Mutter ccccc:XM0';cccc;MMM.;cccccccccccccccc' WM Theme: Adwaita ccccc;MMo;ccccc;MMW.;ccccccccccccccc; Theme: Adwaita [GTK2/3] ccccc;0MNc.ccc.xMMd:ccccccccccccccc; Icons: Adwaita [GTK2/3] cccccc;dNMWXXXWM0::cccccccccccccc:, Terminal: gnome-terminal cccccccc;.:odl:.;cccccccccccccc:,. CPU: Intel i3-3120M (4) @ 2.500GHz :cccccccccccccccccccccccccccc:'. GPU: Intel 3rd Gen Core processor Graphics Controller .:cccccccccccccccccccccc:;,.. Memory: 6999MiB / 15883MiB '::cccccccccccccc::;,.

  • linux/bat_cowsay_figlet_toilet_lolcat_neofetch.txt
  • 最終更新: 2024/03/18 02:42
  • by ともやん