Skip to content

[mirror] A greetd greeter(front end) that runs under DRM, powered by raylib.

License

Notifications You must be signed in to change notification settings

Ziqi-Yang/raygreet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RayGreet

This document is generated by README.typ using pandoc.

Installation

Pre-requist

  1. Install zig programming language (version: master branch)

  2. Clone this repo using command git clone --single-branch -b main --depth=1 'https://git.sr.ht/~meow_king/raygreet'

  3. Clone raylib as ./lib/raylib, you can run the following command

cd ./raygreet
rm ./lib/raylib # remove the original symbol link in this repo
git clone --single-branch -b master --depth=1 'https://github.com/raysan5/raylib.git' ./lib/raylib
      

Manually Build

If you have just installed, then run command just install. Or you need to run the following command:

sudo zig build -Doptimize=ReleaseSafe -Dplatform_drm
sudo cp ./zig-out/bin/raygreet /usr/bin/raygreet
sudo chmod a+s /usr/bin/raygreet
      

Check the file permission by ls -l /usr/bin/raygreet, if you see

-rwsr-sr-x 1 root root 1052768 Feb 14 10:36 /usr/bin/raygreet

and s is the fourth character and the file is owned by root, then we installed it successfully.
s means this file is always executed as the file owner (in this case, root), so we are in input group and can access /dev/input/event* files, which is required by Raylib. However, instead of

sudo chmod a+s /usr/bin/raygreet

You can also make greeter user in input group using the following command

sudo usermod greeter -a -G input
      

Develop

Test in TTY

  1. You need fakegreet, which can built with the following command
git clone --single-branch -b master --depth=1 'https://git.sr.ht/~kennylevinsen/greetd'
cd ./greetd
cargo build # use `--release` to build in release mode
cp ./target/debug/fakegreet ~/.local/bin/
      
  1. Change to TTY<number> using key Ctrl + Alt + F<number>

  2. then run just run-drm or

zig build -Dplatform_drm
sudo fakegreet "./zig-out/bin/raygreet"
      

Current Issues

  1. Only officially support US keyboards. Other keyboards may have wrong mappings for some keys.

It is due to that Raylib currently uses a US keymap to map scancode to key code. See raylib source.
You can test it in TTY to see if it works correctly.

Here is the discussion.

Developer notes:\

  1. evdev key code: /usr/share/X11/xkb/keycodes/evdev

  2. scancode: /usr/include/linux/input-event-codes.h

About

[mirror] A greetd greeter(front end) that runs under DRM, powered by raylib.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published