mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-03 06:15:03 +02:00
feat: add manpages and improve service docs
This commit is contained in:
parent
1bab69f5f4
commit
9de4551f4c
10
Makefile
10
Makefile
@ -31,12 +31,16 @@ clean:
|
||||
|
||||
# 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
|
||||
install -Dm755 ./lidm ${DESTDIR}${PREFIX}/bin
|
||||
install -Dm644 ./themes/default.ini ${DESTDIR}/etc/lidm.ini
|
||||
install -Dm644 ./assets/man/lidm.1 ${DESTDIR}/usr/share/man/man1/lidm.1
|
||||
install -Dm644 ./assets/man/lidm-config.5 ${DESTDIR}/usr/share/man/man5/lidm-config.5
|
||||
gzip -f ${DESTDIR}/usr/share/man/man{1/lidm.1,5/lidm-config.5}
|
||||
|
||||
uninstall:
|
||||
rm -rf ${DESTDIR}${PREFIX}/bin/lidm ${DESTDIR}/etc/lidm.ini
|
||||
rm -rf ${DESTDIR}/usr/share/man/man{1/lidm.1,5/lidm-config.5}.gz
|
||||
rm -rf /etc/systemd/system/lidm.service /etc/dinit.d/lidm /etc/runit/sv/lidm
|
||||
|
||||
install-service:
|
||||
@if command -v systemctl &> /dev/null; then \
|
||||
|
@ -91,7 +91,7 @@ make # 👍
|
||||
# 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.
|
||||
* If you want lidm to run on startup ([manual steps](./assets/services/README.md)):
|
||||
```sh
|
||||
# automatically detects init system
|
||||
# and installs service file (for tty7)
|
||||
|
81
assets/man/lidm-config.5
Normal file
81
assets/man/lidm-config.5
Normal file
@ -0,0 +1,81 @@
|
||||
.\" Manpage for lidm
|
||||
.\" https://github.com/javalsai/lidm
|
||||
.TH lidm-config 5
|
||||
|
||||
.SH NAME
|
||||
lidm-config \- Configuration file syntax for lidm
|
||||
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fB\fI/etc/lidm.ini\fP
|
||||
|
||||
|
||||
.SH DESCRIPTION
|
||||
The \fI/etc/lidm.ini\fP file specifies all the configuration for lidm, including theme colors.
|
||||
|
||||
The config parser is very primitive still, so the file only consists of \fBkey/value\fP pairs separated by \fB' = '\fP (yes, the surrounding spaces are neccessary). It will also not warn if the config is invalid.
|
||||
|
||||
You can't escape characters with \fB'\\'\fP, but the program reads until the end of line, so you can put any raw bytes there.
|
||||
|
||||
|
||||
.SH KEYS
|
||||
Similar keys are grouped together to keep this as short as possible.
|
||||
|
||||
.SS Colors
|
||||
All keys under this section are always wrapped inside ansi sequences (\fB\\x1b[...m\fP).
|
||||
.TP
|
||||
\fBcolors.bd, colors.fg, colors.err\fP
|
||||
Background, foreground and error escape sequences. \fB'fg'\fP is also used as reset sequence, so it must remove effects used in other keys (such as bold, underline...) \fBWITHOUT\fP using the \fB'0'\fP sequence, as that would remove the background color.
|
||||
.TP
|
||||
\fBcolors.s_wl, colors.s_xorg, colors.s_shell\fP
|
||||
Coloring for sessions of such types (Wayland, X.org, Shells)
|
||||
.TP
|
||||
\fBcolors.f_other\fP
|
||||
This was going to be used for session of other type I think, but is currently unused, however it still needs to be specified.
|
||||
.TP
|
||||
\fBcolors.e_hostname, colors.e_date, colors.e_box\fP
|
||||
Coloring for the hostname, date and box elements.
|
||||
.TP
|
||||
\fBcolors.e_header\fP
|
||||
Coloring for heading elements (left column)
|
||||
.TP
|
||||
\fBcolors.e_user, colors.e_passwd, colors.e_badpasswd\fP
|
||||
Coloring for the user element, password and bad padssword.
|
||||
.TP
|
||||
\fBcolors.e_key\fP
|
||||
Coloring for key elements (eg: F1, F2, CTRL...)
|
||||
|
||||
.SS
|
||||
Single characters used for some elements (can be longer than a character, but it will likely break UI)
|
||||
.TP
|
||||
\fBchars.hb, chars.vb\fP
|
||||
Character for the horizontal bar (hb) and vertical bar (vb).
|
||||
.TP
|
||||
\fBchars.ctl, chars.ctr, chars.cbl, chars.cbr\fP
|
||||
Characters for the corners of the box (ctl = corner top left, cbr = corner bottom right)
|
||||
|
||||
.SS Functions
|
||||
.TP
|
||||
\fBfunctions.poweroff, functions.reboot, functions.refresh\fP
|
||||
Function key to use for such action.
|
||||
|
||||
.SS String
|
||||
Strings to use for some elements.
|
||||
.TP
|
||||
\fBstrings.f_poweroff, strings.f_reboot, strings.f_refresh\fP
|
||||
Text displayed to name such functions.
|
||||
.TP
|
||||
\fBstrings.e_user, strings.e_passwd\fP
|
||||
Text to display for these element headers.
|
||||
.TP
|
||||
\fBstrings.s_xorg, strings.s_wayland, strings.s_shell\fP
|
||||
Text to display as the header for such sessions.
|
||||
|
||||
.SS Behavior
|
||||
.TP
|
||||
\fBbehavior.include_defshell\fP
|
||||
"true"/"false" (invalid input defaults to false), if true, includes the user default shell as a session to launch
|
||||
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR lidm (1)
|
40
assets/man/lidm.1
Normal file
40
assets/man/lidm.1
Normal file
@ -0,0 +1,40 @@
|
||||
.\" Manpage for lidm
|
||||
.\" https://github.com/javalsai/lidm
|
||||
.TH lidm 1
|
||||
|
||||
.SH NAME
|
||||
lidm \- A text based display manager made in C
|
||||
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBlidm\fP [TTY]
|
||||
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBlidm\fP is a text based display manager that supports a lot of configuration. Its focus is to be simple, minimal and easy to compile even on really old hardware, while being as customizable as possible.
|
||||
|
||||
|
||||
.SH ARGUMENTS
|
||||
.TP
|
||||
[\fBTTY\fP]\tTTY to switch to, does not mean that it will run in it.
|
||||
|
||||
|
||||
.SH FILES
|
||||
.TP
|
||||
\fI/etc/lidm.ini\fP\tConfig file, see \c
|
||||
.BR lidm-config (5) \c
|
||||
for syntax.
|
||||
|
||||
|
||||
.SH NOTES
|
||||
.SS "Service Files"
|
||||
To configure startup behaviour for your init system, see
|
||||
.BR https://github.com/javalsai/lidm/tree/master/assets/services
|
||||
(make sure you're on the same version, the link points to the latest commit, small command arguments might have changed).
|
||||
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR lidm-config (5)
|
||||
.PP
|
||||
The upstream GitHub repository can be found at
|
||||
.BR https://github.com/javalsai/lidm
|
@ -7,12 +7,4 @@ There are three packages that follow standard conventions:
|
||||
* [`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`)
|
||||
* **runit:** Copy `assets/services/runit/` to `/etc/runit/sv/lidm/`, add the service (`ln -s /etc/runit/sv/lidm /run/runit/service`) and enable it (`sv enable lidm`)
|
||||
> None of those packages include the service files. [You have to do this yourself](../../services/README.md).
|
||||
|
24
assets/services/README.md
Normal file
24
assets/services/README.md
Normal file
@ -0,0 +1,24 @@
|
||||
# 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`.
|
||||
|
||||
There's make scripts to automatically copy the service files to the proper locations, you just have to run `make install-service-$INIT`. `make install-service` will attempt to detect the init system in use and install for it.
|
||||
|
||||
The manuall 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`
|
||||
|
||||
> [!WARNING]
|
||||
> Make sure to disable any other service that might run on tty7, such us lightdm or most display managers out there.
|
Loading…
x
Reference in New Issue
Block a user