From 835797f3a4a59459a316ae8d4ab91fa59faf61a4 Mon Sep 17 00:00:00 2001 From: polykernel <81340136+polykernel@users.noreply.github.com> Date: Sun, 20 Mar 2022 20:12:03 -0400 Subject: [PATCH] xsession.pointerCursor: escape special characters in the cursor path (#2805) - Escape special character in the cursor name and default cursor file name in the cursor path for the xsetroot command. --- modules/xcursor.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/xcursor.nix b/modules/xcursor.nix index 7c00a5cbc..a91f79ee5 100644 --- a/modules/xcursor.nix +++ b/modules/xcursor.nix @@ -36,6 +36,10 @@ let }; }; + cursorPath = "${cfg.package}/share/icons/${escapeShellArg cfg.name}/cursors/${ + escapeShellArg cfg.defaultCursor + }"; + in { meta.maintainers = [ maintainers.league ]; @@ -63,9 +67,7 @@ in { home.packages = [ cfg.package ]; xsession.initExtra = '' - ${pkgs.xorg.xsetroot}/bin/xsetroot -xcf ${cfg.package}/share/icons/${cfg.name}/cursors/${cfg.defaultCursor} ${ - toString cfg.size - } + ${pkgs.xorg.xsetroot}/bin/xsetroot -xcf ${cursorPath} ${toString cfg.size} ''; xresources.properties = {