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.
Attachment | Size | Date |
---|---|---|
sailfetch-1.0.0-1.noarch.rpm | 7.82 KB | 30/09/2023 - 18:21 |
sailfetch-1.1.0-1.noarch.rpm | 8.46 KB | 20/11/2023 - 01:29 |
sailfetch-1.1.1-1.noarch.rpm | 8.6 KB | 20/11/2023 - 13:32 |
1.1.1-1
1.1.0-1
1.0.0-1
Comments
Ahti30708
Mon, 2023/12/11 - 17:13
Permalink
10 II and 10 III with gnu-bash need the same change as the XA2 above.
2) The SD card is blk1 on the II, blk0 on the III
direc85
Tue, 2023/12/12 - 02:36
Permalink
Thanks for reporting! Sailfetch should run with BusyBox on the device, that may be the culprit independent of GNU Bash being installed or not. Could you please drop in an issue over at GitHub?
The same goes for the memory card partition -- I've seen both the card and the first partition of the card having the file system, so I guess the script should accommodate for both cases. Could you drop in another issue too?
Thanks!
Ahti30708
Tue, 2023/12/05 - 17:13
Permalink
Very nice. On the XA2 and gnu-bash:
Edit: this works for me around line 26:
In line 26 the second < should be $ or something; it starts with $ but doesn't get the screen size and jumps to else.
Edit: "or something" is <<< $( instead of < <(
I commented out the if-then-else
2) The SD card is mmcblk1, not 0.
3) The help text has -V for next to and -H for below.
fingus
Fri, 2023/12/01 - 12:47
Permalink
Cool and thank you. I miss the Resolution-Line :-)
direc85
Tue, 2023/12/12 - 02:37
Permalink
Screen resolution (and orientation) would be a nice addition! Could you drop in a GitHub issue? Thanks!
explit
Mon, 2023/11/20 - 06:52
Permalink
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
Mon, 2023/11/20 - 13:38
Permalink
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
Mon, 2023/11/20 - 12:55
Permalink
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
Mon, 2023/11/20 - 12:41
Permalink
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
Wed, 2023/10/04 - 03:34
Permalink
The extra home and root partition information is also very usefull, nice! Thank you for this one.
edp17
Sun, 2023/10/01 - 12:33
Permalink
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
Wed, 2023/10/04 - 21:08
Permalink
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 :)