This commit is contained in:
ryfrd 2025-08-20 15:19:24 +01:00
parent 2a9167cb7e
commit 96573664a6
95 changed files with 4130 additions and 2328 deletions

View file

@ -1,38 +1,38 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<link rel="canonical" href="http://localhost:1313/teeny-tiny-bash-fetch-script/" />
<link rel="canonical" href="https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/" />
<title>Teeny tiny bash fetch script</title>
</head>
<body><header id="banner">
<nav class="navbar">
<div class="nav-left">
<a href="http://localhost:1313/" class="home">~ 🏠</a>
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="--help"
>--help</a
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
</div>
<div class="nav-right">
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h3>Teeny tiny bash fetch script</h3>
<h2>Teeny tiny bash fetch script</h2>
<div>
<time>December 10, 2022</time>
<p>December 10, 2022</p>
</div>
</header><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
@ -105,12 +105,9 @@
<p><img src="/image/golazo.png" alt="golazo"></p>
</article>
</main>
<footer id="footer">
<p>-----------------</p>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a> and my bastardised version of
<a href="https://github.com/LukasJoswiak/etch">this nice theme</a>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>