Giter Site home page Giter Site logo

nitch's Introduction

sfome

zstd compressed mind

I'm too lazy to develop anything, so during work hours
I write this readme on github, thinking I'm the coolest developer on earth.
At the same time I'm thinking about how nice it would be to take this cute girl
out for a walk or something.

If you still think I'm a good developer,
you've probably met a very arrogant me on one of the discord servers,
furiously trying to prove a completely unviable theory or some other unnecessary bullshit.

discord & telegram: slugonme @ssleert

some of my code examples

Dude, do you really think I'm going to brag about my code?

nitch's People

Contributors

da-strange-boi avatar dadyarri avatar dou2ble avatar emanuelep57 avatar gfidder avatar jabuxas avatar juliusdeboer avatar linuxxx0 avatar prsh11 avatar qazerito avatar sp-xd avatar ssleert avatar teenarp2003 avatar xdream8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nitch's Issues

Used Memory

Hi,
Just want to say you have an excellent job on nitch, But as you probably already know, there are different versions on how used memory should be displayed, I did notice on nitch that it takes TotalMem - AvailableMem to get UsedMem. I just wanted to make you aware of the formula that htop uses and which has derived from a write up on Kernel.org
https://www.kernel.org/doc/Documentation/filesystems/proc.txt

basically htop originally used MemUsed = MemTotal - MemFree - Cached - Buffers - SReclaimable + Shmem

Then some patches made it in the kernel changed the way SharedMem and Cached are calculated, I haven't personally read the patch notes https://lore.kernel.org/lkml/[email protected]/
but it basically comes down to Shmem being part of cache so the accepted formula and the one htop uses is
MemUsed = MemTotal - MemFree - Cached - Buffers - SReclaimable

I have implemented this is my fetch program written Pascal

// Get Memory and usage
function GetRamUsage(): string;
var
  strTmp, strMemTotal, strMemFree, strShmem, strBuffers, strCached,
  strSRclaimable: string;
  intMemUsage, intTotalMem: single;
  slMemInfo: TStringList;
begin
  Result := 'Error';
  // Set the name of the file that will be read
  slMemInfo := TStringList.Create;
  try
    slMemInfo.LoadFromFile('/proc/meminfo');
    try
      // Process MemTotal
      strTmp := slMemInfo.Strings[0];
      strMemTotal := Trim(ExtractString(strTmp, 'MemTotal:', 'kB'));

      // Process MemFree
      strTmp := slMemInfo.Strings[1];
      strMemFree := Trim(ExtractString(strTmp, 'MemFree:', 'kB'));

      // Process Buffers
      strTmp := slMemInfo.Strings[3];
      strBuffers := Trim(ExtractString(strTmp, 'Buffers:', 'kB'));

      // Process Cached
      strTmp := slMemInfo.Strings[4];
      strCached := Trim(ExtractString(strTmp, 'Cached:', 'kB'));

      // Process Shmem
      strTmp := slMemInfo.Strings[20];
      strShmem := Trim(ExtractString(strTmp, 'Shmem:', 'kB'));

      // Process SReclaimable
      strTmp := slMemInfo.Strings[25];
      strSRclaimable := Trim(ExtractString(strTmp, 'SReclaimable:', 'kB'));

      // Calc Mem Total
      intTotalMem := StrToFloat(strMemTotal);

      // Calc Mem Usage
      intMemUsage := (intTotalMem - StrToFloat(strMemFree) - StrToFloat(strBuffers) - 
        StrToFloat(strCached) - StrToFloat(strSRclaimable));
    finally
      slMemInfo.Free;
    end;

  except
    on E: EInOutError do
      writeln('File handling error occurred. Details: ', E.Message);
  end;

  Result := Format('%.2fGB / %.2fGB', [intMemUsage / (1024 * 1024), intTotalMem / (1024 * 1024)]);
end;

I am not saying you should change your formula, just making you aware of the accepted formula used at htop, everyone seems to have a different opinion on this particular topic, and it goes into a lot more discussion at kernel.org and htop github, hope this helps, if not disregard and deleted the topic.

fyi,
programs like btop uses the same formula as nitch, but they are aware of htop and the kernel.org discription
aristocratos/btop#161

Add a release for the new version

The version in nitch.nimble has been upgraded to 0.2.2, but the release tag is still at 0.1.6. We need to bump the release version, or else people or package maintainers won't know a new version is out.

[Feature] Alpine support

Currently alpine doesn't have an ascii art.
I don't particularly need it, I modified the default nitch ascii art so it spells "Alpine" and changed the color, but it would be nice to have by default.
image
The setup script uses sudo, so if you have doas you need to modify it

Some Nerdfont icons not appearing.

Selection_001
I am using the JetBrains Mono Nerdfont.
Here's the font part of my alacritty config:
`font:
normal:
family: JetBrainsMono Nerd Font Mono
style: Regular

bold:
family: JetBrainsMono Nerd Font Mono
style: Bold

italic:
family: JetBrainsMono Nerd Font Mono
style: Italic`

cannot open: /etc/hostname [IOError]

Hi,
After the installation (according to README), I couldn't execute nitch due to the following error:

> nitch
io.nim(759)              open
Error: unhandled exception: cannot open: /etc/hostname [IOError]

FYI, my environment:
os: Arch Linux
kernel: 5.18.15-arch1-1

And, I have etc/hosts on my computer, but not /etc/hostname.

Make the uptime more clear

This might be an intended feature, but I think the uptime is being displayed confusingly. I think you should make it simply display in an HH:MM format.

Add Garuda ASCII Art

I'd love to have the Garuda ASCII Art.

I have trouble finding the config files and logo files to manually add it myself.

Exec format error

If I run nitch after the quick installation it gives me this error:
-bash: /usr/local/bin/nitch: cannot execute binary file: Exec format error
Has to do with my arm computer. Would be great, if you could make it working for it too!

Can colors show the 16 colors of terminal?

I want colors to show the 16 ANSI colors of terminal.

I tried to add fgBrightRed in addition to the default fgRed, but it's undeclared identifier.
What is the name for the base08 -- base0F?

pkgs

nitch isn't displaying the packages correctly on gentoo.

it says pkgs: >3

image

using st terminal

Images in README missing

Images were probably uploaded using GitHub's uploader and for whatever reason have disappeared.

One fix would be to push a branch containing the necessary screenshots and link them from there to the main branch's README. This way the images should be persistent without being checked out by everyone who clones the repo.

EOF error

io.nim(156) raiseEOF
Error: unhandled exception: EOF reached [EOFError]

after installing using the script in the readme on opensuse tw (without nerd fonts)

Wrong packages count on Gentoo

❯ nitch -v
nitch - 0.1.5

---

❯ eix -cI | wc -l
1362

---

❯ ls -d /var/db/pkg/*/* | cut -f "5" -d "/" | wc -l
1241

image

Building nitch locally uses different font used than official build..

Building locally uses a different font..
image
This is the font with official build ..
image
While this is the font used in local build..

Here is my Alacritty config..
image

Can anyone help me with this? is there any fix for this?

official both builds show with different font than local build

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.