diff --git a/Makefile b/Makefile index cfcf175..fd7388b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ WITH_SDDM ?= no +WITH_GREETD ?= no PREFIX ?= /usr SYSCONFDIR ?= /etc @@ -27,6 +28,9 @@ install-sddm: install -D -m 0644 -pv -t $(DESTDIR)$(SYSCONFDIR)/sway sddm/sddm-greeter.config install -D -m 0644 -pv -t $(DESTDIR)$(PREFIX)/lib/sddm/sddm.conf.d sddm/wayland-sway.conf +install-greetd: + install -D -m 0644 -pv -t $(DESTDIR)$(SYSCONFDIR)/greetd greetd/config.toml + install-sway: build install -D -m 0644 -pv -t $(DESTDIR)$(SYSCONFDIR)/sway sway/config install -D -m 0755 -pv -t $(DESTDIR)$(BINDIR) sway/start-sway @@ -43,6 +47,10 @@ ifeq ($(WITH_SDDM),yes) install: install-sddm endif +ifeq ($(WITH_GREETD),yes) +install: install-greetd +endif + install: install-sway install-swaylock check: diff --git a/fedora-sway-configs.spec.rpkg b/fedora-sway-configs.spec.rpkg index c319f73..676436e 100644 --- a/fedora-sway-configs.spec.rpkg +++ b/fedora-sway-configs.spec.rpkg @@ -1,5 +1,6 @@ # vim: ft=spec -%bcond_without sddm +%bcond_with sddm +%bcond_without greetd %bcond_with check %global sway_ver 1.7 @@ -81,17 +82,30 @@ to use Sway for the greeter display server. %endif +%if %{with greetd} +%package -n greetd-qml-sway +Summary: Sway greetd qml greeter configuration. +Provides: greetd-greeter-displayserver +Conflicts: greetd-greeter-displayserver + +Requires: qmlgreet +Requires: greetd +Requires: sway + +%description -n greetd-qml-sway +This package contains configuration and dependencies for greetd +with qmlgreet to use Sway for the greeter display server. +%endif + %prep {{{ git_setup_macro path=$(git rev-parse --show-toplevel) }}} - %build %make_build - %install %make_install PREFIX='%{_prefix}' WITH_SDDM='%[%{with sddm}?"yes":"no"]' - +%make_install PREFIX='%{_prefix}' WITH_GREETD='%[%{with greetd}?"yes":"no"]' %if %{with check} %check @@ -117,5 +131,10 @@ to use Sway for the greeter display server. %{_libexecdir}/sddm-compositor-sway %endif +%if %{with greetd} +%files -n greetd-qml-sway +%config(noreplace) %{_sysconfdir}/greetd/config.toml +%endif + %changelog {{{ git_changelog }}} diff --git a/greetd/config.toml b/greetd/config.toml new file mode 100644 index 0000000..9906277 --- /dev/null +++ b/greetd/config.toml @@ -0,0 +1,16 @@ +[terminal] +# The VT to run the greeter on. Can be "next", "current" or a number +# designating the VT. +vt = 1 + +# The default session, also known as the greeter. +[default_session] + +# `agreety` is the bundled agetty/login-lookalike. You can replace `/bin/sh` +# with whatever you want started, such as `sway`. +command = "start-qmlgreet" + +# The user to run the command as. The privileges this user must have depends +# on the greeter. A graphical greeter may for example require the user to be +# in the `video` group. +user = "greeter"