From 72858a9c96a4d50bd4bd8874e2ba63cabfcd2667 Mon Sep 17 00:00:00 2001 From: javalsai Date: Thu, 5 Sep 2024 19:07:08 +0200 Subject: [PATCH] format: markdown files --- INSTALL.md | 11 +++++--- README.md | 56 +++++++++++++++++++++++++-------------- assets/pkg/aur/README.md | 4 ++- assets/services/README.md | 8 +++++- themes/README.md | 10 ++++++- 5 files changed, 63 insertions(+), 26 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index c768aa7..c8c48e6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -45,20 +45,25 @@ make install-service-s6 # s6 ``` # AUR -[AUR packages](https://aur.archlinux.org/packages?K=lidm&SeB=n) will automatically install most files. -> [!CAUTION] +[AUR packages](https://aur.archlinux.org/packages?K=lidm\&SeB=n) will automatically install most files. + +> \[!CAUTION] > [service files](./assets/pkg/aur#services) have to be manually installed by now. # Nix Flake + You can install by doing + ```sh nix profile install github:javalsai/lidm ``` + or try it out without installing by: + ```sh nix run github:javalsai/lidm ``` -> [!CAUTION] +> \[!CAUTION] > This doesn't include [service files](./assets/pkg/aur#services) neither diff --git a/README.md b/README.md index 7d6d734..3d745ba 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,19 @@ [![Latest Release](https://badgen.net/github/release/javalsai/lidm)](https://github.com/javalsai/lidm/releases) # LiDM + LiDM is a really light UI portion a unix [login manager](https://en.wikipedia.org/wiki/Login_manager) made in C, highly customizable and held together by hopes and prayers 🙏. LiDM is like any [X Display Manager](https://en.wikipedia.org/wiki/X_display_manager) you have seen such as SDDM or GDM but without using X org graphics, instead being a purely [text based interface](https://en.wikipedia.org/wiki/Text-based_user_interface). ![demo gif](assets/media/lidm.gif) + > *shown as in a featured terminal emulator, actual linux console doesn't support as much color and decorations* > *however, all colors and strings are fully customizable* ## Features + * Builds **FAST**. * `a32e4a5`: * `2.830s`: laptop, -O3, -j2, `AMD E-450 APU with Radeon(tm) HD Graphics` @@ -27,6 +30,7 @@ LiDM is like any [X Display Manager](https://en.wikipedia.org/wiki/X_display_man * Starts with many init systems (systemd, dinit, runit, openrc and s6). ## WIP + * Desktop's file `TryExec` key. * Save last selection. * Show/hide passwd switch. @@ -34,36 +38,42 @@ LiDM is like any [X Display Manager](https://en.wikipedia.org/wiki/X_display_man * UTF characters or any multi-byte character, not yet supported properly, everything treats characters as a single byte, some chars might work or not depending on the context, but it's not designed to. # Index -- [LiDM](#lidm) - - [Features](#features) - - [WIP](#wip) -- [Index](#index) -- [Ideology](#ideology) -- [Usage](#usage) - - [Arguments](#arguments) - - [Program](#program) -- [Requirements](#requirements) -- [Installation](#installation) - - [Manually](#manually) - - [AUR](#aur) -- [Configuring](#configuring) -- [Contributing](#contributing) -- [Backstory](#backstory) -- [Contributors](#contributors) + +* [LiDM](#lidm) + * [Features](#features) + * [WIP](#wip) +* [Index](#index) +* [Ideology](#ideology) +* [Usage](#usage) + * [Arguments](#arguments) + * [Program](#program) +* [Requirements](#requirements) +* [Installation](#installation) + * [Manually](#manually) + * [AUR](#aur) +* [Configuring](#configuring) +* [Contributing](#contributing) +* [Backstory](#backstory) +* [Contributors](#contributors) # Ideology + We all know that the most important thing in a project is the ideology of the author and the movements he wants to support, so [**#stopchatcontrol**](https://stopchatcontrol.eu). [ ![stopchatcontrol](https://stopchatcontrol.eu/wp-content/uploads/2023/09/1-1-1024x1024.png) ](https://stopchatcontrol.eu) + > *there's also a [change.org post](https://www.change.org/p/stoppt-die-chatkontrolle-grundrechte-gelten-auch-im-netz).* - # Usage + ### Arguments + If a single argument is provided (don't even do `--` or standard parsing...), it passes that argument to `chvt` on startup, used (at least) by most service files. ### Program + On top of pure intuition: + * You can change focus of session/user/passwd with up/down arrows. * In case arrow keys do nothing on the focused input (Either is empty text or doesn't have more options), it tries to change session and if there's only one session it changes user. * Typing anything will allow to put a custom user or shell command too, you can use arrow keys to move. @@ -71,6 +81,7 @@ On top of pure intuition: * Editing a predefined option on a user or a shell session, will put you in edit mode preserving the original value, other cases start from scratch. # Requirements + * A computer with unix based system. * That system should have the resources necessary for this program to make sense (Sessions, users...). * A compiler (optional, you can compile by hand, but I doubt you want to see the code). @@ -78,22 +89,26 @@ On top of pure intuition: * PAM, used for user authentication, just what `login` or `su` use internally. Don't worry, it's surely pre-installed. # Installation + Check the [installation guide](./INSTALL.md) to use your prefered installation source. # Configuring + Copy any `.ini` file from [`themes/`](./themes/) (`default.ini` will always be updated) to `/etc/lidm.ini` and/or configure it to your liking. Also, don't place empty lines (for now). You can also set `LIDM_CONF` environment variable to specify a config path. Configured colors are just gonna be put inside `\x1b[...m`, ofc you can add an 'm' to break this and this can f\*ck up really bad or even make some nice UI effect possible, you should also be able to embed the `\x1b` byte in the config as I won't parse escape codes, I think that the parser is just gonna grab anything in the config file from the space after the `=` (yes, I'ma enforce that space, get good taste if you don't like it) until the newline, you can put any abomination in there. But please, keep in mind this might break easily. The default fg style should disable decorators set up in other elements (cursive, underline... it's just adding 20 to the number btw, so if cursive is 4 (iirc), disabling it is 24). -> [!TIP] +> \[!TIP] > If you don't like seeing an element, you can change the fg color of it to be the same as the bg, making it invisible. # Contributing + If you want to contribute check the [CONTRIBUTING.md](docs/CONTRIBUTING.md) # Backstory + Summer travelling to visit family with an old laptop that barely supports x86\_64, and ly recently added some avx2 instructions I think (invalid op codes), manually building (any previous commit too) didn't work because of something in the `build.zig` file, so out of boredom I decided to craft up my own simple display manager on the only language this thing can handle... **C** (I hate this and reserve the right for the rust rewrite, actually solid). I spedrun it in roughly 3 days and I'm bad af in C, so this is spaghetti code on **another** level. I think it doesn't do almost anything unsafe, I mean, I didn't check allocations and it's capable of reallocating memory until your username uses all memory, crashing the system due to a off-by-one error, but pretty consistent otherwise (probably). @@ -101,11 +116,12 @@ I spedrun it in roughly 3 days and I'm bad af in C, so this is spaghetti code on The name is just ly but changing "y" with "i", that had a reason but forgot it, (maybe the i in *simple*), so I remembered this sh\*tty laptop with a lid, this thing is also a display manager (dm, ly command is also `ly-dm`), so just did lidm due to all that. # Contributors -[![GitHub Contributors](https://contrib.rocks/image?repo=javalsai/lidm&max=20)](https://github.com/javalsai/lidm/graphs/contributors) + +[![GitHub Contributors](https://contrib.rocks/image?repo=javalsai/lidm\&max=20)](https://github.com/javalsai/lidm/graphs/contributors) * KillerTofus, [made the AUR package](https://github.com/javalsai/lidm/pull/2)! Saved me from reading the Arch Wiki 💀. * DeaDvey, the most awesomest of all, did some pretty HARDCORE gramer checking. (and trolling, he wrote that, 33 commits of just readme changes ffs) * grialion, made a simple C implementation of `chvt` instead of insecurely relying on `kbd utils`'s command. -* cerealexperiments_, found a missing newline (had the guts to read the source code, crazy ik) +* cerealexperiments\_, found a missing newline (had the guts to read the source code, crazy ik) * ChatGPT, in times of slow laptops where pages take ages to load, a single tab connected to a bunch of burning cloud GPUs feeding corporate hype is all you need to get quick answers for your questions, as long as you know how to filter AI crap ofc. * [My lack of gf](https://www.instagram.com/reel/C8sa3Gltmtq), can't imagine this project being possible if somebody actually cared about me daily. diff --git a/assets/pkg/aur/README.md b/assets/pkg/aur/README.md index d083c1b..e5df888 100644 --- a/assets/pkg/aur/README.md +++ b/assets/pkg/aur/README.md @@ -1,10 +1,12 @@ # AUR Packages + These files are just for reference, I'll manually edit and publish them, at least until I automate it with github actions (like updating version automatically on a release). There are three packages that follow standard conventions: + * [`lidm`](https://aur.archlinux.org/packages/lidm): Builds latest release (manually updated per release basis) * [`lidm-bin`](https://aur.archlinux.org/packages/lidm-bin): Fetches latest release binary (compiled by GitHub Actions, also updated per release) * [`lidm-git`](https://aur.archlinux.org/packages/lidm-git): Fetches latest commit and builds it (should be updated automatically) -> [!IMPORTANT] +> \[!IMPORTANT] > None of those packages include the service files. [You have to do this yourself](../../services/README.md). diff --git a/assets/services/README.md b/assets/services/README.md index 6c99739..e99db11 100644 --- a/assets/services/README.md +++ b/assets/services/README.md @@ -1,4 +1,5 @@ # Service Files + This folder contains the files necessary to set up lidm on start up for the supported init systems, all of them are configured for tty7. If you don't know what a init system is, you're certainly using `systemd`. @@ -8,26 +9,31 @@ There's make scripts to automatically copy the service files to the proper locat The manual steps for installation are: ## Systemd + * Copy `systemd.service` to `/etc/systemd/system/lidm.service` * To enable it you can run `systemctl enable lidm` ## Dinit + * Copy `dinit` to `/etc/dinit.d/lidm` * To enable it, run `dinitctl enable lidm` ## Runit + * Copy `runit/` to `/etc/runit/sv/lidm/` * Add the service with `ln -s /etc/runit/sv/lidm /run/runit/service` * And to enable it `sv enable lidm` ## OpenRC + * Copy `openrc` to `/etc/init.d/lidm` * Enable the service with `rc-update add lidm` ## S6 + * Copy `s6/` to `/etc/s6/sv/lidm/` * Add the service with `s6-service add default lidm` * Reload the database with `s6-db-reload` (you might have to run this every time the service file changes) -> [!WARNING] +> \[!WARNING] > Make sure to disable any other service that might run on tty7, such us lightdm or most display managers out there. diff --git a/themes/README.md b/themes/README.md index 5919f3f..3a891cf 100644 --- a/themes/README.md +++ b/themes/README.md @@ -1,29 +1,37 @@ # Themes ## cherry.ini + ![cherry.ini theme](./screenshots/cherry.png) ## default.ini + ![default.ini theme](./screenshots/default.png) ## nature.ini + ![nature.ini theme](./screenshots/nature.png) ## nord.ini + ![nord.ini theme](./screenshots/nord.png) ## old-blue.ini + ![old-blue.ini theme](./screenshots/old-blue.png) ## old-blue-thick.ini + ![old-blue-thick.ini theme](./screenshots/old-blue-thick.png) ## pure-tastelessness.ini + ![pure-tastelessness.ini theme](./screenshots/pure-tastelessness.png) ## tasteless.ini + ![tasteless.ini theme](./screenshots/tasteless.png) ## tastelessness.ini -![tastelessness.ini theme](./screenshots/tastelessness.png) +![tastelessness.ini theme](./screenshots/tastelessness.png)