The Should Work Everywhere Fetch.
Example of the fetch on ubuntu
Written mainly in Lua, SWEF is a generic system fetch that works (nearly) everywhere, even on windows, without emulating shells or using some weird compatibility layes. The only dependencies are Lua (5.1+) and xprop, but xprop is required only on X11 systems, meaning that you dont need it for android, MacOs, windows and wayland systems. Also Xprop is usually preinstalled on X11 systems, but double-checking never hurts :)
Clone the repo:
git clone https://github.com/rice7th/swef
Then build install it in these ways, depending on the system:
use the makefile:
sudo make install
again use the makefile:
sudo make install
Make sure to use Termux.
pkg install lua # or luajit
git clone https://github.com/rice7th/swef/
cd swef
chmod +x src/swef
cp src/swef /data/data/com.termux/files/usr/bin
run the file every time you want to use it i think
lua53 C:\path\to\swef
or use a batch file idk
lua53 C:\path\to\swef
and then run the batch file:
C:\path\to\batch_file.bat
also note that you can move the batchfile into C:\Program Files\swef\ and it will run as a program
replace lua53 with your current lua version: e.g. if you have lua 5.4 installed, replace lua53
with lua54
I could not believe i've managed to do this...
first, grab git. If you are on 9Front it is preinstalled, otherwise you should download git9 by Oridb. Next, install Lu9, Lua with full plan9/9front support. You can read the instructions here Finally, clone this repo and run swef:
git/clone https://github.com/rice7th/swef/
cd swef/src
lu9 swef -n
Escape codes are not supported on plan9/9front, so make sure to run swef with the -n
or the --no-color
flag to avoid fancy issues.
The fetch (as the name suggests) SHOULD work everywhere; These are the places where i tested it:
- Kubuntu 20.04 (Kde, X11, AwesomeWM)
- Fedora 35 (Gnome, Wayland, Mutter)
- Alpine Linux 3.15 (XFCE, X11, XFWM4)
- Void Linux (none, x11, AwesomeWM)
- Arch Linux (Gnome, x11, AwesomeWM)
- Windows 10 Pro (Metro, ??, Explorer)
- Android 9 (Material, ??, are there WMs for android?)
- MacOS Big Sur (Aero, Quartz, Quartz Compositor)
- Haiku (??, ??, ??)
- FreeBSD (none, tty, none)
- Plan9/9Front :v
- SerenityOS
- Windows
- MacOS
- Linux: both GNU and Busybox and both GLibC and Musl
- Android (requires Termux)
- Haiku
- Plan9
- 9Front
- FreeBSD (no ascii tho)
- NetBSD
- SerenityOS
a checked box means there is support and someone made it work, but it has not been tested at all.
- OpenBSD
- DragonflyBSD
- MidnightBSD
- HarveyOS
- AIX
- MINIX
- IRIX
- FreeMiNT
- Inferno
- BeOS (original)
- OS/2
- ArcaOS
- AmigaOS
- MorphOS
- iOS (via OpenTerm i guess?)
- iPadOS (same as iOS)
- HelenOS
- Redox (we have hope since we have an actual rust lua interpreter)
- BlackBerry OS
- TempleOS (unless someone writes a lua interpreter in holyc i dont see that coming)
- Vinix (there is VLua and GCC 12 with MLibC was ported, but i am not completely sure it'll work lol)
- KolibriOS
- Managram (Maybe? Their LibC (mLibC) seems good enough for Lua)
- GhostOS
For the rest it should work fine on tons of platforms. At least where Lua is supported, and Lua is built in ANSI C (C89), meaning that it can be compiled nearly everywhere, with some patches. If your os is not supported (e.g. no ascii available or the os is not recognised) you can enjoy a cute cat art that changes breeed randomly as a replacement. If you REALLY want a new ascii art for your system, then please submit a github issue.
- OS name
- Window Manager
(Non EWMH wm's are comin!)Non EWMH linux wm's are here, plus MacOS, FreeMiNT and Windows WM's support! - Kernel
- Shell 👌
Maybe in the future:
- Hostname
- User
- CPU
- RAM
- Disk space
- Uptime
- Package Number
- ???
Lua: https://www.lua.org/download.html
xprop (only for X11 systems, e.g. Linux w/ X11, FreeBSD, NetBSD, OpenBSD, Minix etc)
Thats it.
Thanks for using swef.