From a175620ca9083456202520fdd57a1067c6191327 Mon Sep 17 00:00:00 2001 From: NullBite Date: Sun, 11 Feb 2024 19:02:50 +0100 Subject: [PATCH] Add workaround for xdpg not opening links NixOS/nixpkgs#189851 --- home/sessions/hyprland.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/home/sessions/hyprland.nix b/home/sessions/hyprland.nix index ae2526e..496284e 100644 --- a/home/sessions/hyprland.nix +++ b/home/sessions/hyprland.nix @@ -9,6 +9,14 @@ let brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; polkit-agent = "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; + # https://github.com/flatpak/xdg-desktop-portal-gtk/issues/440#issuecomment-1900520919 + xdpg-workaround = pkgs.writeShellScript "xdg-desktop-portal-gtk-workaround" + '' + ${pkgs.coreutils}/bin/sleep 3 + ${pkgs.systemd}/bin/systemctl --user import-environment PATH + ${pkgs.systemd}/bin/systemctl --user restart xdg-desktop-portal.service + ''; + # Hyprland workspace configuration mainWorkspaces = builtins.genList (x: x+1) (9 ++ [0]); workspaceName = key: let @@ -67,6 +75,7 @@ in exec-once = [ notifydaemon polkit-agent + xdpg-workaround ]; # Source a file (multi-file configs)