Untangle the target mess a little bit
This commit is contained in:
parent
d7a35463fe
commit
64f19c2f34
|
@ -274,7 +274,7 @@ in
|
|||
Unit.After = [ "graphical-session-pre.target" ];
|
||||
Unit.Before = [ "graphical-session.target" ];
|
||||
Unit.BindsTo = [ "graphical-session.target" ];
|
||||
Install.WantedBy = [ "plasma-workspace.target" ];
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
# XWayland target
|
||||
xwayland = {
|
||||
|
@ -282,7 +282,7 @@ in
|
|||
Unit.After = [ "graphical-session-pre.target" ];
|
||||
Unit.Before = [ "graphical-session.target" ];
|
||||
Unit.BindsTo = [ "graphical-session.target" ];
|
||||
Install.WantedBy = [ "plasma-workspace.target" ];
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ let
|
|||
|
||||
wallpaper = config.linux.graphical.wallpaper;
|
||||
|
||||
xwayland-display = ":12";
|
||||
xwayland-display = ":0";
|
||||
|
||||
in
|
||||
{
|
||||
|
@ -67,22 +67,10 @@ in
|
|||
"10" = { name = "🎲 misc"; };
|
||||
"99" = { name = "📧 Email"; };
|
||||
};
|
||||
# systemd.user.services.niri = lib.mkIf cfg.enable {
|
||||
# Unit.Wants = [ "tray.target" "xwayland.target" ];
|
||||
# };
|
||||
systemd.user.services.niri = lib.mkIf cfg.enable {
|
||||
Unit = {
|
||||
Description = "A scrollable-tiling Wayland compositor";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
Before = [ "graphical-session.target" "tray.target" "swaync.service" "xdg-desktop-autostart.target" ];
|
||||
Wants = [ "graphical-session-pre.target" "swaync.service" "xdg-desktop-autostart.target" ];
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
|
||||
Service.Slice = "session.slice";
|
||||
Service.Type = "notify";
|
||||
Service.ExecStart = "${lib.getExe config.programs.niri.package} --session";
|
||||
};
|
||||
systemd.user.services.swaync.Install.WantedBy = [ "niri.service" ];
|
||||
systemd.user.services.swaync.Unit.After = [ "niri.service" ];
|
||||
systemd.user.targets.tray.Unit.After = [ "niri.service" ];
|
||||
systemd.user.targets.xwayland.Unit.After = [ "niri.service" ];
|
||||
|
||||
# xwayland-satellite
|
||||
systemd.user.services.niri-xwayland-satellite = lib.mkIf cfg.enable {
|
||||
|
@ -92,8 +80,9 @@ in
|
|||
Before = [ "xwayland.target" "xdg-desktop-autostart.target" ];
|
||||
After = [ "niri.service" ];
|
||||
};
|
||||
Install.RequiredBy = [ "niri.service" ];
|
||||
Install.UpheldBy = [ "niri.service" ];
|
||||
Service.Slice = "session.slice";
|
||||
Service.Type = "notify";
|
||||
Service.ExecStart = "${lib.getExe pkgs.xwayland-satellite} ${xwayland-display}";
|
||||
};
|
||||
|
||||
|
@ -143,8 +132,6 @@ in
|
|||
{ command = [ (lib.getExe pkgs.swaybg) "-i" "${wallpaper}" "-m" "fill" ]; }
|
||||
# Waybar
|
||||
{ command = [ "systemctl" "--user" "start" "xdg-desktop-portal-gtk.service" "xdg-desktop-portal.service" ]; }
|
||||
# Export XWayland DISPLAY
|
||||
{ command = [ "sh" "-c" "systemctl --user set-environment DISPLAY=${xwayland-display} && systemctl --user start xwayland.target" ]; }
|
||||
];
|
||||
|
||||
layout = {
|
||||
|
|
|
@ -42,10 +42,6 @@ in
|
|||
default = "";
|
||||
};
|
||||
};
|
||||
config.systemd.user.services.waybar = lib.mkIf cfg.enable {
|
||||
Unit.BindsTo = [ "tray.target" ];
|
||||
Unit.After = [ "tray.target" ];
|
||||
};
|
||||
config.programs.waybar =
|
||||
let
|
||||
barWith = { showMedia ? true, showConnectivity ? true, extraSettings ? { }, ... }: lib.mkMerge ([{
|
||||
|
@ -260,7 +256,7 @@ in
|
|||
lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
systemd.target = "graphical-session.target";
|
||||
systemd.target = "tray.target";
|
||||
settings = cfg.makeBars barWith;
|
||||
style = ''
|
||||
* {
|
||||
|
|
|
@ -46,6 +46,10 @@
|
|||
tap = "enabled";
|
||||
};
|
||||
};
|
||||
programs.my-niri.enable = true;
|
||||
programs.niri.settings = {
|
||||
input.keyboard.xkb.options = "ctrl:swapcaps";
|
||||
};
|
||||
programs.my-waybar.extraSettings =
|
||||
let
|
||||
change-mode = pkgs.writeScript "change-mode" ''
|
||||
|
|
Loading…
Reference in a new issue