This commit is contained in:
2026-04-09 01:27:48 +02:00
parent 48740c1ffa
commit 49bde10d63

View File

@@ -1,13 +1,13 @@
# linuxSmartie
Alphanumeric LCD controller software for Linux (kind of LCDSmartie for Windows but no GUI, no config file, no plugins, no Windows).
~~Written with C++26 (`-std=c++2c`), will need at least gcc 14 to compile.~~ Uhm actually written with C++20 now, I was only really using `std::print` from 26, let us not fall for memes. Will need gcc 10 to compile. GCC actually made C++20 the default since v16.
~~Written with C++26 (`-std=c++2c`), will need at least gcc 14 to compile.~~ Uhm actually written with C++20 now, I was only really using `std::print` from 26. Let us not fall for memes. Will need gcc 10 to compile. GCC actually made C++20 the default since v16.
We can't go lower than C++20, we use too much shit introduced by it (std::format, std::chrono stuff mostly).
Hardcoded to work with 4x40 character display because that's what I have and I don't plan on using anything else. Uses Matrix Orbital protocol over serial. Should work with most other display sizes by modifying `src/LCDDisplay.cpp`. Best of luck.
Hardcoded to work with 4x40 character display because that's what I have and I don't plan on using anything else. Uses Matrix Orbital protocol over serial. Should work with most other display sizes by modifying `src/LCDDisplay.cpp`. Best of luck if you try to make it work with anything else.
Vaguely inspired by suckless software philosophy.
Vaguely inspired by suckless software philosophy, as in:
## The config is the source code
Same as plugins. Just write in more features scrub, learn some C++, damn
@@ -20,7 +20,8 @@ Same as plugins. Just write in more features scrub, learn some C++, damn
- In the LCDDisplay lib, reimplement all the features I have in picoSmartie + maybe finally add keypad support for both so I can toggle backlight (?) or change screens if I want any
- Screens could be automatic tbh, like if it detects media playing it switches to media screen, if in media screen and GPU power > 80W it switches to main (hwmon) screen
- Try to be C++, avoid globals, wrap in namespaces, use naming conventions, use classes, avoid pure C way of doing things unless it makes more sense (which it often does tbh, better for reading small files)
- **HUGE REWRITE FROM SCRATCH IN C LIKE GOD ALWAYS INTENDED** but fuuuuck display thread would be so painful without std::string. And I really would need to start a whole ass project from a clean slate since I made it a point to use a lot of C++ features which now bite me in the ass. Fuck it man let's leave it. Make it C++17 or 20 or sth so it compiles on yo mama or sth.
- **FUCK C++, HUGE REWRITE FROM SCRATCH IN C LIKE GOD ALWAYS INTENDED** but fuuuuck display thread would be so painful without std::string. And I really would need to start a whole ass project from a clean slate since I made it a point to use a lot of C++ features which now bite me in the ass.
- Fuck it man, nvm let's leave it. Make it C++17 or 20 or sth so it compiles on yo mama or sth.
## LCD layout
It looks something like this
@@ -71,20 +72,12 @@ sudo apt install build-essential cmake libwebsockets-dev nlohmann-json3-dev
make configure
make build
```
Might set up a distrobox container, with distrobox-assemble
You're probably on some meme immutable distro so use Debian 13 on distrobox. Ubuntu 24.04 should also work. Might set up a distrobox container file, with distrobox-assemble (?)
### Additional notes
- To read motherboard sensors on ASUS ROG STRIX B550-A GAMING, as of Linux 6.16 you need to boot with kernel parameter of `acpi_enforce_resources=lax` and load the `nct6775` module.
- On Fedora it can be added by appending it to `/etc/kernel/cmdline`.
- On atomic desktops, `rpm-ostree kargs --append-if-missing=acpi_enforce_resources=lax`
- To read motherboard sensors on ASUS ROG STRIX B550-A GAMING, as of Linux 6.16 (and up) you need to boot with kernel parameter of `acpi_enforce_resources=lax` and load the `nct6775` module.
- On Fedora Workstation it can be added by appending it to `/etc/kernel/cmdline`.
- On atomic desktops (Silverblue/Kinoite), `rpm-ostree kargs --append-if-missing=acpi_enforce_resources=lax`
- You need to be able to read RAPL as user. Create in `/etc/tmpfiles.d/intelrapl.conf` with content `z- /sys/class/powercap/intel-rapl:0/energy_uj 0440 root uucp - -`. Adjust uucp to whatever group applicable, like `dialout`.
- `compile_commands.json` is so clang understands this project, so we can edit it with helix/neovim. Generated with `bear -- make`, make sure to run `make clean` beforehand.
### Libraries needed for compilation
- libwebsockets
- openssl
- nlohmann/json
Idk if I should use a package manager for these or sth