sway: signal on launch to systemd that the graphical-session.target is ready
this allows auto-launching of other services which require a compositor (i.e. messaging apps)
This commit is contained in:
@@ -340,6 +340,20 @@ in
|
||||
})
|
||||
];
|
||||
|
||||
sane.user.services.sway-session = {
|
||||
description = "no-op unit to signal that sway is operational";
|
||||
documentation = [
|
||||
"https://github.com/swaywm/sway/issues/7862"
|
||||
"https://github.com/alebastr/sway-systemd"
|
||||
];
|
||||
bindsTo = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.coreutils}/bin/true";
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
|
||||
sane.user.fs = {
|
||||
".config/waybar/config".symlink.target =
|
||||
(pkgs.formats.json {}).generate "waybar-config.json" [
|
||||
|
@@ -199,4 +199,9 @@ output "Unknown 0x0637 0x00000000" {
|
||||
# for more, see: <repo:nixos/nixpkgs:nixos/modules/programs/wayland/sway.nix>
|
||||
include /etc/sway/config.d/*
|
||||
|
||||
# signal to systemd that sway is active,
|
||||
# and therefore let it start the graphical-session target
|
||||
# see `systemctl --user cat sway-session` for links to docs
|
||||
exec --no-startup-id systemctl start --user sway-session.service
|
||||
|
||||
@extra_lines@
|
||||
|
Reference in New Issue
Block a user