hyprland: start portal backends on dbus activation
This commit is contained in:
@@ -149,6 +149,7 @@
|
|||||||
overrideAttrs = f: makeHyprlandLuaPackage (package.overrideAttrs f);
|
overrideAttrs = f: makeHyprlandLuaPackage (package.overrideAttrs f);
|
||||||
};
|
};
|
||||||
hyprlandPackage = makeHyprlandLuaPackage baseHyprlandPackage;
|
hyprlandPackage = makeHyprlandLuaPackage baseHyprlandPackage;
|
||||||
|
hyprlandPortalPackage = config.programs.hyprland.portalPackage;
|
||||||
hyprlandGapsEnabledString =
|
hyprlandGapsEnabledString =
|
||||||
if config.myModules.hyprland.gaps.enable
|
if config.myModules.hyprland.gaps.enable
|
||||||
then "1"
|
then "1"
|
||||||
@@ -505,6 +506,36 @@
|
|||||||
[Service]
|
[Service]
|
||||||
ExecStopPost=${cleanupStaleGraphicalSession}
|
ExecStopPost=${cleanupStaleGraphicalSession}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# File chooser requests from early-started Electron apps go through
|
||||||
|
# xdg-desktop-portal-gtk. The upstream portal backend units wait for
|
||||||
|
# graphical-session.target, which UWSM can reach well after Wayland
|
||||||
|
# and D-Bus are already usable. That makes D-Bus activation time out
|
||||||
|
# and can abort the requesting app.
|
||||||
|
xdg.configFile."systemd/user/xdg-desktop-portal-gtk.service".text = ''
|
||||||
|
[Unit]
|
||||||
|
Description=Portal service (GTK/GNOME implementation)
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=dbus
|
||||||
|
BusName=org.freedesktop.impl.portal.desktop.gtk
|
||||||
|
ExecStart=${pkgs.xdg-desktop-portal-gtk}/libexec/xdg-desktop-portal-gtk
|
||||||
|
'';
|
||||||
|
|
||||||
|
xdg.configFile."systemd/user/xdg-desktop-portal-hyprland.service".text = ''
|
||||||
|
[Unit]
|
||||||
|
Description=Portal service (Hyprland implementation)
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
ConditionEnvironment=WAYLAND_DISPLAY
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=dbus
|
||||||
|
BusName=org.freedesktop.impl.portal.desktop.hyprland
|
||||||
|
ExecStart=${hyprlandPortalPackage}/libexec/xdg-desktop-portal-hyprland
|
||||||
|
Restart=on-failure
|
||||||
|
Slice=session.slice
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user