From ffb8c26672ac7bcad4fcf577448e4ab5cc3f57ef Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Tue, 9 Dec 2025 00:27:17 +0530 Subject: [PATCH 01/19] Add CachyOS logo and package support Add cachyosLogo ASCII art to src/assets/logos.nim Extend coloredLogos to include (fgCyan, cachyosLogo) and map "cachyos" to it in getLogo Make getPkgs return getPacmanPkgs for "cachyos" Minor whitespace cleanup in getPkgs --- src/assets/logos.nim | 12 ++++++++++-- src/nitches/getLogo.nim | 8 ++++++-- src/nitches/getPkgs.nim | 5 ++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/assets/logos.nim b/src/assets/logos.nim index 2fd73a3..f9cf819 100644 --- a/src/assets/logos.nim +++ b/src/assets/logos.nim @@ -111,6 +111,14 @@ const ___ __ _ __ __ / _ | ____ / /_(_)\ \/ / - / __ |/ __// __/ / > < + / __ |/ __// __/ / > < /_/ |_/_/ \__/_/ /_/\_\ -""" \ No newline at end of file +""" + cachyosLogo* = r""" + + _____ __ ____ ____ + / ___/__ _____/ / __ __/ __ \/ __/ + / /__/ _ `/ __/ _ \/ // / /_/ /\ \ + \___/\_,_/\__/_//_/\_, /\____/___/ + /___/ +""" diff --git a/src/nitches/getLogo.nim b/src/nitches/getLogo.nim index cb33720..c403dca 100644 --- a/src/nitches/getLogo.nim +++ b/src/nitches/getLogo.nim @@ -4,7 +4,7 @@ import func getLogo*(distroId: string): tuple = const - coloredLogos: array[16, tuple] = [ + coloredLogos: array[17, tuple] = [ (fgRed, nitchLogo), (fgBlue, archLogo), (fgRed, ubuntuLogo), @@ -20,7 +20,8 @@ func getLogo*(distroId: string): tuple = (fgRed, redhatLogo), (fgMagenta, gentooLogo), (fgMagenta, endeavourosLogo), - (fgBlue, artixLogo) + (fgBlue, artixLogo), + (fgCyan, cachyosLogo) ] case distroId: @@ -69,5 +70,8 @@ func getLogo*(distroId: string): tuple = of "artix": result = coloredLogos[15] + of "cachyos": + result = coloredLogos[16] + else: result = coloredLogos[0] diff --git a/src/nitches/getPkgs.nim b/src/nitches/getPkgs.nim index ca05971..caac44d 100644 --- a/src/nitches/getPkgs.nim +++ b/src/nitches/getPkgs.nim @@ -7,7 +7,7 @@ proc getPkgs*(distroId: string): string = case distroId: of "arch": result = getPacmanPkgs() - + of "artix": result = getPacmanPkgs() @@ -23,6 +23,9 @@ proc getPkgs*(distroId: string): string = of "garuda": result = getPacmanPkgs() + of "cachyos": + result = getPacmanPkgs() + of "fedora": result = getRpmPkgs() From 1d033eb0fe07447342f30f929294b1748d3f0307 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 10:27:38 +0530 Subject: [PATCH 02/19] Update .gitignore and add non-Nerd Font version functionality --- .gitignore | 4 +- setup.sh | 4 +- src/funcs/drawingNoNerd.nim | 87 +++++++++++++++++++++++++++++++++++++ src/funcs/performNoNerd.nim | 19 ++++++++ src/nitchNoNerd.nim | 30 +++++++++++++ 5 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 src/funcs/drawingNoNerd.nim create mode 100644 src/funcs/performNoNerd.nim create mode 100644 src/nitchNoNerd.nim diff --git a/.gitignore b/.gitignore index ca92a8c..1ce8a71 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -nitch* +# Compiled binaries +/nitch +/nitchNoNerd diff --git a/setup.sh b/setup.sh index aefbb3b..f50a1a7 100755 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/sh -linkNerd="https://github.com/unxsh/nitch/releases/download/0.1.6/nitchNerd" -linkNoNerd="https://github.com/unxsh/nitch/releases/download/0.1.6/nitchNoNerd" +linkNerd="https://github.com/ruxir-ig/nitch/releases/download/0.2.2/nitch" +linkNoNerd="https://github.com/ruxir-ig/nitch/releases/download/0.2.2/nitchNoNerd" sudo rm -fv /usr/local/bin/nitch diff --git a/src/funcs/drawingNoNerd.nim b/src/funcs/drawingNoNerd.nim new file mode 100644 index 0000000..b45ee61 --- /dev/null +++ b/src/funcs/drawingNoNerd.nim @@ -0,0 +1,87 @@ +import + std/terminal, # import standard terminal lib + std/strutils, + getDistroId, # import to get distro id through /etc/os-release + ../assets/logos, # uncomment if you use your own logo + ../nitches/[getUser, getHostname, + getDistro, getKernel, + getUptime, getShell, + getPkgs, getRam, getLogo] # import nitches to get info about user system + +# the main function for drawing fetch (non-Nerd Font version) +proc drawInfo*(asciiArt: bool) = + let # distro id (arch, manjaro, debian) + distroId = getDistroId() + + let # logo and it color + coloredLogo = getLogo(distroId) # color + logo tuple + # (fgRed, nitchLogo) + + const # icons before cotegores (non-Nerd Font) + userIcon = "|> " # non-nerd alternative + hnameIcon = "|> " # non-nerd alternative + distroIcon = "|> " # non-nerd alternative + kernelIcon = "|> " # non-nerd alternative + uptimeIcon = "|> " # non-nerd alternative + shellIcon = "|> " # non-nerd alternative + pkgsIcon = "|> " # non-nerd alternative + ramIcon = "|> " # non-nerd alternative + colorsIcon = "-> " # non-nerd alternative + # please insert any char after the icon + # to avoid the bug with cropping the edge of the icon + + dotIcon = "■" # non-nerd alternative + # icon for demonstrate colors + + const # categories + userCat = " user │ " # recomended: " user │ " + hnameCat = " hname │ " # recomended: " hname │ " + distroCat = " distro │ " # recomended: " distro │ " + kernelCat = " kernel │ " # recomended: " kernel │ "- + uptimeCat = " uptime │ " # recomended: " uptime │ " + shellCat = " shell │ " # recomended: " shell │ " + pkgsCat = " pkgs │ " # recomended: " pkgs │ " + ramCat = " memory │ " # recomended: " memory │ " + colorsCat = " colors │ " # recomended: " colors │ " + + let # all info about system + userInfo = getUser() # get user through $USER env variable + hostnameInfo = getHostname() # get Hostname hostname through /etc/hostname + distroInfo = getDistro() # get distro through /etc/os-release + kernelInfo = getKernel() # get kernel through /proc/version + uptimeInfo = getUptime() # get Uptime through /proc/uptime file + shellInfo = getShell() # get shell through $SHELL env variable + pkgsInfo = getPkgs(distroId) # get amount of packages in distro + ramInfo = getRam() # get ram through /proc/meminfo + + const # aliases for colors + color1 = fgRed + color2 = fgYellow + color3 = fgGreen + color4 = fgCyan + color5 = fgBlue + color6 = fgMagenta + color7 = fgWhite + color8 = fgBlack + color0 = fgDefault + + # ascii art + if not asciiArt: + discard + else: + stdout.styledWrite(styleBright, coloredLogo[0], coloredLogo[1], color0) + + # colored out + stdout.styledWrite("\n", styleBright, " ╭───────────╮\n") + stdout.styledWrite(" │ ", color2, userIcon, color0, userCat, color1, userInfo, color0, "\n",) + if not isEmptyOrWhitespace(hostnameInfo): + stdout.styledWrite(" │ ", color2, hnameIcon, color0, hnameCat, color2, hostnameInfo, color0, "\n") + stdout.styledWrite(" │ ", color3, distroIcon, color0, distroCat, color3, distroInfo, color0, "\n") + stdout.styledWrite(" │ ", color4, kernelIcon, color0, kernelCat, color4, kernelInfo, color0, "\n") + stdout.styledWrite(" │ ", color5, uptimeIcon, color0, uptimeCat, color5, uptimeInfo, color0, "\n") + stdout.styledWrite(" │ ", color6, shellIcon, color0, shellCat, color6, shellInfo, color0, "\n") + stdout.styledWrite(" │ ", color1, pkgsIcon, color0, pkgsCat, color1, pkgsInfo, color0, "\n") + stdout.styledWrite(" │ ", color2, ramIcon, color0, ramCat, fgYellow, ramInfo, color0, "\n") + stdout.styledWrite(" ├───────────┤\n") + stdout.styledWrite(" │ ", color7, colorsIcon, color0, colorsCat, color7, dotIcon, " ", color1, dotIcon, " ", color2, dotIcon, " ", color3, dotIcon, " ", color4, dotIcon, " ", color5, dotIcon, " ", color6, dotIcon, " ", color8, dotIcon, color0, "\n") + stdout.styledWrite(" ╰───────────╯\n\n") diff --git a/src/funcs/performNoNerd.nim b/src/funcs/performNoNerd.nim new file mode 100644 index 0000000..98a2426 --- /dev/null +++ b/src/funcs/performNoNerd.nim @@ -0,0 +1,19 @@ +import + ./drawingNoNerd, + ../assets/assets + +# if if no flag +proc arg0*() = + drawInfo(true) + +# if -a --no-ascii flags +proc arg1*() = + drawInfo(false) + +# if -h --help flags +proc arg2*() = + stdout.write(helpMsg) # write to stdout helpMsg from nitch/assets/assets file + +# if -v --version flags +proc arg3*() = + stdout.write(programVersion) # write to stdout programVersion from nitch/assets/assets file diff --git a/src/nitchNoNerd.nim b/src/nitchNoNerd.nim new file mode 100644 index 0000000..1556ed4 --- /dev/null +++ b/src/nitchNoNerd.nim @@ -0,0 +1,30 @@ +import + std/os, # import os module from stdlib + flags/argParser, # import arg parser from nitch/flags/argParser + funcs/performNoNerd # perform funcs for flags (non-Nerd Font version) + +let + arg = argParser(commandLineParams(), paramCount()) # called argParser with args seq and amount of args + +# case return of argParser +case arg: + +# if no flags +of 0: + arg0() # cal arg0 func from perform + +# if -a --no-ascii flags +of 1: + arg1() # cal arg1 func from perform + +# if -h --help flags +of 2: + arg2() # cal arg1 func from perform + +# if -v --version flags +of 3: + arg3() # cal arg2 func from perform + +# nim xdd +else: + arg0() From 2939d382c75395fc1437ef922bc7b77a34632c15 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 10:30:09 +0530 Subject: [PATCH 03/19] Update README.md to reflect repository ownership and maintainability --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b512423..fea3fec 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@
+> **🍴 Fork Notice:** This is a maintained fork of the original [nitch by unxsh](https://github.com/unxsh/nitch). The original project appears to be unmaintained, so this fork continues development with bug fixes and new features. + # `NiTch` @@ -9,15 +11,15 @@
-![Maintenance](https://shields.io/maintenance/yes/2022?style=for-the-badge) -![License](https://shields.io/github/license/unxsh/nitch?style=for-the-badge) -![Commits](https://shields.io/github/commit-activity/m/unxsh/nitch?style=for-the-badge) +![Maintenance](https://shields.io/maintenance/yes/2026?style=for-the-badge) +![License](https://shields.io/github/license/ruxir-ig/nitch?style=for-the-badge) +![Commits](https://shields.io/github/commit-activity/m/ruxir-ig/nitch?style=for-the-badge) -![GitHub Repo stars](https://img.shields.io/github/stars/unxsh/nitch?style=for-the-badge) -![GitHub issues](https://img.shields.io/github/issues/unxsh/nitch?style=for-the-badge) -![GitHub pull requests](https://img.shields.io/github/issues-pr/unxsh/nitch?style=for-the-badge) +![GitHub Repo stars](https://img.shields.io/github/stars/ruxir-ig/nitch?style=for-the-badge) +![GitHub issues](https://img.shields.io/github/issues/ruxir-ig/nitch?style=for-the-badge) +![GitHub pull requests](https://img.shields.io/github/issues-pr/ruxir-ig/nitch?style=for-the-badge) -![GitHub release (latest by date)](https://img.shields.io/github/v/release/unxsh/nitch?style=for-the-badge) +![GitHub release (latest by date)](https://img.shields.io/github/v/release/ruxir-ig/nitch?style=for-the-badge)
@@ -42,7 +44,7 @@ why `nim👑`? because it's fast and simple # Installation ☁️ ```fish -wget https://raw.githubusercontent.com/unxsh/nitch/main/setup.sh && sh setup.sh +wget https://raw.githubusercontent.com/ruxir-ig/nitch/main/setup.sh && sh setup.sh ``` # Usage 🪨 @@ -150,7 +152,7 @@ proc drawInfo*() = ### 1) clone repo ```fish -git clone https://github.com/unxsh/nitch.git +git clone https://github.com/ruxir-ig/nitch.git ``` ### 2) change dir to `nitch` ```fish From 6cc6d4c91734f74ec8c94e20195b9cf15fbf1931 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 10:46:12 +0530 Subject: [PATCH 04/19] Bump version to 0.2.3 --- nitch.nimble | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nitch.nimble b/nitch.nimble index affcb64..a0692a0 100644 --- a/nitch.nimble +++ b/nitch.nimble @@ -1,7 +1,7 @@ # Package -version = "0.2.2" -author = "sfome" +version = "0.2.3" +author = "ruxir-ig" description = "System fetch in nim lang" license = "MIT" From c214791f774c3b9ff42922ecfc6a9bacbc6ee011 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 10:48:54 +0530 Subject: [PATCH 05/19] Add PKGBUILD and update setup.sh for v0.2.3 --- PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ setup.sh | 4 ++-- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..29ea391 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: ruxir-ig +# Contributor: unxsh (original author) + +pkgbase=nitch +pkgname=('nitch' 'nitch-nonerd') +pkgver=0.2.3 +pkgrel=1 +pkgdesc="Incredibly fast system fetch written in Nim" +arch=('x86_64') +url="https://github.com/ruxir-ig/nitch" +license=('MIT') +makedepends=('nim' 'nimble') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/ruxir-ig/nitch/archive/refs/tags/v$pkgver.tar.gz") +sha256sums=('fbacfc3926a857d1f688f0e65fd0b68bfaea6f7c5d59a7606d3fbbb87bf1428c') + +build() { + cd "$pkgbase-$pkgver" + + # Build Nerd Font version + nimble build -d:release -y + + # Build Non-Nerd Font version + nim c -d:release -o:nitchNoNerd src/nitchNoNerd.nim +} + +package_nitch() { + pkgdesc="Incredibly fast system fetch written in Nim (Nerd Font icons)" + optdepends=('nerd-fonts: for icon support') + + cd "$pkgbase-$pkgver" + install -Dm755 nitch "$pkgdir/usr/bin/nitch" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_nitch-nonerd() { + pkgdesc="Incredibly fast system fetch written in Nim (no Nerd Font icons)" + conflicts=('nitch') + provides=('nitch') + + cd "$pkgbase-$pkgver" + install -Dm755 nitchNoNerd "$pkgdir/usr/bin/nitch" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/setup.sh b/setup.sh index f50a1a7..1508700 100755 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/sh -linkNerd="https://github.com/ruxir-ig/nitch/releases/download/0.2.2/nitch" -linkNoNerd="https://github.com/ruxir-ig/nitch/releases/download/0.2.2/nitchNoNerd" +linkNerd="https://github.com/ruxir-ig/nitch/releases/download/v0.2.3/nitch" +linkNoNerd="https://github.com/ruxir-ig/nitch/releases/download/v0.2.3/nitchNoNerd" sudo rm -fv /usr/local/bin/nitch From 5b53f062491fc852e779a7ca59af75f46ab3f5e9 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 12:18:22 +0530 Subject: [PATCH 06/19] Update .gitignore and improve README.md formatting for clarity --- .gitignore | 10 ++ README.md | 335 ++++++++++++++++-------------------- src/funcs/drawingNoNerd.nim | 20 +-- 3 files changed, 172 insertions(+), 193 deletions(-) diff --git a/.gitignore b/.gitignore index 1ce8a71..3b32ec5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,13 @@ # Compiled binaries /nitch /nitchNoNerd + +# Packaging artifacts +/pkg/ +/nitch-*.tar.gz +/src/nitch-*.tar.gz +/src/nitch-*/ + +# Arch package artifacts +/*.pkg.tar.zst +/*.pkg.tar.zst.sig diff --git a/README.md b/README.md index fea3fec..822068c 100644 --- a/README.md +++ b/README.md @@ -1,219 +1,188 @@
-> **🍴 Fork Notice:** This is a maintained fork of the original [nitch by unxsh](https://github.com/unxsh/nitch). The original project appears to be unmaintained, so this fork continues development with bug fixes and new features. - - +> **Fork Notice:** This is a maintained fork of the original [nitch by unxsh](https://github.com/unxsh/nitch). The original project appears unmaintained, so this fork continues development with bug fixes and new features. # `NiTch` -

- incredibly fast system fetch written in nim👑 -

-
- -![Maintenance](https://shields.io/maintenance/yes/2026?style=for-the-badge) -![License](https://shields.io/github/license/ruxir-ig/nitch?style=for-the-badge) -![Commits](https://shields.io/github/commit-activity/m/ruxir-ig/nitch?style=for-the-badge) +### ⚡ Incredibly fast system fetch written in Nim -![GitHub Repo stars](https://img.shields.io/github/stars/ruxir-ig/nitch?style=for-the-badge) -![GitHub issues](https://img.shields.io/github/issues/ruxir-ig/nitch?style=for-the-badge) -![GitHub pull requests](https://img.shields.io/github/issues-pr/ruxir-ig/nitch?style=for-the-badge) +``` + _ ___ ______ __ + / |/ (_)_ __/___/ / + / / / / / / __/ _ \ +/_/|_/_/ /_/ \__/_//_/ +``` -![GitHub release (latest by date)](https://img.shields.io/github/v/release/ruxir-ig/nitch?style=for-the-badge) +[![License](https://img.shields.io/github/license/ruxir-ig/nitch?style=for-the-badge)](LICENSE) +[![Release](https://img.shields.io/github/v/release/ruxir-ig/nitch?style=for-the-badge)](https://github.com/ruxir-ig/nitch/releases) +[![Stars](https://img.shields.io/github/stars/ruxir-ig/nitch?style=for-the-badge)](https://github.com/ruxir-ig/nitch/stargazers)
-# Description 📖 +--- - +## Features -`nitch` is a small and incredibly fast system fetch written fully in `nim👑` without any dependencies, on my pc -it executes in around 1.70 miliseconds. +- **Blazing Fast** — Executes in ~1.7ms +- **Zero Dependencies** — Pure Nim, no external libraries +- **Nerd Font Support** — Beautiful icons (with non-Nerd Font fallback) +- **Lightweight** — ~150KB binary +- **Multi-Distro** — Supports Arch, CachyOS, Debian, Ubuntu, Fedora, and more -The source code of `nitch` is highly documented and I hope it will act as a learning resource for nim -and linux systems architecture +## Preview -If anything in the source code is unclear or is lacking in its explanation, open an issue. Sometimes you get too close to something and you fail to see the "bigger picture"! +**Nerd Font version:** +``` + ╭───────────╮ + │ user │ ruxir + │ hname │ odysseus + │ 󰻀 distro │ CachyOS + │ 󰌢 kernel │ 6.18.2-2-cachyos + │ uptime │ 1h 30m + │ shell │ zsh + │ 󰏖 pkgs │ 1536 + │ 󰍛 memory │ 4096 | 16384 MiB + ├───────────┤ + │ 󰏘 colors │ + ╰───────────╯ +``` +**Non-Nerd Font version:** +``` + ╭───────────╮ + │ > user │ ruxir + │ > hname │ odysseus + │ > distro │ CachyOS + │ > kernel │ 6.18.2-2-cachyos + │ > uptime │ 1h 30m + │ > shell │ zsh + │ > pkgs │ 1536 + │ > memory │ 4096 | 16384 MiB + ├───────────┤ + │ > colors │ # # # # # # # # + ╰───────────╯ +``` -btw written in `nim👑` +--- -why `nim👑`? because it's fast and simple +## Installation -
+### Quick Install (Binary) -# Installation ☁️ -```fish +```bash wget https://raw.githubusercontent.com/ruxir-ig/nitch/main/setup.sh && sh setup.sh ``` -# Usage 🪨 -``` -nitch +The installer will ask if you want Nerd Font icons or not. + +### Arch Linux / CachyOS (PKGBUILD) + +```bash +git clone https://github.com/ruxir-ig/nitch.git +cd nitch +makepkg -si ``` -flags: +Choose between: +- `nitch` — Nerd Font version +- `nitch-nonerd` — Standard font version + +### Build from Source + +```bash +# Install Nim +# Arch: sudo pacman -S nim +# Ubuntu: sudo apt install nim + +# Clone and build +git clone https://github.com/ruxir-ig/nitch.git +cd nitch +nimble build -d:release + +# For non-Nerd Font version +nim c -d:release -o:nitchNoNerd src/nitchNoNerd.nim ``` - -f --fetch | return fetch about system - -h --help | return help message - -v --version | return version of program + +--- + +## Usage + +```bash +nitch # Display system info +nitch -a # Display without ASCII art +nitch --no-ascii # Same as above +nitch -h # Show help +nitch -v # Show version ``` -
+--- + +## Configuration + +nitch is configured by editing the source code directly. + +**Icon customization:** Edit `src/funcs/drawing.nim` -# Configuration ⚙️ -### `nitch` is configured by changing the source code -### `src/funcs/drawing.nim` - config file ```nim -import std/terminal # import standard terminal lib -import getDistroId # import to get distro id through /etc/os-release -#import ../assets/logos # uncomment if you use your own logo -import ../nitches/[getUser, getHostname, - getDistro, getKernel, - getUptime, getShell, - getPkgs, getRam, - getLogo, getLogoColor] # import nitches to get info about user system - -# the main function for drawing fetch -proc drawInfo*() = - let # distro id (arch, manjaro, debian) - distroId: string = getDistroId() - - let # logo and it color - logoColor: ForegroundColor = getLogoColor(distroId) # color for logo - defaultLogo: string = getLogo(distroId) # default logo from nitch/src/assets/logos - - const # icons before cotegores - userIcon: string = " " # recomended: " " or "|>" - hnameIcon: string = " " # recomended: " " or "|>" - distroIcon: string = "󰻀 " # recomended: "󰻀 " or "|>" - kernelIcon: string = "󰌢 " # recomended: "󰌢 " or "|>" - uptimeIcon: string = " " # recomended: " " or "|>" - shellIcon: string = " " # recomended: " " or "|>" - pkgsIcon: string = "󰏖 " # recomended: "󰏖 " or "|>" - ramIcon: string = "󰍛 " # recomended: "󰍛 " or "|>" - colorsIcon: string = "󰏘 " # recomended: "󰏘 " or "->" - # please insert any char after the icon - # to avoid the bug with cropping the edge of the icon - - dotIcon: string = "" # recomended: "" or "■" - # icon for demonstrate colors - - const # categories - userCat: string = " user │ " # recomended: " user │ " - hnameCat: string = " hname │ " # recomended: " hname │ " - distroCat: string = " distro │ " # recomended: " distro │ " - kernelCat: string = " kernel │ " # recomended: " kernel │ "- - uptimeCat: string = " uptime │ " # recomended: " uptime │ " - shellCat: string = " shell │ " # recomended: " shell │ " - pkgsCat: string = " pkgs │ " # recomended: " pkgs │ " - ramCat: string = " memory │ " # recomended: " memory │ " - colorsCat: string = " colors │ " # recomended: " colors │ " - - let # all info about system - userInfo: string = getUser() # get user through $USER env variable - hostnameInfo: string = getHostname() # get Hostname hostname through /etc/hostname - distroInfo: string = getDistro() # get distro through /etc/os-release - kernelInfo: string = getKernel() # get kernel through /proc/version - uptimeInfo: string = getUptime() # get Uptime through /proc/uptime file - shellInfo: string = getShell() # get shell through $SHELL env variable - pkgsInfo: string = getPkgs(distroId) # get amount of packages in distro - ramInfo: string = getRam() # get ram through /proc/meminfo - - const # aliases for colors - color1: ForegroundColor = fgRed - color2: ForegroundColor = fgYellow - color3: ForegroundColor = fgGreen - color4: ForegroundColor = fgCyan - color5: ForegroundColor = fgBlue - color6: ForegroundColor = fgMagenta - color7: ForegroundColor = fgWhite - color8: ForegroundColor = fgBlack - color0: ForegroundColor = fgDefault - - # colored out - stdout.styledWrite(styleBright, logoColor, defaultLogo) - stdout.styledWrite(styleBright, " ╭───────────╮\n") - stdout.styledWrite(styleBright, " │ ", color1, userIcon, color0, userCat, color1, userInfo, "\n") - stdout.styledWrite(styleBright, " │ ", color2, hnameIcon, color0, hnameCat, color2, hostnameInfo, "\n") - stdout.styledWrite(styleBright, " │ ", color3, distroIcon, color0, distroCat, color3, distroInfo, "\n") - stdout.styledWrite(styleBright, " │ ", color4, kernelIcon, color0, kernelCat, color4, kernelInfo, "\n") - stdout.styledWrite(styleBright, " │ ", color5, uptimeIcon, color0, uptimeCat, color5, uptimeInfo, "\n") - stdout.styledWrite(styleBright, " │ ", color6, shellIcon, color0, shellCat, color6, shellInfo, "\n") - stdout.styledWrite(styleBright, " │ ", color1, pkgsIcon, color0, pkgsCat, color1, pkgsInfo, "\n") - stdout.styledWrite(styleBright, " │ ", color2, ramIcon, color0, ramCat, fgYellow, ramInfo, "\n") - stdout.styledWrite(styleBright, " ├───────────┤\n") - stdout.styledWrite(styleBright, " │ ", color7, colorsIcon, color0, colorsCat, color7, dotIcon, " ", color1, dotIcon, " ", color2, dotIcon, " ", color3, dotIcon, " ", color4, dotIcon, " ", color5, dotIcon, " ", color6, dotIcon, " ", color8, dotIcon, "\n") - stdout.styledWrite(styleBright, " ╰───────────╯\n\n") +const # icons before categories + userIcon = " " # Nerd Font icon + # or + userIcon = "|>" # Plain text fallback ``` -# Building 📦 -### 0) install [nim](https://nim-lang.org/) +**Supported Distros:** +- Arch Linux, CachyOS, Manjaro +- Debian, Ubuntu, Linux Mint +- Fedora, CentOS, RHEL +- openSUSE, Gentoo, Slackware +- Pop!_OS, Zorin OS +- Void Linux, NixOS +- And more... -### 1) clone repo -```fish -git clone https://github.com/ruxir-ig/nitch.git -``` -### 2) change dir to `nitch` -```fish -cd nitch/ -``` +--- + +## Project Structure -### 3) build program with `nimble` -```fish -nimble build ``` -After that you will get a ready-made binary file in the root directory of the project. - -
- -# File architecture 📁 -```fish -nitch - ├── LICENSE - ├── nitch - ├── nitch.nimble - ├── README.md - ├── src - │ ├── assets - │ │ ├── assets.nim - │ │ └── logos.nim - │ ├── flags - │ │ └── argParser.nim - │ ├── funcs - │ │ ├── drawing.nim - │ │ ├── packages - │ │ │ └── getPacmanPkgs.nim - │ │ └── perform.nim - │ ├── nitches - │ │ ├── getDistro.nim - │ │ ├── getHostname.nim - │ │ ├── getKernel.nim - │ │ ├── getPkgs.nim - │ │ ├── getRam.nim - │ │ ├── getShell.nim - │ │ ├── getUptime.nim - │ │ └── getUser.nim - │ ├── nitch.nim - │ └── nitch.nim.cfg - └── templates - ├── cfgParser - ├── cfgParser.nim - ├── data.dat - ├── listFiles.nim - ├── readLine.nim - ├── refTest.nim - ├── shellCheck.nim - ├── test.cfg - ├── testFile - └── testProc.nim - - 7 directories, 30 files +nitch/ +├── src/ +│ ├── nitch.nim # Main entry (Nerd Font) +│ ├── nitchNoNerd.nim # Main entry (Non-Nerd Font) +│ ├── assets/ +│ │ ├── assets.nim # Help text, version +│ │ └── logos.nim # ASCII logos +│ ├── flags/ +│ │ └── argParser.nim # CLI argument parser +│ ├── funcs/ +│ │ ├── drawing.nim # Output rendering (Nerd) +│ │ ├── drawingNoNerd.nim +│ │ ├── perform.nim # Action handlers +│ │ └── packages/ # Package managers +│ └── nitches/ # System info fetchers +├── PKGBUILD # Arch Linux package +├── setup.sh # Quick installer +└── nitch.nimble # Nim package config ``` -# Thanks for ideas & examples 💬 -- [pfetch](https://github.com/dylanaraps/pfetch/) -- [neofetch](https://github.com/dylanaraps/neofetch) -- [paleofetch](https://github.com/ss7m/paleofetch) -- [rxfetch](https://github.com/Mangeshrex/rxfetch) -- [nerdfetch](https://github.com/ThatOneCalculator/NerdFetch) +--- + +## Contributing + +Contributions are welcome! Feel free to: +- Report bugs +- Suggest new features +- Add support for more distros +- Submit pull requests + +--- + +## License + +MIT License — see [LICENSE](LICENSE) + +--- + +## Credits + +- Original project by [unxsh](https://github.com/unxsh/nitch) +- Inspired by [pfetch](https://github.com/dylanaraps/pfetch), [neofetch](https://github.com/dylanaraps/neofetch), [paleofetch](https://github.com/ss7m/paleofetch) diff --git a/src/funcs/drawingNoNerd.nim b/src/funcs/drawingNoNerd.nim index b45ee61..3a6877f 100644 --- a/src/funcs/drawingNoNerd.nim +++ b/src/funcs/drawingNoNerd.nim @@ -18,19 +18,19 @@ proc drawInfo*(asciiArt: bool) = # (fgRed, nitchLogo) const # icons before cotegores (non-Nerd Font) - userIcon = "|> " # non-nerd alternative - hnameIcon = "|> " # non-nerd alternative - distroIcon = "|> " # non-nerd alternative - kernelIcon = "|> " # non-nerd alternative - uptimeIcon = "|> " # non-nerd alternative - shellIcon = "|> " # non-nerd alternative - pkgsIcon = "|> " # non-nerd alternative - ramIcon = "|> " # non-nerd alternative - colorsIcon = "-> " # non-nerd alternative + userIcon = "> " # non-nerd alternative (1 char + space = 2 cols) + hnameIcon = "> " # non-nerd alternative + distroIcon = "> " # non-nerd alternative + kernelIcon = "> " # non-nerd alternative + uptimeIcon = "> " # non-nerd alternative + shellIcon = "> " # non-nerd alternative + pkgsIcon = "> " # non-nerd alternative + ramIcon = "> " # non-nerd alternative + colorsIcon = "> " # non-nerd alternative # please insert any char after the icon # to avoid the bug with cropping the edge of the icon - dotIcon = "■" # non-nerd alternative + dotIcon = "#" # non-nerd alternative # icon for demonstrate colors const # categories From e0e7ea5645faa0d3ad3cb940b2cc62f8c300dfee Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 12:22:03 +0530 Subject: [PATCH 07/19] Update README.md to enhance Nerd Font version preview with updated icons and system info --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 822068c..6f04cdd 100644 --- a/README.md +++ b/README.md @@ -29,21 +29,21 @@ - **Lightweight** — ~150KB binary - **Multi-Distro** — Supports Arch, CachyOS, Debian, Ubuntu, Fedora, and more -## Preview +## Preview (without logo) **Nerd Font version:** ``` ╭───────────╮ - │ user │ ruxir - │ hname │ odysseus + │  user │ ruxir + │  hname │ odysseus │ 󰻀 distro │ CachyOS │ 󰌢 kernel │ 6.18.2-2-cachyos - │ uptime │ 1h 30m - │ shell │ zsh + │  uptime │ 2h 43m + │  shell │ zsh │ 󰏖 pkgs │ 1536 - │ 󰍛 memory │ 4096 | 16384 MiB + │ 󰍛 memory │ 8512 | 15708 MiB ├───────────┤ - │ 󰏘 colors │ + │ 󰏘 colors │         ╰───────────╯ ``` From f5b3864763bd13599cadff68921f2c0208b276f7 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 15:12:28 +0530 Subject: [PATCH 08/19] Fix PKGBUILD version to 0.2.2 and update checksum placeholder --- PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 29ea391..cd80d3d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,9 +1,9 @@ -# Maintainer: ruxir-ig +# Maintainer: ruxir-ig # Contributor: unxsh (original author) pkgbase=nitch pkgname=('nitch' 'nitch-nonerd') -pkgver=0.2.3 +pkgver=0.2.2 pkgrel=1 pkgdesc="Incredibly fast system fetch written in Nim" arch=('x86_64') @@ -11,7 +11,7 @@ url="https://github.com/ruxir-ig/nitch" license=('MIT') makedepends=('nim' 'nimble') source=("$pkgbase-$pkgver.tar.gz::https://github.com/ruxir-ig/nitch/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('fbacfc3926a857d1f688f0e65fd0b68bfaea6f7c5d59a7606d3fbbb87bf1428c') +sha256sums=('SKIP') # Update with actual checksum after release build() { cd "$pkgbase-$pkgver" From 6d034eef22fe554b7f337b9abf493931293bb162 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 15:15:40 +0530 Subject: [PATCH 09/19] Add .SRCINFO file for package metadata and dependencies --- .SRCINFO | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .SRCINFO diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..e273572 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = nitch + pkgdesc = Incredibly fast system fetch written in Nim + pkgver = 0.2.2 + pkgrel = 1 + url = https://github.com/ruxir-ig/nitch + arch = x86_64 + license = MIT + makedepends = nim + makedepends = nimble + source = nitch-0.2.2.tar.gz::https://github.com/ruxir-ig/nitch/archive/refs/tags/v0.2.2.tar.gz + sha256sums = SKIP + +pkgname = nitch + pkgdesc = Incredibly fast system fetch written in Nim (Nerd Font icons) + optdepends = nerd-fonts: for icon support + +pkgname = nitch-nonerd + pkgdesc = Incredibly fast system fetch written in Nim (no Nerd Font icons) + provides = nitch + conflicts = nitch From a131fae459c4b66391696d7d54173cf97e2212fd Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 15:41:59 +0530 Subject: [PATCH 10/19] Bump version to v0.2.4: update nitch.nimble, PKGBUILD, setup.sh, .SRCINFO --- .SRCINFO | 4 ++-- PKGBUILD | 4 ++-- nitch.nimble | 2 +- setup.sh | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index e273572..4e7cede 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,13 +1,13 @@ pkgbase = nitch pkgdesc = Incredibly fast system fetch written in Nim - pkgver = 0.2.2 + pkgver = 0.2.4 pkgrel = 1 url = https://github.com/ruxir-ig/nitch arch = x86_64 license = MIT makedepends = nim makedepends = nimble - source = nitch-0.2.2.tar.gz::https://github.com/ruxir-ig/nitch/archive/refs/tags/v0.2.2.tar.gz + source = nitch-0.2.4.tar.gz::https://github.com/ruxir-ig/nitch/archive/refs/tags/v0.2.4.tar.gz sha256sums = SKIP pkgname = nitch diff --git a/PKGBUILD b/PKGBUILD index cd80d3d..6f04121 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,9 +1,9 @@ -# Maintainer: ruxir-ig +# Maintainer: ruxir-ig # Contributor: unxsh (original author) pkgbase=nitch pkgname=('nitch' 'nitch-nonerd') -pkgver=0.2.2 +pkgver=0.2.4 pkgrel=1 pkgdesc="Incredibly fast system fetch written in Nim" arch=('x86_64') diff --git a/nitch.nimble b/nitch.nimble index a0692a0..a415478 100644 --- a/nitch.nimble +++ b/nitch.nimble @@ -1,6 +1,6 @@ # Package -version = "0.2.3" +version = "0.2.4" author = "ruxir-ig" description = "System fetch in nim lang" license = "MIT" diff --git a/setup.sh b/setup.sh index 1508700..2b4fa79 100755 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/sh -linkNerd="https://github.com/ruxir-ig/nitch/releases/download/v0.2.3/nitch" -linkNoNerd="https://github.com/ruxir-ig/nitch/releases/download/v0.2.3/nitchNoNerd" +linkNerd="https://github.com/ruxir-ig/nitch/releases/download/v0.2.4/nitch" +linkNoNerd="https://github.com/ruxir-ig/nitch/releases/download/v0.2.4/nitchNoNerd" sudo rm -fv /usr/local/bin/nitch From 6d48619edb72da72db8604ad4803e3dd6f5181f9 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Fri, 2 Jan 2026 15:44:22 +0530 Subject: [PATCH 11/19] Update PKGBUILD and .SRCINFO with release tarball sha256 --- .SRCINFO | 2 +- PKGBUILD | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 4e7cede..393363e 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -8,7 +8,7 @@ pkgbase = nitch makedepends = nim makedepends = nimble source = nitch-0.2.4.tar.gz::https://github.com/ruxir-ig/nitch/archive/refs/tags/v0.2.4.tar.gz - sha256sums = SKIP + sha256sums = 8e386ba7cbf53cc1a5017d209e5b369cbd16df3f47f7e3cf1af9bb28d12aec44 pkgname = nitch pkgdesc = Incredibly fast system fetch written in Nim (Nerd Font icons) diff --git a/PKGBUILD b/PKGBUILD index 6f04121..daae00b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -11,7 +11,7 @@ url="https://github.com/ruxir-ig/nitch" license=('MIT') makedepends=('nim' 'nimble') source=("$pkgbase-$pkgver.tar.gz::https://github.com/ruxir-ig/nitch/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('SKIP') # Update with actual checksum after release +sha256sums=('8e386ba7cbf53cc1a5017d209e5b369cbd16df3f47f7e3cf1af9bb28d12aec44') # Release tarball sha256 build() { cd "$pkgbase-$pkgver" From cd39d2e7146134bf65c8385cdfebca016467215a Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Sat, 3 Jan 2026 00:04:29 +0530 Subject: [PATCH 12/19] Add CI workflow (build & packaging sanity) and release workflow (build on tag + upload binaries) --- .github/workflows/ci.yml | 51 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 37 +++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..22a5c7c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + name: Build binaries + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install choosenim (Nim toolchain) + run: | + curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y + echo "$HOME/.nimble/bin" >> $GITHUB_PATH + echo "$HOME/.nim/bin" >> $GITHUB_PATH + + - name: Show Nim version + run: nim --version + + - name: Build Nerd Font binary + run: nimble build -d:release -y + + - name: Build Non-Nerd Font binary + run: nim c -d:release -o:nitchNoNerd src/nitchNoNerd.nim + + - name: Upload binaries as workflow artifacts + uses: actions/upload-artifact@v4 + with: + name: nitch-binaries + path: | + ./nitch + ./nitchNoNerd + + packaging-sanity: + name: Packaging sanity check + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Validate .SRCINFO matches PKGBUILD (run in Arch container) + run: | + docker pull archlinux:latest + docker run --rm -v "${{ github.workspace }}":/work -w /work archlinux:latest /bin/bash -lc "pacman -Sy --noconfirm --needed base-devel git nim && makepkg --printsrcinfo > .SRCINFO.new && diff -u .SRCINFO .SRCINFO.new || (echo '.SRCINFO mismatch' && exit 1)" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c42461b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install choosenim (Nim toolchain) + run: | + curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y + echo "$HOME/.nimble/bin" >> $GITHUB_PATH + echo "$HOME/.nim/bin" >> $GITHUB_PATH + + - name: Build Nerd Font binary + run: nimble build -d:release -y + + - name: Build Non-Nerd Font binary + run: nim c -d:release -o:nitchNoNerd src/nitchNoNerd.nim + + - name: Create release and upload assets + uses: ncipollo/release-action@v1 + with: + tag: ${{ github.ref_name }} + name: ${{ github.ref_name }} + files: | + nitch + nitchNoNerd From 05b98e4b47d320b683e01ebcba71561b2a6286a8 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Sat, 3 Jan 2026 00:18:30 +0530 Subject: [PATCH 13/19] Run makepkg as non-root in Arch container for packaging sanity check --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22a5c7c..4db5814 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,4 +48,9 @@ jobs: - name: Validate .SRCINFO matches PKGBUILD (run in Arch container) run: | docker pull archlinux:latest - docker run --rm -v "${{ github.workspace }}":/work -w /work archlinux:latest /bin/bash -lc "pacman -Sy --noconfirm --needed base-devel git nim && makepkg --printsrcinfo > .SRCINFO.new && diff -u .SRCINFO .SRCINFO.new || (echo '.SRCINFO mismatch' && exit 1)" + docker run --rm -v "${{ github.workspace }}":/work -w /work archlinux:latest /bin/bash -lc "\ + pacman -Sy --noconfirm --needed base-devel git nim && \ + useradd -m builder && \ + chown -R builder:builder /work && \ + su builder -c 'cd /work && makepkg --printsrcinfo > .SRCINFO.new' && \ + diff -u .SRCINFO .SRCINFO.new || (echo '.SRCINFO mismatch' && exit 1)" From 6c834492b50a752c4695eaa7b9c129cc50ce76bf Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Sat, 3 Jan 2026 00:24:59 +0530 Subject: [PATCH 14/19] Run packaging check inside container using a repo clone (avoid chown on workspace) --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4db5814..d805987 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,9 +48,10 @@ jobs: - name: Validate .SRCINFO matches PKGBUILD (run in Arch container) run: | docker pull archlinux:latest - docker run --rm -v "${{ github.workspace }}":/work -w /work archlinux:latest /bin/bash -lc "\ + docker run --rm -e GITHUB_REPOSITORY='${{ github.repository }}' -e GITHUB_SHA='${{ github.sha }}' archlinux:latest /bin/bash -lc "\ pacman -Sy --noconfirm --needed base-devel git nim && \ useradd -m builder && \ - chown -R builder:builder /work && \ - su builder -c 'cd /work && makepkg --printsrcinfo > .SRCINFO.new' && \ + git clone https://$GITHUB_REPOSITORY /tmp/nitch && \ + cd /tmp/nitch && git checkout $GITHUB_SHA || true && \ + su builder -c 'cd /tmp/nitch && makepkg --printsrcinfo > .SRCINFO.new' && \ diff -u .SRCINFO .SRCINFO.new || (echo '.SRCINFO mismatch' && exit 1)" From 32d46be67bfe145ba9518bd4f3149cd14dba9965 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Sat, 3 Jan 2026 00:27:55 +0530 Subject: [PATCH 15/19] Fix git clone URL in packaging sanity check --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d805987..9133002 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,8 @@ jobs: docker run --rm -e GITHUB_REPOSITORY='${{ github.repository }}' -e GITHUB_SHA='${{ github.sha }}' archlinux:latest /bin/bash -lc "\ pacman -Sy --noconfirm --needed base-devel git nim && \ useradd -m builder && \ - git clone https://$GITHUB_REPOSITORY /tmp/nitch && \ - cd /tmp/nitch && git checkout $GITHUB_SHA || true && \ + git clone https://github.com/\$GITHUB_REPOSITORY /tmp/nitch && \ + cd /tmp/nitch && git checkout \$GITHUB_SHA || true && \ + chown -R builder:builder /tmp/nitch && \ su builder -c 'cd /tmp/nitch && makepkg --printsrcinfo > .SRCINFO.new' && \ diff -u .SRCINFO .SRCINFO.new || (echo '.SRCINFO mismatch' && exit 1)" From a8c3f30d87e8d3e3f89b0c55baed6299b9283022 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Mon, 5 Jan 2026 22:28:07 +0530 Subject: [PATCH 16/19] Fix Verify binaries run block formatting --- .github/workflows/release.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c42461b..ebc6a61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Install choosenim (Nim toolchain) run: | @@ -27,11 +29,26 @@ jobs: - name: Build Non-Nerd Font binary run: nim c -d:release -o:nitchNoNerd src/nitchNoNerd.nim - - name: Create release and upload assets - uses: ncipollo/release-action@v1 + - name: Verify binaries + run: | + ls -la nitch nitchNoNerd || (echo "build failed: binaries missing" && exit 1) + chmod +x nitch nitchNoNerd || true + + - name: Create GitHub release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: ${{ github.ref_name }} + body: "Release ${{ github.ref_name }}" + draft: false + prerelease: false + + - name: Upload release assets + uses: softprops/action-gh-release@v1 with: - tag: ${{ github.ref_name }} - name: ${{ github.ref_name }} files: | nitch nitchNoNerd + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d02d4147f464ec3216606ae738db2b9dc2a7324d Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Mon, 5 Jan 2026 22:29:30 +0530 Subject: [PATCH 17/19] Pass GITHUB_TOKEN to actions/create-release --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebc6a61..465c71d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,7 @@ jobs: id: create_release uses: actions/create-release@v1 with: + token: ${{ secrets.GITHUB_TOKEN }} tag_name: ${{ github.ref_name }} release_name: ${{ github.ref_name }} body: "Release ${{ github.ref_name }}" From 4e72d995ba31672df08f0e5a42c95a657240a25e Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Mon, 5 Jan 2026 22:31:01 +0530 Subject: [PATCH 18/19] Provide GITHUB_TOKEN via env to create-release step --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 465c71d..0052944 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,8 +37,9 @@ jobs: - name: Create GitHub release id: create_release uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - token: ${{ secrets.GITHUB_TOKEN }} tag_name: ${{ github.ref_name }} release_name: ${{ github.ref_name }} body: "Release ${{ github.ref_name }}" From f780104aac00c42ade426a4fd21904f883e83115 Mon Sep 17 00:00:00 2001 From: Ruchir Kalokhe Date: Mon, 5 Jan 2026 22:36:37 +0530 Subject: [PATCH 19/19] Mark '-ci-test' tag releases as prerelease --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0052944..6812e9d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: release_name: ${{ github.ref_name }} body: "Release ${{ github.ref_name }}" draft: false - prerelease: false + prerelease: ${{ contains(github.ref_name, '-ci-test') }} - name: Upload release assets uses: softprops/action-gh-release@v1