[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting Guix to shutdown my laptop properly with Sway and no DE
From: |
Robby Zambito |
Subject: |
Re: Getting Guix to shutdown my laptop properly with Sway and no DE |
Date: |
Tue, 04 Jul 2023 22:44:29 -0400 |
User-agent: |
mu4e 1.10.3; emacs 28.2 |
danclm@tutanota.com writes:
> Hi Robby,
> thanks for your response.
>
> Do you mind sharing your config?
> I never managed on Guix to autologin and automatically start Sway without a
> display manager.
>
> Daniele
Hi Daniele,
I actually don't have auto login / auto start Sway - I just login with a
TTY, and then I use `herd start sway` with a little guix home service
that I wrote:
(shepherd-service
(documentation "SwayWM")
(provision '(sway))
(requirement '(dbus))
(respawn? #f)
(auto-start? #f)
(start #~(make-forkexec-constructor
(list #$(file-append (specification->package "dbus")
"/bin/dbus-run-session") "sway")
#:log-file (string-append #$log-dir "/swaywm.log")))
(stop #~(make-system-destructor
(string-join (list #$(file-append (specification->package "sway")
"/bin/swaymsg")
"exit")))))
This isn't perfect (I use the system sway binary, but I use swaymsg from
my home profile - which means they can be different package version; and
herd stop sway doesn't work), but it's been good enough for me to not
care to fix.