From c5afea7251ed80f25fdedd6c82886a60366d1ae0 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Fri, 16 Feb 2024 17:22:24 -0500 Subject: [PATCH] fix(rars): make it tile on launch --- common/pkgs/rars-flatlaf/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/common/pkgs/rars-flatlaf/default.nix b/common/pkgs/rars-flatlaf/default.nix index d4380464..a3fd3b17 100644 --- a/common/pkgs/rars-flatlaf/default.nix +++ b/common/pkgs/rars-flatlaf/default.nix @@ -1,4 +1,6 @@ { + config, + writeShellApplication, stdenvNoCC, jre, fetchFromGitHub, @@ -19,10 +21,17 @@ stdenvNoCC.mkDerivation rec { fetchSubmodules = true; }; - desktopItem = makeDesktopItem { + desktopItem = let + hyprland = config.home-manager.users.${config.vars.mainUser}.wayland.windowManager.hyprland.finalPackage; + execScript = writeShellApplication { + name = "execScript"; + runtimeInputs = [hyprland]; + text = "(sleep 1; hyprctl dispatch togglefloating) & ${name}"; + }; + in makeDesktopItem { name = "RARS"; desktopName = "RARS"; - exec = name; + exec = "${execScript}/bin/execScript"; icon = name; };