Compare commits
97 Commits
Author | SHA1 | Date | |
---|---|---|---|
e3052ec5bc | |||
|
8bdfa7d609 | ||
|
528c4538c7 | ||
154308dfd7
|
|||
c4c358ceef
|
|||
57cb0cd9ad
|
|||
b900701b8f
|
|||
ca95d390c2
|
|||
a1f8994c94
|
|||
2bcc3f71cc
|
|||
|
4af0ec545e | ||
|
e0a0df80c0 | ||
fe4a52ecfa
|
|||
|
a393cda7e1 | ||
4de2720bed
|
|||
|
cbdcccc4ae | ||
b7f6cf690b
|
|||
|
d6f19094c1 | ||
|
48803df2d8 | ||
|
d97ba068ff | ||
|
842f915f41 | ||
|
df283109d7 | ||
|
cbe73ad4ff | ||
|
e745b27a68 | ||
eeba4a5f39
|
|||
57f5f41995
|
|||
8b1216c232
|
|||
|
6ea79edaf4 | ||
|
7529b0365f | ||
663427ec95
|
|||
|
a738a23b75 | ||
|
e71d2fdd8c | ||
|
98598cf490 | ||
|
5eb3cdc7ad | ||
9c3b158fb7
|
|||
be74e5ef40
|
|||
cac037cb48
|
|||
dcd26986b2
|
|||
09ce3ef149
|
|||
|
6d13110eed | ||
fc23510b09
|
|||
a9d3c29ca5
|
|||
|
df38990d8b | ||
|
3efd6e0606 | ||
|
418096dc4e | ||
|
6f3a69307f | ||
0d564b9294
|
|||
8f471df5bc
|
|||
d85e3f5620
|
|||
9eb059410b
|
|||
d6b165ba8b
|
|||
178acd07ad
|
|||
dcaab5a782
|
|||
|
3a80aaa663 | ||
9d81c9df8b
|
|||
5861b4dc34
|
|||
a32e4a577f
|
|||
844687809b
|
|||
|
93f14f398e | ||
|
6590a6ed8f | ||
|
a15b49ec24 | ||
|
e1c5122071 | ||
|
cb853cb379 | ||
|
691996ff7f | ||
|
53da9b70f7 | ||
|
117593f5ec | ||
|
4fb00e46dc | ||
|
36296c55ec | ||
|
8c108ee8ca | ||
|
d38ca16477 | ||
|
5367e697c5 | ||
|
2891bf855a | ||
|
589fa928fc | ||
|
511deb64cd | ||
|
3f2fec5a42 | ||
|
ea1d2cbdb2 | ||
|
148575cf38 | ||
|
849cc4c3e5 | ||
|
8cc8094fc2 | ||
|
1c0cf368e9 | ||
|
8188ea1e31 | ||
|
923aba1db3 | ||
|
ee2f279fb7 | ||
9993d70c6b
|
|||
5b261827f3
|
|||
12207ee4a9
|
|||
|
e8ec94e150 | ||
|
f89144110c | ||
|
f9515d8453 | ||
bd6b0a7d8b | |||
483445007b
|
|||
468ebf769e
|
|||
6145973cca
|
|||
080966978c
|
|||
0639b8601a
|
|||
a8ec8a8a0e
|
|||
18a00ca264
|
11
.SRCINFO
Normal file
@@ -0,0 +1,11 @@
|
||||
pkgbase = lidm
|
||||
pkgdesc = A ✨fully✨ colorful cutomizable TUI display manager made in C for simplicity.
|
||||
pkgver = 0.0.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/javalsai/lidm
|
||||
arch = any
|
||||
license = GPL
|
||||
source = lidm::https://github.com/javalsai/lidm/releases/download/0.0.0/lidm
|
||||
sha256sums = 2771ca603fb02520cb1ea2dac10400fd4f512d7a8883a7ecffefe6595a93dcf5
|
||||
|
||||
pkgname = lidm
|
54
.github/actions/build/action.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Build Project
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# TODO: make arch_name optional (dont upload artifact)
|
||||
inputs:
|
||||
arch_name:
|
||||
description: "Architecture Name"
|
||||
required: true
|
||||
cc:
|
||||
description: "The compiler to use"
|
||||
required: false
|
||||
default: "gcc"
|
||||
cflags:
|
||||
description: "Compiler flags"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# cache-apt-pkgs-action try to cache :i386 packages challenge impossible
|
||||
- if: ${{ inputs.arch_name == 'x86' }}
|
||||
shell: bash
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y libpam0g-dev:i386
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: "libpam0g-dev gcc-multilib"
|
||||
version: 1.0
|
||||
|
||||
- name: Build Code
|
||||
shell: bash
|
||||
run: |
|
||||
make CC=${{ inputs.cc }} CFLAGS="-O3 ${{ inputs.cflags }}" \
|
||||
2> stderr-${{ inputs.arch_name }}
|
||||
mv lidm lidm-${{ inputs.arch_name }}
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-${{ inputs.arch_name }}
|
||||
path: |
|
||||
lidm-${{ inputs.arch_name }}
|
||||
stderr-${{ inputs.arch_name }}
|
||||
retention-days: 1
|
7
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
version: 2
|
||||
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: ".github/workflows"
|
||||
schedule:
|
||||
interval: "daily"
|
65
.github/workflows/build-check.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: Test Build
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
check_build:
|
||||
permissions: write-all
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch_name: x86_64
|
||||
cc: gcc
|
||||
cflags:
|
||||
- arch_name: x86
|
||||
cc: gcc
|
||||
cflags: -m32
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: myrotvorets/set-commit-status-action@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: pending
|
||||
context: Build (${{ matrix.arch_name }})
|
||||
|
||||
- name: Attempt Build (${{ matrix.arch_name }})
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
arch_name: ${{ matrix.arch_name }}
|
||||
cc: ${{ matrix.cc }}
|
||||
cflags: "-Wall ${{ matrix.cflags }}"
|
||||
|
||||
- name: Download Build Results
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-${{ matrix.arch_name }}
|
||||
path: build-results
|
||||
|
||||
- name: Process Results
|
||||
id: get-stats
|
||||
if: always()
|
||||
run: |
|
||||
if ! [ -d "build-results" ]; then
|
||||
# Build failed
|
||||
echo "DESCR=" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
# Build Succeeded
|
||||
cd "build-results"
|
||||
ls -lah
|
||||
cat stderr-* >&2
|
||||
WARNS="$(cat stderr-* | grep '^[^ ]*\.[ch]:' | wc -l)"
|
||||
HSIZE="$(stat --printf="%s" lidm-* | numfmt --to=iec-i)B"
|
||||
|
||||
echo "DESCR='$HSIZE, $WARNS warnings'" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Set final commit status
|
||||
uses: myrotvorets/set-commit-status-action@master
|
||||
if: always()
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: ${{ job.status }}
|
||||
context: Build (${{ matrix.arch_name }})
|
||||
description: ${{ steps.get-stats.outputs.DESCR }}
|
20
.github/workflows/cooldown.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Issues
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
cooldown:
|
||||
name: Cooldown
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Cooldown
|
||||
uses: osy/github-cooldown-action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
cooldownMinutes: 15
|
||||
maxNewIssues: 2
|
||||
maxNewComments: 15
|
61
.github/workflows/release.yml
vendored
@@ -1,23 +1,56 @@
|
||||
name: C Make
|
||||
name: Build for Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
permissions: write-all
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch_name: x86_64
|
||||
cc: gcc
|
||||
cflags:
|
||||
- arch_name: x86
|
||||
cc: gcc
|
||||
cflags: -m32
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install deps
|
||||
run: sudo apt-get install -y libpam0g-dev
|
||||
- name: make
|
||||
run: make
|
||||
- uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: lidm
|
||||
asset_name: lidm
|
||||
tag: ${{ github.ref }}
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Project
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
arch_name: ${{ matrix.arch_name }}
|
||||
cc: ${{ matrix.cc }}
|
||||
cflags: ${{ matrix.cflags }}
|
||||
|
||||
upload:
|
||||
permissions: write-all
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Merge Build Artifacts
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: all-builds
|
||||
pattern: build-*
|
||||
delete-merged: true
|
||||
retention-days: 1
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: all-builds
|
||||
path: builds
|
||||
|
||||
- name: Upload Builds to Release
|
||||
run: |
|
||||
cd builds
|
||||
for file in ./*; do
|
||||
echo "Uploading $file..."
|
||||
gh release upload ${{ github.event.release.tag_name }} "$file" --clobber
|
||||
done
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
6
.gitignore
vendored
@@ -1,4 +1,8 @@
|
||||
lidm
|
||||
/lidm
|
||||
dist/
|
||||
/compile_commands.json
|
||||
|
||||
.cache/
|
||||
|
||||
# nix build result
|
||||
result
|
||||
|
41
Makefile
@@ -3,24 +3,53 @@ LDIR=lib
|
||||
IDIR=include
|
||||
ODIR=dist
|
||||
|
||||
CC=gcc
|
||||
CFLAGS=-O3 -I$(IDIR)
|
||||
PREFIX=/usr
|
||||
|
||||
CC?=gcc
|
||||
CFLAGS?=-O3
|
||||
_CFLAGS=-I$(DIR)
|
||||
ALLFLAGS=$(CFLAGS) -I$(IDIR)
|
||||
|
||||
LIBS=-lm -lpam -lpam_misc
|
||||
|
||||
_DEPS = util.h ui.h config.h auth.h efield.h keys.h users.h sessions.h
|
||||
_DEPS = util.h ui.h config.h auth.h efield.h keys.h users.h sessions.h chvt.h
|
||||
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
|
||||
|
||||
_OBJ = main.o util.o ui.o config.o auth.o efield.o users.o sessions.o
|
||||
_OBJ = main.o util.o ui.o config.o auth.o efield.o users.o sessions.o chvt.o
|
||||
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
|
||||
|
||||
$(ODIR)/%.o: $(CDIR)/%.c $(DEPS)
|
||||
@mkdir -p $(ODIR)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
$(CC) -c -o $@ $< $(ALLFLAGS)
|
||||
|
||||
lidm: $(OBJ)
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
||||
$(CC) -o $@ $^ $(ALLFLAGS) $(LIBS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(ODIR)/*.o *- li $(INCDIR)/*-
|
||||
|
||||
# Copy lidm to ${DESTDIR}${PREFIX}/bin (/usr/bin)
|
||||
install: lidm
|
||||
mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}/etc
|
||||
install -m755 ./lidm ${DESTDIR}${PREFIX}/bin
|
||||
install -m755 ./themes/default.ini ${DESTDIR}/etc/lidm.ini
|
||||
|
||||
uninstall:
|
||||
rm -rf ${DESTDIR}${PREFIX}/bin/lidm ${DESTDIR}/etc/lidm.ini
|
||||
|
||||
install-service:
|
||||
@if command -v systemctl &> /dev/null; then \
|
||||
make install-service-systemd; \
|
||||
elif command -v dinitctl &> /dev/null; then \
|
||||
make install-service-dinit; \
|
||||
else \
|
||||
printf '\x1b[1;31m%s\x1b[0m\n' "Unknown init system, skipping install..."; \
|
||||
fi
|
||||
|
||||
install-service-systemd:
|
||||
install -m755 ./assets/services/systemd.service /etc/systemd/system/lidm.service
|
||||
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'systemctl enable lidm'"
|
||||
install-service-dinit:
|
||||
install -m755 ./assets/services/dinit /etc/dinit.d/lidm
|
||||
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'dinitctl enable lidm'"
|
||||
|
14
PKGBUILD
Normal file
@@ -0,0 +1,14 @@
|
||||
pkgname=lidm
|
||||
pkgver=0.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="A ✨fully✨ colorful cutomizable TUI display manager made in C for simplicity."
|
||||
arch=('any')
|
||||
url="https://github.com/javalsai/lidm"
|
||||
license=('GPL')
|
||||
source=("lidm::https://github.com/javalsai/lidm/releases/download/v$pkgver.zip")
|
||||
sha256sums=('2771ca603fb02520cb1ea2dac10400fd4f512d7a8883a7ecffefe6595a93dcf5')
|
||||
|
||||
package() {
|
||||
install -d "$pkgdir/usr/bin/lidm"
|
||||
}
|
||||
sha256sums=('5eb72f7d0425e81f9b42f70159ecc44d1b6ca5cfd4fde845d01348964273ab64')
|
189
README.md
@@ -1,116 +1,139 @@
|
||||
# lidm
|
||||
Lidm is a really light display manager made in C, highly customizable and held together by hopes and prayers 🙏
|
||||
[](https://github.com/javalsai/lidm/blob/master/LICENSE)
|
||||
[](https://github.com/javalsai/lidm)
|
||||
[](https://github.com/javalsai/lidm/releases)
|
||||
|
||||

|
||||
> *this is shown as in a terminal emulator, actual linux console doesn't support as much color and decorations*
|
||||
# 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 🙏.
|
||||
|
||||
> *but all colors and strings are fully suctomizable*
|
||||
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).
|
||||
|
||||
> *I'm open if anybody wants to contact me to record a proper demo of the program, my laptop can't handle it and idk how to config obs for hyprland*
|
||||

|
||||
> *shown as in a featured terminal emulator, actual linux console doesn't support as much color and decorations*
|
||||
|
||||
# Index
|
||||
(TODO, VSC(odium) does this automatically, I'm on nvim rn 😎)
|
||||
> *however, all colors and strings are fully customizable*
|
||||
|
||||
## Features
|
||||
* Builds fast af
|
||||
* Works everywhere you can get gcc to compile
|
||||
* Fast and possibly efficient
|
||||
* Fully customizable, from strings to colors (I hope you know ansi escape codes), to action buttons
|
||||
* Builds **FAST**.
|
||||
* `a32e4a5`:
|
||||
* `2.830s`: laptop, -O3, -j2, `AMD E-450 APU with Radeon(tm) HD Graphics`
|
||||
* `0.172s`: desktop, -O3, -j12, `AMD Ryzen 5 5600G with Radeon Graphics`
|
||||
* `663427e`:
|
||||
* `0.085s`: desktop, -O0, `AMD Ryzen 5 5600G with Radeon Graphics`
|
||||
* `0.009s`: desktop, -O0, CC=tcc, `AMD Ryzen 5 5600G with Radeon Graphics`
|
||||
* Works everywhere you can get gcc to compile.
|
||||
* Fast and possibly efficient.
|
||||
* Fully customizable, from strings, including action keys, to colors (I hope you know ansi escape codes)
|
||||
* Automatically detects xorg and wayland sessions, plus allowing to launch the default user shell (if enabled in config)
|
||||
* Starts with many init systems eg: systemd and dinit.
|
||||
|
||||
## WIP
|
||||
* desktop's file `TryExec` key
|
||||
* Save last selection
|
||||
* Show/hide passwd switch
|
||||
* Long sessions, strings, usernames, passwords... they will just overflow or f\*ck your terminal, I know it and I don't know if I'll fix it.
|
||||
* Desktop's file `TryExec` key.
|
||||
* Save last selection.
|
||||
* Show/hide passwd switch.
|
||||
* Long sessions, strings, usernames, passwords... they will just overflow or fuck your terminal, I know it and I don't know if I'll fix it.
|
||||
* 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.
|
||||
|
||||
## Forget it
|
||||
* Any kind of arguments
|
||||
* UTF characters, I'm using `strlen()` and treating characters as per byte basis, UTF-8 chars might work or not actually, might fix it by replacing some `strlen()` with a utflen one.
|
||||
|
||||
> [!CAUTION]
|
||||
> (they should add `> [!DISCLAIMER]` fr) I wrote this readme with the same quality as the code, behing this keyboard there's half a brainrotcell left writing what it remembers of this program, so don't take this to seriously, I'm typing as I think without filter lol, but the program works, or should. Also, about any "TODO" in this readme (or the code), I didn't forget finishing it, I actually don't care. And, references to ~~code~~ **anything** are likely to be outdated, check the commit history to know what I was refering to exactly if you care.
|
||||
# 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)
|
||||
|
||||
# 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).
|
||||
<!-- doubt markdown will allow me to render this properly -->
|
||||
|
||||
[  ](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).*
|
||||
|
||||
# Backstory
|
||||
I went into summer travel to visit family with an old laptop that barely supports x86_64, and ly recently added some avx2 instructions I think (I just get 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, basically did in in 3 days on the same couch on [unhelty back positions (even worse)](https://i.redd.it/4bkje8amisu61.png) while touching *some* grass (:o), 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 and crashes the system due to a off by 1 error, but pretty consistent otherwise (probably).
|
||||
# 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 the dinit service.
|
||||
|
||||
The name is just ly byt 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.
|
||||
|
||||
 <!--gif's likely broken-->
|
||||
|
||||
Btw, this laptop is so bad that I can't even render markdown in reasonable time, I'll just push this and fix render issues live :)
|
||||
### 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.
|
||||
* ESC and then left/right arrows will force to change the option of the focused input, useful if you're editing the current input and arrow keys just move.
|
||||
* 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 neccessary 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)
|
||||
* Make (also optional, but does things atomatically, make sure `gcc` and `mkdir -p` work as expected)
|
||||
|
||||
# Usage
|
||||
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
|
||||
* ESC and then left/right arrows will force to change the option of the focused input, useful if you're editing the current input and arrow keys just move
|
||||
* 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
|
||||
|
||||
# Compiling
|
||||
```sh
|
||||
make # 👍
|
||||
```
|
||||
* That system should have the resources neccessary 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).
|
||||
* Make (Also optional, but does things atomatically, make sure `gcc` and `mkdir -p` work as expected).
|
||||
* PAM, used for user authentication, just what `login` or `su` use internally. Don't worry, it's surely pre-installed.
|
||||
|
||||
# Installation
|
||||
* You can put the compiled binary anywhere you want tbh, you can even setuid it if you want to run it with any user, but code's not too safe 😬.
|
||||
* Prepare the [configuration](#configuring)
|
||||
## Manually
|
||||
* Build the package (you can download automatic builds from the [releases page](https://github.com/javalsai/lidm/releases)):
|
||||
```sh
|
||||
git clone https://github.com/javalsai/lidm.git
|
||||
cd lidm
|
||||
make # 👍
|
||||
```
|
||||
* Install the files (see [configuration](#configuring) for more themeing info).
|
||||
```sh
|
||||
# place binary in /usr/bin and copy
|
||||
# default theme to /etc
|
||||
make install
|
||||
```
|
||||
* Make a service file for this if you want it on launch, just check how ly does it, this works pretty much the same way.
|
||||
```sh
|
||||
# automatically detects init system
|
||||
# and installs service file (for tty7)
|
||||
make install-service
|
||||
|
||||
# or if you don't like autodetection
|
||||
make install-service-systemd # systemd
|
||||
make install-service-dinit # dinit
|
||||
```
|
||||
|
||||
## AUR
|
||||
[AUR packages](https://aur.archlinux.org/packages?K=lidm&SeB=n) will automatically install the binary and config. But I recommend reading [installing manually](#manually) to understand the install process.
|
||||
|
||||
> [!CAUTION]
|
||||
> [service files](./assets/pkg/aur#services) have to be manually installed by now.
|
||||
|
||||
# Configuring
|
||||
Copy `config.ini` (if I haven't moved it) to `/etc/lidm.ini` and configure it to your liking. Also, don't place empty lines (for now).
|
||||
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).
|
||||
|
||||
Also configurable colors are just gonna be put inside `\x1b[...m`, ofc you can add an m to break this and this can f* up really bad or even make some nice UI effect possible, but please don't, 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.
|
||||
Configurated 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.
|
||||
|
||||
Btw, 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]
|
||||
> 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
|
||||
Don't do this to yourself, but you can ofc, you can also fork or whatever (make sure to comply with GNU's GPLv3), but I want to do the rust rewrite 😡 (after it, I'll leave this around in case somebody with ancient hardware needs it, or if somebody wants to port it for a microwave...)
|
||||
If you want to contribute check the [CONTRIBUTING.md](docs/CONTRIBUTING.md)
|
||||
|
||||
This is also GPLv3 bcs I was too lazy to look for the "do anything I don't care" license, also it's funny legally trapping people into FOSS. **EDIT:** just realized ly uses it and I coudl've just copied it :(, idk how bad GPLv3 respect to changing license and I *could* rebase but that never goes well, so I'll consult my lawyer (chatGPT) later.
|
||||
# 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).
|
||||
|
||||
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
|
||||
Special thanks to:
|
||||
[](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 cheking. (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)
|
||||
* 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, can't imagine this project being possible if somebody actually cared about me daily.
|
||||
|
||||
# Milestones
|
||||
* If this ~~video~~ **repo** gets to 100 ~~likes~~ **stars**, I'll make an arch aur package and properly document installation on multiple init systems.
|
||||
* (I might also make a nix flake if yall nix nerds ask me for it)
|
||||
|
||||
# Recommendations
|
||||
Hope you didn't expect actual project recommendations, but these songs are 🔥
|
||||
* "Sixpence None the Richer - Kiss Me"
|
||||
* "Avril Lavigne - Complicated"
|
||||
* "Shawn Mendes - There's Nothing Holdin' Me Back"
|
||||
* "Rio Romeo - Nothing's New"
|
||||
* "ElyOtto - SugarCrash!"
|
||||
* "The Cranberries - Sunday"
|
||||
* "Goo Goo Dolls - Iris"
|
||||
* "Em Beihold - Numb Little Bug"
|
||||
* "MAGIC! - Rude"
|
||||
* "The Cranberries - Zombie"
|
||||
* "Natalie Imbruglia - Torn"
|
||||
* "Alec Benjamin - I Sent My Therapist To Therapy"
|
||||
* "The Neighbourhood - Sweater Weather"
|
||||
* "Cascada - Everytime We Touch" (potentially the sped up versoin if better)
|
||||
* "Mitski - My Love Mine All Mine"
|
||||
|
||||
Oh, an actual recommendation, if you don't like a element you can change the fg color of it to be the same as the bg.
|
||||
|
||||
Congrats if you've managed to read through all this.
|
||||
* [My lack of gf](https://www.instagram.com/reel/C8sa3Gltmtq), can't imagine this project being possible if somebody actually cared about me daily.
|
||||
|
BIN
assets/media/lidm.gif
Normal file
After Width: | Height: | Size: 496 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
4
assets/pkg/aur/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
*/*
|
||||
!*/.gitignore
|
||||
!*/PKGBUILD
|
||||
!*/.SRCINFO
|
17
assets/pkg/aur/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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]
|
||||
> None of those packages include the service files, I'm considering automatically detecting it on the package function or providing it as separate services (standard practice again).
|
||||
>
|
||||
> Depending on how good these packages go (my first packages :P) I'll make service ones too.
|
||||
|
||||
## Services
|
||||
Summary of what to do to install service files anyways:
|
||||
* **systemd:** Copy `assets/services/systemd.service` to `/etc/systemd/system/lidm.service` and enable the service (`systemctl enable lidm`)
|
||||
* **dinit:** Copy `assets/services/dinit` to `/etc/dinit.d/lidm` and enable the service (`dinitctl enable lidm`)
|
16
assets/pkg/aur/lidm-bin/.SRCINFO
Normal file
@@ -0,0 +1,16 @@
|
||||
pkgbase = lidm-bin
|
||||
pkgdesc = A fully colorful cutomizable TUI display manager made in C. (release binary)
|
||||
pkgver = 0.0.1
|
||||
pkgrel = 4
|
||||
url = https://github.com/javalsai/lidm
|
||||
arch = x86_64
|
||||
license = GPL
|
||||
depends = pam
|
||||
provides = lidm
|
||||
conflicts = lidm
|
||||
source = lidm::https://github.com/javalsai/lidm/releases/download/0.0.1/lidm-x86_64
|
||||
source = default-theme.ini::https://raw.githubusercontent.com/javalsai/lidm/0.0.1/themes/default.ini
|
||||
sha256sums = 4969018d527613729336abd51e37283ce77d7c7a2233434642804b88e550e622
|
||||
sha256sums = 27db9b0cd2da80c0c60dcb13dfad0f9d65e7dddbb7b344b859803b9ac3943cd7
|
||||
|
||||
pkgname = lidm-bin
|
24
assets/pkg/aur/lidm-bin/PKGBUILD
Normal file
@@ -0,0 +1,24 @@
|
||||
# Maintainer: javalsai <javalsai@proton.me>
|
||||
pkgname=lidm-bin
|
||||
pkgver=0.0.1
|
||||
pkgrel=4
|
||||
depends=('pam')
|
||||
pkgdesc="A fully colorful cutomizable TUI display manager made in C. (release binary)"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/javalsai/lidm"
|
||||
license=('GPL')
|
||||
provides=('lidm')
|
||||
conflicts=('lidm')
|
||||
source=(
|
||||
"lidm::$url/releases/download/$pkgver/lidm-$arch"
|
||||
"default-theme.ini::https://raw.githubusercontent.com/javalsai/lidm/$pkgver/themes/default.ini"
|
||||
)
|
||||
sha256sums=(
|
||||
'4969018d527613729336abd51e37283ce77d7c7a2233434642804b88e550e622'
|
||||
'27db9b0cd2da80c0c60dcb13dfad0f9d65e7dddbb7b344b859803b9ac3943cd7'
|
||||
)
|
||||
|
||||
package() {
|
||||
install -Dm755 lidm "${pkgdir}/usr/bin/lidm"
|
||||
install -Dm755 default-theme.ini "${pkgdir}/etc/lidm.ini"
|
||||
}
|
17
assets/pkg/aur/lidm-git/.SRCINFO
Normal file
@@ -0,0 +1,17 @@
|
||||
pkgbase = lidm-git
|
||||
pkgdesc = A fully colorful cutomizable TUI display manager made in C. (last git commit)
|
||||
pkgver = 0.0.1.r0.gd6b165b
|
||||
pkgrel = 6
|
||||
url = https://github.com/javalsai/lidm
|
||||
arch = any
|
||||
license = GPL
|
||||
makedepends = git
|
||||
makedepends = make
|
||||
makedepends = gcc
|
||||
depends = pam
|
||||
provides = lidm
|
||||
conflicts = lidm
|
||||
source = lidm::git+https://github.com/javalsai/lidm
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = lidm-git
|
31
assets/pkg/aur/lidm-git/PKGBUILD
Normal file
@@ -0,0 +1,31 @@
|
||||
# Maintainer: javalsai <javalsai@proton.me>
|
||||
pkgname=lidm-git
|
||||
pkgver=0.0.1.r0.gd6b165b
|
||||
pkgrel=6
|
||||
depends=('pam')
|
||||
makedepends=('git' 'make' 'gcc')
|
||||
pkgdesc="A fully colorful cutomizable TUI display manager made in C. (last git commit)"
|
||||
arch=('any')
|
||||
url="https://github.com/javalsai/lidm"
|
||||
license=('GPL')
|
||||
provides=('lidm')
|
||||
conflicts=('lidm')
|
||||
source=("lidm::git+https://github.com/javalsai/lidm")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "lidm"
|
||||
git describe --long --abbrev=7 --tags | \
|
||||
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "lidm"
|
||||
make CFLAGS="-O3"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "lidm"
|
||||
install -Dm755 lidm "${pkgdir}/usr/bin/lidm"
|
||||
install -Dm755 themes/default.ini "${pkgdir}/etc/lidm.ini"
|
||||
}
|
15
assets/pkg/aur/lidm/.SRCINFO
Normal file
@@ -0,0 +1,15 @@
|
||||
pkgbase = lidm
|
||||
pkgdesc = A fully colorful cutomizable TUI display manager made in C. (build latest tag)
|
||||
pkgver = 0.0.1
|
||||
pkgrel = 5
|
||||
url = https://github.com/javalsai/lidm
|
||||
arch = any
|
||||
license = GPL
|
||||
makedepends = git
|
||||
makedepends = make
|
||||
makedepends = gcc
|
||||
depends = pam
|
||||
source = lidm::git+https://github.com/javalsai/lidm
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = lidm
|
23
assets/pkg/aur/lidm/PKGBUILD
Normal file
@@ -0,0 +1,23 @@
|
||||
# Maintainer: javalsai <javalsai@proton.me>
|
||||
pkgname=lidm
|
||||
pkgver=0.0.1
|
||||
pkgrel=5
|
||||
depends=('pam')
|
||||
makedepends=('git' 'make' 'gcc')
|
||||
pkgdesc="A fully colorful cutomizable TUI display manager made in C. (build latest tag)"
|
||||
arch=('any')
|
||||
url="https://github.com/javalsai/lidm"
|
||||
license=('GPL')
|
||||
source=("lidm::git+https://github.com/javalsai/lidm")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
build() {
|
||||
cd "$pkgname"
|
||||
make CFLAGS="-O3"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname"
|
||||
install -Dm755 lidm "${pkgdir}/usr/bin/lidm"
|
||||
install -Dm755 themes/default.ini "${pkgdir}/etc/lidm.ini"
|
||||
}
|
12
assets/pkg/aur/make-srcinfo.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
MYSELF=$(realpath "$0")
|
||||
MYDIR=$(dirname "$MYSELF")
|
||||
|
||||
for pkg in "$MYDIR"/*/; do
|
||||
cd "$pkg"
|
||||
printf "\x1b[1mEntering '%s'\x1b[0m\n" "$pkg"
|
||||
makepkg --printsrcinfo | tee .SRCINFO
|
||||
echo
|
||||
done
|
8
assets/services/dinit
Normal file
@@ -0,0 +1,8 @@
|
||||
type = process
|
||||
command = /sbin/agetty tty7 linux-c -n -l /bin/lidm -o 7
|
||||
restart = true
|
||||
depends-on = login.target
|
||||
termsignal = HUP
|
||||
smooth-recovery = true
|
||||
inittab-id = 7
|
||||
inittab-line = tty7
|
17
assets/services/systemd.service
Normal file
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=TUI display manager
|
||||
After=systemd-user-sessions.service plymouth-quit-wait.service
|
||||
After=getty@tty3.service
|
||||
Conflicts=getty@tty3.service
|
||||
|
||||
[Service]
|
||||
Type=idle
|
||||
ExecStart=/usr/bin/lidm
|
||||
StandardError=journal
|
||||
StandardInput=tty
|
||||
TTYPath=/dev/tty3
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
|
||||
[Install]
|
||||
Alias=display-manager.service
|
@@ -1,106 +0,0 @@
|
||||
[
|
||||
{
|
||||
"directory": "/home/javalsai/coding/lidm",
|
||||
"arguments": [
|
||||
"gcc",
|
||||
"-c",
|
||||
"-o",
|
||||
"dist/main.o",
|
||||
"src/main.c",
|
||||
"-O3",
|
||||
"-Iinclude"
|
||||
],
|
||||
"file": "src/main.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/javalsai/coding/lidm",
|
||||
"arguments": [
|
||||
"gcc",
|
||||
"-c",
|
||||
"-o",
|
||||
"dist/util.o",
|
||||
"src/util.c",
|
||||
"-O3",
|
||||
"-Iinclude"
|
||||
],
|
||||
"file": "src/util.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/javalsai/coding/lidm",
|
||||
"arguments": [
|
||||
"gcc",
|
||||
"-c",
|
||||
"-o",
|
||||
"dist/ui.o",
|
||||
"src/ui.c",
|
||||
"-O3",
|
||||
"-Iinclude"
|
||||
],
|
||||
"file": "src/ui.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/javalsai/coding/lidm",
|
||||
"arguments": [
|
||||
"gcc",
|
||||
"-c",
|
||||
"-o",
|
||||
"dist/users.o",
|
||||
"src/users.c",
|
||||
"-O3",
|
||||
"-Iinclude"
|
||||
],
|
||||
"file": "src/users.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/javalsai/coding/lidm",
|
||||
"arguments": [
|
||||
"gcc",
|
||||
"-c",
|
||||
"-o",
|
||||
"dist/sessions.o",
|
||||
"src/sessions.c",
|
||||
"-O3",
|
||||
"-Iinclude"
|
||||
],
|
||||
"file": "src/sessions.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/javalsai/coding/lidm",
|
||||
"arguments": [
|
||||
"gcc",
|
||||
"-c",
|
||||
"-o",
|
||||
"dist/efield.o",
|
||||
"src/efield.c",
|
||||
"-O3",
|
||||
"-Iinclude"
|
||||
],
|
||||
"file": "src/efield.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/javalsai/coding/lidm",
|
||||
"arguments": [
|
||||
"gcc",
|
||||
"-c",
|
||||
"-o",
|
||||
"dist/auth.o",
|
||||
"src/auth.c",
|
||||
"-O3",
|
||||
"-Iinclude"
|
||||
],
|
||||
"file": "src/auth.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/javalsai/coding/lidm",
|
||||
"arguments": [
|
||||
"gcc",
|
||||
"-c",
|
||||
"-o",
|
||||
"dist/config.o",
|
||||
"src/config.c",
|
||||
"-O3",
|
||||
"-Iinclude"
|
||||
],
|
||||
"file": "src/config.c"
|
||||
}
|
||||
]
|
39
docs/CONTRIBUTING.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Contributing
|
||||
|
||||
Contributions are welcome! Here's how you can help:
|
||||
|
||||
- [Contributing code](#code)
|
||||
- [Reporting issues](#issues)
|
||||
|
||||
## Code
|
||||
|
||||
For small fixes or incremental improvements simply fork the repo and follow the process below. For larger changes submit an [RFC:](RFC.md)
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo/) the repository and [clone](https://help.github.com/articles/cloning-a-repository/) your fork.
|
||||
|
||||
2. Start coding!
|
||||
- Configure clangd LSP by generating `compile_commands.json` (e.g. `bear -- make` or `compiledb make`)
|
||||
- Implement your feature.
|
||||
- Check your code works as expected.
|
||||
- Run the code formatter: `clang-format -i $(git ls-files "*.cpp" "*.h")`
|
||||
|
||||
3. Commit your changes to a new branch (not `master`, one change per branch) and push it:
|
||||
- Commit messages should:
|
||||
- Header line: explain the commit in one line (use the imperative)
|
||||
- Be descriptive.
|
||||
- Have a first line with less than *80 characters* and have a second line that is *empty* if you want to add a description.
|
||||
|
||||
4. Once you are happy with your changes, submit a pull request.
|
||||
- Open the pull request.
|
||||
- Add a short description explaining briefly what you've done (or if it's a work-in-progress - what you need to do)
|
||||
|
||||
## Issues
|
||||
|
||||
1. Do a quick search on GitHub to check if the issue has already been reported.
|
||||
2. [Open an issue](https://github.com//javalsai/lidm/issues/new) and describe the issue you are having - you could include:
|
||||
- Screenshots.
|
||||
- Ways to reproduce the issue.
|
||||
- Your lidm version.
|
||||
- Your platform (e.g. arch linux or Ubuntu 15.04 x64)
|
||||
|
||||
After reporting you should aim to answer questions or clarifications as this helps pinpoint the cause of the issue.
|
||||
|
61
flake.lock
generated
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1724224976,
|
||||
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
46
flake.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
outputs =
|
||||
{ flake-utils, nixpkgs, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
name = "LiDM";
|
||||
version = "0.0.1";
|
||||
|
||||
lidm = (
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = name;
|
||||
version = version;
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gcc
|
||||
gnumake
|
||||
linux-pam
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
"PREFIX="
|
||||
];
|
||||
|
||||
fixupPhase = ''
|
||||
rm -rf $out/etc
|
||||
'';
|
||||
}
|
||||
);
|
||||
in
|
||||
rec {
|
||||
defaultApp = flake-utils.lib.mkApp { drv = defaultPackage; };
|
||||
defaultPackage = lidm;
|
||||
devShell = pkgs.mkShell { buildInputs = lidm.nativeBuildInputs ++ [ pkgs.clang-tools ]; };
|
||||
}
|
||||
);
|
||||
}
|
25
include/chvt.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _CHVTH_
|
||||
#define _CHVTH_
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <linux/kd.h>
|
||||
#include <linux/vt.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/**
|
||||
* @brief change foreground virtual terminal to `n`
|
||||
*
|
||||
* @param n virtual terminal number
|
||||
* @return int non-negative value on success
|
||||
*/
|
||||
int chvt(int n);
|
||||
/**
|
||||
* @brief change foreground virtual terminal to `str`
|
||||
*
|
||||
* @param str virtual terminal number (string)
|
||||
* @return int non-negative value on success
|
||||
*/
|
||||
int chvt_str(char* str);
|
||||
|
||||
#endif
|
192
src/auth.c
@@ -3,11 +3,16 @@
|
||||
#include <security/_pam_types.h>
|
||||
#include <security/pam_appl.h>
|
||||
#include <security/pam_misc.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <auth.h>
|
||||
#include <stdlib.h>
|
||||
#include <sessions.h>
|
||||
#include <ui.h>
|
||||
#include <unistd.h>
|
||||
#include <util.h>
|
||||
|
||||
int pam_conversation(int num_msg, const struct pam_message **msg,
|
||||
struct pam_response **resp, void *appdata_ptr) {
|
||||
@@ -26,30 +31,63 @@ int pam_conversation(int num_msg, const struct pam_message **msg,
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
#define CHECK_PAM_RET(call) \
|
||||
ret = (call); \
|
||||
if (ret != PAM_SUCCESS) { \
|
||||
pam_end(pamh, ret); \
|
||||
return NULL; \
|
||||
}
|
||||
pam_handle_t *get_pamh(char *user, char *passwd) {
|
||||
pam_handle_t *pamh = NULL;
|
||||
struct pam_conv pamc = {pam_conversation, (void *)passwd};
|
||||
int retval;
|
||||
int ret;
|
||||
|
||||
retval = pam_start("login", user, &pamc, &pamh);
|
||||
if (retval != PAM_SUCCESS) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
retval = pam_authenticate(pamh, 0);
|
||||
if (retval != PAM_SUCCESS) {
|
||||
pam_end(pamh, retval);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
retval = pam_acct_mgmt(pamh, 0);
|
||||
if (retval != PAM_SUCCESS) {
|
||||
pam_end(pamh, retval);
|
||||
return NULL;
|
||||
}
|
||||
CHECK_PAM_RET(pam_start("login", user, &pamc, &pamh))
|
||||
CHECK_PAM_RET(pam_authenticate(pamh, 0))
|
||||
CHECK_PAM_RET(pam_acct_mgmt(pamh, 0))
|
||||
CHECK_PAM_RET(pam_setcred(pamh, PAM_ESTABLISH_CRED))
|
||||
CHECK_PAM_RET(pam_open_session(pamh, 0))
|
||||
CHECK_PAM_RET(pam_setcred(pamh, PAM_REINITIALIZE_CRED))
|
||||
|
||||
return pamh;
|
||||
}
|
||||
#undef CHECK_PAM_RET
|
||||
|
||||
void *shmalloc(size_t size) {
|
||||
return mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS,
|
||||
-1, 0);
|
||||
}
|
||||
|
||||
void moarEnv(char *user, struct session session, struct passwd *pw) {
|
||||
chdir(pw->pw_dir);
|
||||
setenv("HOME", pw->pw_dir, true);
|
||||
setenv("USER", pw->pw_name, true);
|
||||
setenv("SHELL", pw->pw_shell, true);
|
||||
// TERM
|
||||
setenv("LOGNAME", pw->pw_name, true);
|
||||
// MAIL?
|
||||
|
||||
// PATH?
|
||||
|
||||
char *xdg_session_type;
|
||||
if (session.type == SHELL)
|
||||
xdg_session_type = "tty";
|
||||
if (session.type == XORG)
|
||||
xdg_session_type = "wayland";
|
||||
if (session.type == WAYLAND)
|
||||
xdg_session_type = "x11";
|
||||
setenv("XDG_SESSION_TYPE", xdg_session_type, true);
|
||||
|
||||
/*char *buf;*/
|
||||
/*size_t bsize = snprintf(NULL, 0, "/run/user/%d", pw->pw_uid) + 1;*/
|
||||
/*buf = malloc(bsize);*/
|
||||
/*snprintf(buf, bsize, "/run/user/%d", pw->pw_uid);*/
|
||||
/*setenv("XDG_RUNTIME_DIR", buf, true);*/
|
||||
/*setenv("XDG_SESSION_CLASS", "user", true);*/
|
||||
/*setenv("XDG_SESSION_ID", "1", true);*/
|
||||
/*setenv("XDG_SESSION_DESKTOP", , true);*/
|
||||
/*setenv("XDG_SEAT", "seat0", true);*/
|
||||
}
|
||||
|
||||
bool launch(char *user, char *passwd, struct session session,
|
||||
void (*cb)(void)) {
|
||||
@@ -59,64 +97,94 @@ bool launch(char *user, char *passwd, struct session session,
|
||||
return false;
|
||||
}
|
||||
|
||||
gid_t *groups;
|
||||
int ngroups = 0;
|
||||
getgrouplist(user, pw->pw_gid, NULL, &ngroups);
|
||||
groups = malloc(ngroups * sizeof(gid_t));
|
||||
if (groups == NULL) {
|
||||
print_err("malloc error");
|
||||
return false;
|
||||
}
|
||||
if (getgrouplist(user, pw->pw_gid, groups, &ngroups) == -1) {
|
||||
free(groups);
|
||||
print_err("error fetching groups");
|
||||
return false;
|
||||
}
|
||||
|
||||
pam_handle_t *pamh = get_pamh(user, passwd);
|
||||
if (pamh == NULL) {
|
||||
print_err("error on pam authentication");
|
||||
return false;
|
||||
}
|
||||
|
||||
char **envlist = pam_getenvlist(pamh);
|
||||
if (envlist == NULL) {
|
||||
print_err("error getting pam env");
|
||||
bool *reach_session = shmalloc(sizeof(bool));
|
||||
if (reach_session == NULL) {
|
||||
perror("error allocating shared memory");
|
||||
return false;
|
||||
}
|
||||
*reach_session = false;
|
||||
|
||||
// point of no return
|
||||
int setgrps_ret = setgroups(ngroups, groups);
|
||||
free(groups);
|
||||
if (setgrps_ret == -1) {
|
||||
perror("setgroups");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
uint pid = fork();
|
||||
if (pid == 0) { // child
|
||||
char *TERM = NULL;
|
||||
char *_GETTERM = getenv("TERM");
|
||||
if (_GETTERM != NULL)
|
||||
strcln(&TERM, _GETTERM);
|
||||
if (clearenv() != 0) {
|
||||
print_errno("clearenv");
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (setgid(pw->pw_gid) == -1) {
|
||||
perror("setgid");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
char **envlist = pam_getenvlist(pamh);
|
||||
if (envlist == NULL) {
|
||||
print_errno("pam_getenvlist");
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
for (uint i = 0; envlist[i] != NULL; i++) {
|
||||
putenv(envlist[i]);
|
||||
}
|
||||
// FIXME: path hotfix
|
||||
putenv("PATH=/bin:/usr/bin");
|
||||
if (TERM != NULL) {
|
||||
setenv("TERM", TERM, true);
|
||||
free(TERM);
|
||||
}
|
||||
|
||||
if (setuid(pw->pw_uid) == -1) {
|
||||
perror("setuid");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
free(envlist);
|
||||
moarEnv(user, session, pw);
|
||||
|
||||
for (char **env = envlist; *env != NULL; env++) {
|
||||
putenv(*env);
|
||||
}
|
||||
// TODO: chown stdin to user
|
||||
// does it inherit stdin from parent and
|
||||
// does parent need to reclaim it after
|
||||
// this dies?
|
||||
|
||||
if (cb != NULL)
|
||||
cb();
|
||||
if (setgid(pw->pw_gid) == -1) {
|
||||
print_errno("setgid");
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
if (initgroups(user, pw->pw_gid) == -1) {
|
||||
print_errno("initgroups");
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
pam_end(pamh, PAM_SUCCESS);
|
||||
if (session.type == SHELL) {
|
||||
system("clear");
|
||||
execl(session.exec, session.exec, NULL);
|
||||
} else if (session.type == XORG || session.type == WAYLAND) {
|
||||
system("clear");
|
||||
execl(session.exec, session.exec, NULL);
|
||||
if (setuid(pw->pw_uid) == -1) {
|
||||
perror("setuid");
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (cb != NULL)
|
||||
cb();
|
||||
|
||||
*reach_session = true;
|
||||
|
||||
// TODO: these will be different due to TryExec
|
||||
// and, Exec/TryExec might contain spaces as args
|
||||
if (session.type == SHELL) {
|
||||
system("clear");
|
||||
execlp(session.exec, session.exec, NULL);
|
||||
} else if (session.type == XORG || session.type == WAYLAND) {
|
||||
system("clear");
|
||||
execlp(session.exec, session.exec, NULL);
|
||||
}
|
||||
perror("execl error");
|
||||
fprintf(stderr, "failure calling session\n");
|
||||
} else {
|
||||
waitpid(pid, NULL, 0);
|
||||
|
||||
pam_setcred(pamh, PAM_DELETE_CRED);
|
||||
pam_close_session(pamh, 0);
|
||||
pam_end(pamh, PAM_SUCCESS);
|
||||
|
||||
if (*reach_session == false) {
|
||||
return false;
|
||||
} else
|
||||
exit(0);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
43
src/chvt.c
Normal file
@@ -0,0 +1,43 @@
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <chvt.h>
|
||||
|
||||
static char *vterms[] = {"/dev/tty", "/dev/tty0", "/dev/vc/0", "/dev/systty",
|
||||
"/dev/console"};
|
||||
|
||||
int chvt_str(char *str) {
|
||||
char *err;
|
||||
errno = 0;
|
||||
long i = strtol(str, &err, 10);
|
||||
if (errno) {
|
||||
perror("strol");
|
||||
return -1;
|
||||
}
|
||||
// I'm not gonna elaborate on this....
|
||||
if (i > INT_MAX || i < INT_MIN || *err)
|
||||
return -1;
|
||||
|
||||
return chvt((int)i);
|
||||
}
|
||||
|
||||
int chvt(int n) {
|
||||
fprintf(stderr, "activating vt %d\n", n);
|
||||
char c = 0;
|
||||
for (int i = 0; i < sizeof(vterms) / sizeof(vterms[0]); i++) {
|
||||
int fd = open(vterms[i], O_RDWR);
|
||||
if (fd >= 0 && isatty(fd) && ioctl(fd, KDGKBTYPE, &c) == 0 && c < 3) {
|
||||
if (ioctl(fd, VT_ACTIVATE, n) < 0 || ioctl(fd, VT_WAITACTIVE, n) < 0) {
|
||||
fprintf(stderr, "Couldn't activate vt %d\n", n);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
|
||||
fprintf(stderr, "Couldn't get a file descriptor referring to the console.\n");
|
||||
return -1;
|
||||
}
|
@@ -128,7 +128,7 @@ struct config *parse_config(char *path) {
|
||||
__config = malloc(sizeof(struct config));
|
||||
if (__config == NULL)
|
||||
return NULL;
|
||||
bool ret = line_parser(fd, &sb.st_blksize, config_line_handler);
|
||||
bool ret = line_parser(fd, (ssize_t*)&sb.st_blksize, config_line_handler);
|
||||
if (!ret) {
|
||||
free(__config);
|
||||
return NULL;
|
||||
|
@@ -32,7 +32,7 @@ void field_update(struct editable_field *field, char *update) {
|
||||
if (*update == 127) {
|
||||
if (field->pos == 0) return;
|
||||
if (field->pos < field->length) {
|
||||
memcpy(&field->content[field->pos - 1], &field->content[field->pos],
|
||||
memmove(&field->content[field->pos - 1], &field->content[field->pos],
|
||||
field->length - field->pos);
|
||||
}
|
||||
(field->pos)--;
|
||||
|
@@ -4,14 +4,18 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <chvt.h>
|
||||
#include <config.h>
|
||||
#include <sessions.h>
|
||||
#include <ui.h>
|
||||
#include <users.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
struct config* config = parse_config("/etc/lidm.ini");
|
||||
if(config == NULL) {
|
||||
if (argc == 2)
|
||||
chvt_str(argv[1]);
|
||||
|
||||
struct config *config = parse_config("/etc/lidm.ini");
|
||||
if (config == NULL) {
|
||||
fprintf(stderr, "error parsing config\n");
|
||||
return 1;
|
||||
}
|
||||
|
@@ -40,6 +40,7 @@ static u_int16_t used_size = 0;
|
||||
static struct session *sessions = NULL;
|
||||
static struct sessions_list *__sessions_list = NULL;
|
||||
|
||||
// NOTE: commented printf's here would be nice to have debug logs if I ever implement it
|
||||
static enum session_type session_type;
|
||||
static int fn(const char *fpath, const struct stat *sb, int typeflag) {
|
||||
// practically impossible to reach this
|
||||
@@ -47,12 +48,14 @@ static int fn(const char *fpath, const struct stat *sb, int typeflag) {
|
||||
if (used_size == 0xffff)
|
||||
return 0;
|
||||
|
||||
if (!S_ISREG(sb->st_mode))
|
||||
if (sb == NULL || !S_ISREG(sb->st_mode))
|
||||
return 0;
|
||||
|
||||
/*printf("gonna open %s\n", fpath);*/
|
||||
FILE *fd = fopen(fpath, "r");
|
||||
if (fd == NULL) {
|
||||
fprintf(stderr, "error opening file (r) %s", fpath);
|
||||
perror("fopen");
|
||||
fprintf(stderr, "error opening file (r) %s\n", fpath);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -63,6 +66,7 @@ static int fn(const char *fpath, const struct stat *sb, int typeflag) {
|
||||
char *exec_buf = NULL;
|
||||
char *tryexec_buf = NULL;
|
||||
while (true) {
|
||||
/*printf(".");*/
|
||||
char *buf = malloc(sb->st_blksize);
|
||||
ssize_t read_size = getline(&buf, &alloc_size, fd);
|
||||
if (read_size == -1) {
|
||||
@@ -91,11 +95,13 @@ static int fn(const char *fpath, const struct stat *sb, int typeflag) {
|
||||
if (found == 0b111)
|
||||
break;
|
||||
}
|
||||
/*printf("\nend parsing...\n");*/
|
||||
|
||||
fclose(fd);
|
||||
|
||||
// just add this to the list
|
||||
if (name_buf != NULL && exec_buf != NULL) {
|
||||
/*printf("gonna add to session list\n");*/
|
||||
if (used_size >= alloc_size) {
|
||||
alloc_size += bs;
|
||||
sessions = realloc(sessions, alloc_size * unit_size);
|
||||
@@ -128,6 +134,7 @@ struct sessions_list *get_avaliable_sessions() {
|
||||
|
||||
for (uint i = 0; i < sources_size; i++) {
|
||||
session_type = sources[i].type;
|
||||
/*printf("recurring into %s\n", sources[i].dir);*/
|
||||
ftw(sources[i].dir, &fn, 1);
|
||||
}
|
||||
|
||||
|
9
src/ui.c
@@ -395,10 +395,9 @@ int load(struct users_list *users, struct sessions_list *sessions) {
|
||||
get_current_session(), &restore_all)) {
|
||||
print_passwd(box_start(), of_passwd.efield.length, true);
|
||||
ffield_cursor_focus();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
ffield_type(seq);
|
||||
} else
|
||||
ffield_type(seq);
|
||||
}
|
||||
|
||||
if (esc != 0)
|
||||
@@ -486,7 +485,7 @@ static void print_passwd(struct uint_point origin, uint length, bool err) {
|
||||
memset(passwd_prompt, 32, 32);
|
||||
memset(passwd_prompt, '*', length);
|
||||
|
||||
printf("\r\x1b[%dC\x1b[%sm\x1b[4m", origin.x + 14, pass_color);
|
||||
printf("\r\x1b[%dC\x1b[%sm", origin.x + 14, pass_color);
|
||||
fflush(stdout);
|
||||
write(STDOUT_FILENO, passwd_prompt, 32);
|
||||
printf("\x1b[%sm", theme.colors.fg);
|
||||
@@ -570,7 +569,7 @@ void print_errno(const char *descr) {
|
||||
origin.x, theme.colors.err, errno, strerror(errno));
|
||||
else {
|
||||
fprintf(stderr, "\x1b[%d;%dH\x1b[%sm%s(%d): %s", origin.y - 1, origin.x,
|
||||
descr, theme.colors.err, errno, strerror(errno));
|
||||
theme.colors.err, descr, errno, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
|
29
themes/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Themes
|
||||
|
||||
## cherry.ini
|
||||

|
||||
|
||||
## default.ini
|
||||

|
||||
|
||||
## nature.ini
|
||||

|
||||
|
||||
## nord.ini
|
||||

|
||||
|
||||
## old-blue.ini
|
||||

|
||||
|
||||
## old-blue-thick.ini
|
||||

|
||||
|
||||
## pure-tastelessness.ini
|
||||

|
||||
|
||||
## tasteless.ini
|
||||

|
||||
|
||||
## tastelessness.ini
|
||||

|
||||
|
33
themes/cherry.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
colors.bg = 48;2;77;33;55
|
||||
colors.fg = 22;3;24;38;2;245;245;245
|
||||
colors.err = 1;31
|
||||
colors.s_wl = 38;2;255;174;66
|
||||
colors.s_xorg = 38;2;37;175;255
|
||||
colors.s_shell = 32
|
||||
colors.f_other = 38;2;255;64;64
|
||||
colors.e_hostname = 1;23;38;5;197
|
||||
colors.e_date = 31
|
||||
colors.e_box = 31
|
||||
colors.e_header = 1;4;38;5;204
|
||||
colors.e_user = 38;5;51
|
||||
colors.e_passwd = 4;2;38;5;203
|
||||
colors.e_badpasswd = 4;31
|
||||
colors.e_key = 1;23;38;5;197
|
||||
chars.hb = ─
|
||||
chars.vb = │
|
||||
chars.ctl = ┌
|
||||
chars.ctr = ┐
|
||||
chars.cbl = └
|
||||
chars.cbr = ┘
|
||||
functions.poweroff = F1
|
||||
functions.reboot = F2
|
||||
functions.refresh = F5
|
||||
strings.f_poweroff = poweroff
|
||||
strings.f_reboot = reboot
|
||||
strings.f_refresh = refresh
|
||||
strings.e_user = user
|
||||
strings.e_passwd = password
|
||||
strings.s_xorg = xorg
|
||||
strings.s_wayland = wayland
|
||||
strings.s_shell = shell
|
||||
behavior.include_defshell = true
|
33
themes/nature.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
colors.bg = 48;2;15;22;15
|
||||
colors.fg = 22;23;24;38;2;245;245;245
|
||||
colors.err = 1;31
|
||||
colors.s_wl = 38;2;255;174;66
|
||||
colors.s_xorg = 38;2;37;175;255
|
||||
colors.s_shell = 32
|
||||
colors.f_other = 38;2;255;64;64
|
||||
colors.e_hostname = 38;5;28
|
||||
colors.e_date = 32
|
||||
colors.e_box = 32
|
||||
colors.e_header = 1;4;32
|
||||
colors.e_user = 38;5;51
|
||||
colors.e_passwd = 4;2;38;5;83
|
||||
colors.e_badpasswd = 3;4;31
|
||||
colors.e_key = 32
|
||||
chars.hb = ─
|
||||
chars.vb = │
|
||||
chars.ctl = ┌
|
||||
chars.ctr = ┐
|
||||
chars.cbl = └
|
||||
chars.cbr = ┘
|
||||
functions.poweroff = F1
|
||||
functions.reboot = F2
|
||||
functions.refresh = F5
|
||||
strings.f_poweroff = poweroff
|
||||
strings.f_reboot = reboot
|
||||
strings.f_refresh = refresh
|
||||
strings.e_user = user
|
||||
strings.e_passwd = password
|
||||
strings.s_xorg = xorg
|
||||
strings.s_wayland = wayland
|
||||
strings.s_shell = shell
|
||||
behavior.include_defshell = true
|
33
themes/nord.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
colors.bg = 48;2;19;19;22
|
||||
colors.fg = 22;24;38;2;245;245;245
|
||||
colors.err = 1;31
|
||||
colors.s_wl = 38;2;255;174;66
|
||||
colors.s_xorg = 38;2;37;175;255
|
||||
colors.s_shell = 32
|
||||
colors.f_other = 38;2;255;64;64
|
||||
colors.e_hostname = 34
|
||||
colors.e_date = 38;2;66;66;88
|
||||
colors.e_box = 38;2;122;122;122
|
||||
colors.e_header = 1;4;36
|
||||
colors.e_user = 38;5;51
|
||||
colors.e_passwd = 4;2;38;5;80
|
||||
colors.e_badpasswd = 3;4;31
|
||||
colors.e_key = 34
|
||||
chars.hb = ─
|
||||
chars.vb = │
|
||||
chars.ctl = ┌
|
||||
chars.ctr = ┐
|
||||
chars.cbl = └
|
||||
chars.cbr = ┘
|
||||
functions.poweroff = F1
|
||||
functions.reboot = F2
|
||||
functions.refresh = F5
|
||||
strings.f_poweroff = poweroff
|
||||
strings.f_reboot = reboot
|
||||
strings.f_refresh = refresh
|
||||
strings.e_user = user
|
||||
strings.e_passwd = password
|
||||
strings.s_xorg = xorg
|
||||
strings.s_wayland = wayland
|
||||
strings.s_shell = shell
|
||||
behavior.include_defshell = true
|
33
themes/old-blue-thick.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
colors.bg = 48;2;0;0;255
|
||||
colors.fg = 22;24;39;48;2;0;0;255
|
||||
colors.err = 1;31
|
||||
colors.s_wl = 38;2;255;174;66
|
||||
colors.s_xorg = 38;2;37;175;255
|
||||
colors.s_shell = 38;2;34;140;34
|
||||
colors.f_other = 38;2;255;64;64
|
||||
colors.e_hostname = 38;2;255;64;64
|
||||
colors.e_date = 38;2;144;144;144
|
||||
colors.e_box = 34
|
||||
colors.e_header = 4;38;2;0;255;0
|
||||
colors.e_user = 36
|
||||
colors.e_passwd = 4;38;2;245;245;205
|
||||
colors.e_badpasswd = 3;4;31
|
||||
colors.e_key = 1;31;48;2;255;174;66
|
||||
chars.hb = █
|
||||
chars.vb = [D███[D
|
||||
chars.ctl = [D███[D
|
||||
chars.ctr = [D███[D
|
||||
chars.cbl = [D███[D
|
||||
chars.cbr = [D███[D
|
||||
functions.poweroff = F1
|
||||
functions.reboot = F2
|
||||
functions.refresh = F5
|
||||
strings.f_poweroff = powewoff
|
||||
strings.f_reboot = rewoot
|
||||
strings.f_refresh = rewresh
|
||||
strings.e_user = wuser
|
||||
strings.e_passwd = passwd
|
||||
strings.s_xorg = xworg
|
||||
strings.s_wayland = waywand
|
||||
strings.s_shell = swell
|
||||
behavior.include_defshell = true
|
33
themes/old-blue.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
colors.bg = 48;2;0;0;255
|
||||
colors.fg = 22;24;39;48;2;0;0;255
|
||||
colors.err = 1;31
|
||||
colors.s_wl = 38;2;255;174;66
|
||||
colors.s_xorg = 38;2;37;175;255
|
||||
colors.s_shell = 38;2;34;140;34
|
||||
colors.f_other = 38;2;255;64;64
|
||||
colors.e_hostname = 38;2;255;64;64
|
||||
colors.e_date = 38;2;144;144;144
|
||||
colors.e_box = 34
|
||||
colors.e_header = 4;38;2;0;255;0
|
||||
colors.e_user = 36
|
||||
colors.e_passwd = 4;38;2;245;245;205
|
||||
colors.e_badpasswd = 3;4;31
|
||||
colors.e_key = 1;31;48;2;255;174;66
|
||||
chars.hb = █
|
||||
chars.vb = █
|
||||
chars.ctl = █
|
||||
chars.ctr = █
|
||||
chars.cbl = █
|
||||
chars.cbr = █
|
||||
functions.poweroff = F1
|
||||
functions.reboot = F2
|
||||
functions.refresh = F5
|
||||
strings.f_poweroff = powewoff
|
||||
strings.f_reboot = rewoot
|
||||
strings.f_refresh = rewresh
|
||||
strings.e_user = wuser
|
||||
strings.e_passwd = passwd
|
||||
strings.s_xorg = xworg
|
||||
strings.s_wayland = waywand
|
||||
strings.s_shell = swell
|
||||
behavior.include_defshell = true
|
33
themes/pure-tastelessness.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
colors.bg = -
|
||||
colors.fg = 24;39m[?25l[-
|
||||
colors.err = -
|
||||
colors.s_wl = -
|
||||
colors.s_xorg = -
|
||||
colors.s_shell = -
|
||||
colors.f_other = -
|
||||
colors.e_hostname = 30
|
||||
colors.e_date = 30
|
||||
colors.e_box = -
|
||||
colors.e_header = 30
|
||||
colors.e_user = -
|
||||
colors.e_passwd = 24;30
|
||||
colors.e_badpasswd = -
|
||||
colors.e_key = 30
|
||||
chars.hb = -
|
||||
chars.vb = -
|
||||
chars.ctl = -
|
||||
chars.ctr = -
|
||||
chars.cbl = -
|
||||
chars.cbr = -
|
||||
functions.poweroff = F1
|
||||
functions.reboot = F2
|
||||
functions.refresh = F5
|
||||
strings.f_poweroff = -
|
||||
strings.f_reboot = -
|
||||
strings.f_refresh = -
|
||||
strings.e_user = -
|
||||
strings.e_passwd = -
|
||||
strings.s_xorg = -
|
||||
strings.s_wayland = -
|
||||
strings.s_shell = -
|
||||
behavior.include_defshell = false
|
BIN
themes/screenshots/cherry.png
Normal file
After Width: | Height: | Size: 261 KiB |
BIN
themes/screenshots/default.png
Normal file
After Width: | Height: | Size: 267 KiB |
BIN
themes/screenshots/nature.png
Normal file
After Width: | Height: | Size: 262 KiB |
BIN
themes/screenshots/nord.png
Normal file
After Width: | Height: | Size: 262 KiB |
BIN
themes/screenshots/old-blue-thick.png
Normal file
After Width: | Height: | Size: 273 KiB |
BIN
themes/screenshots/old-blue.png
Normal file
After Width: | Height: | Size: 267 KiB |
BIN
themes/screenshots/pure-tastelessness.png
Normal file
After Width: | Height: | Size: 333 KiB |
BIN
themes/screenshots/tasteless.png
Normal file
After Width: | Height: | Size: 344 KiB |
BIN
themes/screenshots/tastelessness.png
Normal file
After Width: | Height: | Size: 347 KiB |
33
themes/tasteless.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
colors.bg = -
|
||||
colors.fg = 24
|
||||
colors.err = -
|
||||
colors.s_wl = -
|
||||
colors.s_xorg = -
|
||||
colors.s_shell = -
|
||||
colors.f_other = -
|
||||
colors.e_hostname = -
|
||||
colors.e_date = -
|
||||
colors.e_box = -
|
||||
colors.e_header = -
|
||||
colors.e_user = -
|
||||
colors.e_passwd = -
|
||||
colors.e_badpasswd = -
|
||||
colors.e_key = -
|
||||
chars.hb = ─
|
||||
chars.vb = │
|
||||
chars.ctl = ┌
|
||||
chars.ctr = ┐
|
||||
chars.cbl = └
|
||||
chars.cbr = ┘
|
||||
functions.poweroff = F1
|
||||
functions.reboot = F2
|
||||
functions.refresh = F5
|
||||
strings.f_poweroff = poweroff
|
||||
strings.f_reboot = reboot
|
||||
strings.f_refresh = refresh
|
||||
strings.e_user = user
|
||||
strings.e_passwd = password
|
||||
strings.s_xorg = xorg
|
||||
strings.s_wayland = wayland
|
||||
strings.s_shell = shell
|
||||
behavior.include_defshell = true
|
33
themes/tastelessness.ini
Normal file
@@ -0,0 +1,33 @@
|
||||
colors.bg = -
|
||||
colors.fg = 24;39m[?25l[-
|
||||
colors.err = -
|
||||
colors.s_wl = -
|
||||
colors.s_xorg = -
|
||||
colors.s_shell = -
|
||||
colors.f_other = -
|
||||
colors.e_hostname = -
|
||||
colors.e_date = 30
|
||||
colors.e_box = -
|
||||
colors.e_header = 30
|
||||
colors.e_user = -
|
||||
colors.e_passwd = 24;30
|
||||
colors.e_badpasswd = -
|
||||
colors.e_key = -
|
||||
chars.hb = -
|
||||
chars.vb = -
|
||||
chars.ctl = -
|
||||
chars.ctr = -
|
||||
chars.cbl = -
|
||||
chars.cbr = -
|
||||
functions.poweroff = F1
|
||||
functions.reboot = F2
|
||||
functions.refresh = F5
|
||||
strings.f_poweroff = poweroff
|
||||
strings.f_reboot = reboot
|
||||
strings.f_refresh = refresh
|
||||
strings.e_user = user
|
||||
strings.e_passwd = password
|
||||
strings.s_xorg = xorg
|
||||
strings.s_wayland = wayland
|
||||
strings.s_shell = shell
|
||||
behavior.include_defshell = true
|