Sailfetch

Rating: 
5
Your rating: None Average: 5 (5 votes)

Sailfetch is a Neofetch-like command line utility script for Sailfish OS.

I initially wanted to port Neofetch - or one of its predecessors - to Sailfish OS, but I quickly came to realize that's an unbelievably long and complicated Bash script. Most of it would have been unused for Sailfish OS, and as it's written for Bash, it wouldn't even work on BusyBox Ash.

Thus I essentially took the screenshot of Neofetch and cobbled up something alike.

Source code is available in GitHub.

Screenshots: 

Keywords:

Application versions: 
AttachmentSizeDate
File sailfetch-1.0.0-1.noarch.rpm7.82 KB30/09/2023 - 18:21
File sailfetch-1.1.0-1.noarch.rpm8.46 KB20/11/2023 - 01:29
File sailfetch-1.1.1-1.noarch.rpm8.6 KB20/11/2023 - 13:32
Changelog: 

1.1.1-1

  • Wait up to 2s for `stty size` to report terminal size
    • i.e. Fix using `sailfetch` in `~/.profile` with Fingerterm, ToeTerm etc.

1.1.0-1

  • Add usage text (-h)
  • Add support for flags
  • Make installed package count opt-in (-p)
  • Add support for vertical/horizontal logo vs. details printing (-V/-H)
  • Print details under the logo on narrow screens by default
  • Add flag to disable logo (-l)
  • Initial support for MicroSD card statistics
  • Add flag to disable printing colors (-c)
  • Use Shellcheck to check syntax

1.0.0-1

  • Initial release
  • Print kernel version
  • Print uptime
  • Print CPU and number of cores
  • Print number of installed packages
  • Print PackageKit and BusyBox versions
  • Print memory and disk statistics

Comments

fingus's picture

Cool and thank you. I miss the Resolution-Line :-)
 

explit's picture

Cool, thanks.
How i can setup sailfetch, so that every time terminal or ssh session is startet it would run sailfetch?

On linux i would put it into .bashrc,
But SFOS has no .bashrc :(

direc85's picture

I whipped up a poor man's mitigation (retry-loop with sleep) to mitigate the situation, so now it works correctly without the `sleep 1`. For me it's more like `sleep 0.3` anyway. Now the delay is not noticable, and is up to 0.1s extra.

direc85's picture

Okay, it's a bit hacky, but when I put `sleep 1; sailfetch -lc` to `~/.profile`, it's able to then report the dimensions correctly. It looks like the commands are run before terminal dimensions are determined, and thus `stty` can't report the values.

First I pointed at Fingerterm, but I tested with ToeTerm, and it behaves identically. It could be a bug in BusyBox... Then again, I don't know if POSIX makes any promies about `.profile` or something.

direc85's picture

It looks like putting commands to `~/.profile` does the trick, for ssh connections at least. Fish shell doesn't read the file apparently - that's fine for me, as ssh starts with BusyBox shell anyway.

I noticed that Fingerterm doesn't report terminal width and height, so the auto detection doesn't work there. I see what I can do about it...

JellyRoll's picture

The extra home and root partition information is also very usefull, nice! Thank you for this one.

edp17's picture

Thanks for all your work. Not just this one but all the others. There is a neofetch (by Ferlanero) package available for Sailfish, so that may help you with your version.

direc85's picture

Thank you, I appreciate your words!

I didn't actually realize that Neofetch was already ported to Sailfish, but I might have a look and see if anything inspires me to add a feature I see!

One thing I already noticed was missing is memory card storage, so there will be an update at some point at least :)