format: markdown files

This commit is contained in:
javalsai 2024-09-05 19:07:08 +02:00
parent b18ed23d4d
commit 72858a9c96
Signed by: javalsai
SSH Key Fingerprint: SHA256:3G83yKhBUWVABVX/vPWH88xnK4+ptMtHkZGCRXD4Mk8
5 changed files with 63 additions and 26 deletions

View File

@ -45,20 +45,25 @@ make install-service-s6 # s6
``` ```
# AUR # 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. > [service files](./assets/pkg/aur#services) have to be manually installed by now.
# Nix Flake # Nix Flake
You can install by doing You can install by doing
```sh ```sh
nix profile install github:javalsai/lidm nix profile install github:javalsai/lidm
``` ```
or try it out without installing by: or try it out without installing by:
```sh ```sh
nix run github:javalsai/lidm nix run github:javalsai/lidm
``` ```
> [!CAUTION] > \[!CAUTION]
> This doesn't include [service files](./assets/pkg/aur#services) neither > This doesn't include [service files](./assets/pkg/aur#services) neither

View File

@ -3,16 +3,19 @@
[![Latest Release](https://badgen.net/github/release/javalsai/lidm)](https://github.com/javalsai/lidm/releases) [![Latest Release](https://badgen.net/github/release/javalsai/lidm)](https://github.com/javalsai/lidm/releases)
# LiDM # 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 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). 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) ![demo gif](assets/media/lidm.gif)
> *shown as in a featured terminal emulator, actual linux console doesn't support as much color and decorations* > *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* > *however, all colors and strings are fully customizable*
## Features ## Features
* Builds **FAST**. * Builds **FAST**.
* `a32e4a5`: * `a32e4a5`:
* `2.830s`: laptop, -O3, -j2, `AMD E-450 APU with Radeon(tm) HD Graphics` * `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). * Starts with many init systems (systemd, dinit, runit, openrc and s6).
## WIP ## WIP
* Desktop's file `TryExec` key. * Desktop's file `TryExec` key.
* Save last selection. * Save last selection.
* Show/hide passwd switch. * 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. * 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 # Index
- [LiDM](#lidm)
- [Features](#features) * [LiDM](#lidm)
- [WIP](#wip) * [Features](#features)
- [Index](#index) * [WIP](#wip)
- [Ideology](#ideology) * [Index](#index)
- [Usage](#usage) * [Ideology](#ideology)
- [Arguments](#arguments) * [Usage](#usage)
- [Program](#program) * [Arguments](#arguments)
- [Requirements](#requirements) * [Program](#program)
- [Installation](#installation) * [Requirements](#requirements)
- [Manually](#manually) * [Installation](#installation)
- [AUR](#aur) * [Manually](#manually)
- [Configuring](#configuring) * [AUR](#aur)
- [Contributing](#contributing) * [Configuring](#configuring)
- [Backstory](#backstory) * [Contributing](#contributing)
- [Contributors](#contributors) * [Backstory](#backstory)
* [Contributors](#contributors)
# Ideology # 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). 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) [ ![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).* > *there's also a [change.org post](https://www.change.org/p/stoppt-die-chatkontrolle-grundrechte-gelten-auch-im-netz).*
# Usage # Usage
### Arguments ### 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. 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 ### Program
On top of pure intuition: On top of pure intuition:
* You can change focus of session/user/passwd with up/down arrows. * 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. * 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. * 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. * 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 # Requirements
* A computer with unix based system. * A computer with unix based system.
* That system should have the resources necessary for this program to make sense (Sessions, users...). * 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). * 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. * PAM, used for user authentication, just what `login` or `su` use internally. Don't worry, it's surely pre-installed.
# Installation # Installation
Check the [installation guide](./INSTALL.md) to use your prefered installation source. Check the [installation guide](./INSTALL.md) to use your prefered installation source.
# Configuring # 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. 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. 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). 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. > 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 # Contributing
If you want to contribute check the [CONTRIBUTING.md](docs/CONTRIBUTING.md) If you want to contribute check the [CONTRIBUTING.md](docs/CONTRIBUTING.md)
# Backstory # 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). 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). 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. 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 # 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 💀. * 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) * 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. * 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. * 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. * [My lack of gf](https://www.instagram.com/reel/C8sa3Gltmtq), can't imagine this project being possible if somebody actually cared about me daily.

View File

@ -1,10 +1,12 @@
# AUR Packages # 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). 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: There are three packages that follow standard conventions:
* [`lidm`](https://aur.archlinux.org/packages/lidm): Builds latest release (manually updated per release basis) * [`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-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) * [`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). > None of those packages include the service files. [You have to do this yourself](../../services/README.md).

View File

@ -1,4 +1,5 @@
# Service Files # 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. 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`. 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: The manual steps for installation are:
## Systemd ## Systemd
* Copy `systemd.service` to `/etc/systemd/system/lidm.service` * Copy `systemd.service` to `/etc/systemd/system/lidm.service`
* To enable it you can run `systemctl enable lidm` * To enable it you can run `systemctl enable lidm`
## Dinit ## Dinit
* Copy `dinit` to `/etc/dinit.d/lidm` * Copy `dinit` to `/etc/dinit.d/lidm`
* To enable it, run `dinitctl enable lidm` * To enable it, run `dinitctl enable lidm`
## Runit ## Runit
* Copy `runit/` to `/etc/runit/sv/lidm/` * Copy `runit/` to `/etc/runit/sv/lidm/`
* Add the service with `ln -s /etc/runit/sv/lidm /run/runit/service` * Add the service with `ln -s /etc/runit/sv/lidm /run/runit/service`
* And to enable it `sv enable lidm` * And to enable it `sv enable lidm`
## OpenRC ## OpenRC
* Copy `openrc` to `/etc/init.d/lidm` * Copy `openrc` to `/etc/init.d/lidm`
* Enable the service with `rc-update add lidm` * Enable the service with `rc-update add lidm`
## S6 ## S6
* Copy `s6/` to `/etc/s6/sv/lidm/` * Copy `s6/` to `/etc/s6/sv/lidm/`
* Add the service with `s6-service add default 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) * 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. > Make sure to disable any other service that might run on tty7, such us lightdm or most display managers out there.

View File

@ -1,29 +1,37 @@
# Themes # Themes
## cherry.ini ## cherry.ini
![cherry.ini theme](./screenshots/cherry.png) ![cherry.ini theme](./screenshots/cherry.png)
## default.ini ## default.ini
![default.ini theme](./screenshots/default.png) ![default.ini theme](./screenshots/default.png)
## nature.ini ## nature.ini
![nature.ini theme](./screenshots/nature.png) ![nature.ini theme](./screenshots/nature.png)
## nord.ini ## nord.ini
![nord.ini theme](./screenshots/nord.png) ![nord.ini theme](./screenshots/nord.png)
## old-blue.ini ## old-blue.ini
![old-blue.ini theme](./screenshots/old-blue.png) ![old-blue.ini theme](./screenshots/old-blue.png)
## old-blue-thick.ini ## old-blue-thick.ini
![old-blue-thick.ini theme](./screenshots/old-blue-thick.png) ![old-blue-thick.ini theme](./screenshots/old-blue-thick.png)
## pure-tastelessness.ini ## pure-tastelessness.ini
![pure-tastelessness.ini theme](./screenshots/pure-tastelessness.png) ![pure-tastelessness.ini theme](./screenshots/pure-tastelessness.png)
## tasteless.ini ## tasteless.ini
![tasteless.ini theme](./screenshots/tasteless.png) ![tasteless.ini theme](./screenshots/tasteless.png)
## tastelessness.ini ## tastelessness.ini
![tastelessness.ini theme](./screenshots/tastelessness.png)
![tastelessness.ini theme](./screenshots/tastelessness.png)