rharish101 / ReGreet

Clean and customizable greeter for greetd
GNU General Public License v3.0
348 stars 16 forks source link

Default environment #48

Closed inmaldrerah closed 6 months ago

inmaldrerah commented 8 months ago

I am using the ReGreet NixOS module, and write

Hyprland

in /etc/greetd/environments (with environment.etc."greetd/environments".text in the NixOS configuration). Although I can find this environment as an option on the login screen, it is not set in the session drop down as the default, even if it is the only environment.

Is there a way to set the default environment? GTKGreet uses the first line in /etc/greetd/environments as the default, should it also be the case in ReGreet, i.e. is it NixOS specific?

rharish101 commented 6 months ago

Nope, ReGreet does not use /etc/greetd/environments. It scans the environments from /usr/share/xsessions and /usr/share/wayland-sessions by default, although this might be different in the NixOS module. You might want to contact the NixOS module maintainers, as I don't maintain it.

As for the default environment, ReGreet simply uses the last environment that you logged into.

inmaldrerah commented 6 months ago

Aha, that explains everyting. Thanks for your reply. I am using tmpfs-as-root on NixOS, so on every boot / is created anew, and thus the "last environment" info cannot be saved across reboot on my setup. May I ask to which file the "last environment" info is saved? In this way I can set that file to be preserved across reboot. Is it in the CACHE_DIR which defaults to /var/cache/regreet?

rharish101 commented 6 months ago

Yup, it's /var/cache/regreet/cache.toml by default (although the NixOS module might've changed this).