Thanks to visit codestin.com
Credit goes to github.com

Skip to content

xhos/yawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yawn - a very boring greeter 💤

Minimal, sleek greetd based greeter written in Go with Bubble Tea.

It's simple, it's dumb, it just works.

Configuration

Configuration is done via command-line flags:

Flag Default Description
-cmd none Command to run for user session
-color f5f5f5 Accent color as hex without #
-preauth false Start the auth loop immediately
-user none Force a specific username
-width 8 Width of the input fields

Why another greeter?

yet another twui greetner

Initially built for a single-user NixOS + Hyprland setup with a few specific requirements:

  1. Force username - No need to type it every boot (since I don't want any state like last logged in user)
  2. Instant fingerprint auth - Start the PAM loop immediately with -preauth, no extra keypresses
  3. Simple - Just a TUI and a few flags

If you have a laptop with a fingerprint reader and want seamless auth without the "type username -> press enter -> now you can use fingerprint" dance, this is for you.

Known limitations

Multi-monitor scaling is broken - that's just how TTYs work. For example, I have a 4k display and a 1080p display. The greeter renders correctly on the 1080p, but it's tiny on the 4k one. This affects all TUI greeters. The only workaround is launching a graphical environment (Cage + terminal), but that defeats the simplicity goal. sysc-greet takes that approach if it bothers you too much.

Usage

NixOS

Add to your flake inputs:

{
  inputs.yawn.url = "github:xhos/yawn";
}

Then configure greetd:

services.greetd = {
  enable = true;
  settings.default_session.command = "${inputs.yawn.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/yawn -cmd Hyprland";
};

Other distros

/etc/greetd/config.toml:

[terminal]
vt = 1

[default_session]
command = "yawn -user xhos -cmd Hyprland -preauth"
user = "greeter"

Refer to greetd's docs for more details.

Development

VM

Launch a VM with greetd and yawn preconfigured:

nix run .#test-vm

To adjust args, edit the test-vm app in flake.nix.

Local

For quick UI iteration without spawning a full VM, use the stub greetd server:

nix develop # if you don't use devenv
stub -- -cmd Hyprland -user test

The stub uses test/test as credentials.

Similar projects

Other greeters worth checking out, these are the ones I tried before making yawn:

Contributing

PRs and issues are welcome. Packaging for other distros is especially appreciated since I only use NixOS. word pass

About

minimal, sleek greetd based greeter

Topics

Resources

License

Stars

Watchers

Forks