diff --git a/src/core/PortalManager.cpp b/src/core/PortalManager.cpp index d091551..9111870 100644 --- a/src/core/PortalManager.cpp +++ b/src/core/PortalManager.cpp @@ -43,6 +43,7 @@ CPortalManager::CPortalManager() { m_sConfig.config->addConfigValue("general:toplevel_dynamic_bind", Hyprlang::INT{0L}); m_sConfig.config->addConfigValue("screencopy:max_fps", Hyprlang::INT{120L}); m_sConfig.config->addConfigValue("screencopy:allow_token_by_default", Hyprlang::INT{0L}); + m_sConfig.config->addConfigValue("screencopy:custom_picker_binary", Hyprlang::STRING{""}); m_sConfig.config->commence(); m_sConfig.config->parse(); diff --git a/src/shared/ScreencopyShared.cpp b/src/shared/ScreencopyShared.cpp index 22064a6..0db7b9c 100644 --- a/src/shared/ScreencopyShared.cpp +++ b/src/shared/ScreencopyShared.cpp @@ -47,12 +47,13 @@ SSelectionData promptForScreencopySelection() { static auto* const* PALLOWTOKENBYDEFAULT = (Hyprlang::INT* const*)g_pPortalManager->m_sConfig.config->getConfigValuePtr("screencopy:allow_token_by_default")->getDataStaticPtr(); + static auto* const* PCUSTOMPICKER = (Hyprlang::STRING* const)g_pPortalManager->m_sConfig.config->getConfigValuePtr("screencopy:custom_picker_binary")->getDataStaticPtr(); std::vector args; if (**PALLOWTOKENBYDEFAULT) args.emplace_back("--allow-token"); - CProcess proc("hyprland-share-picker", args); + CProcess proc(std::string{*PCUSTOMPICKER}.empty() ? "hyprland-share-picker" : *PCUSTOMPICKER, args); proc.addEnv("WAYLAND_DISPLAY", WAYLAND_DISPLAY ? WAYLAND_DISPLAY : ""); proc.addEnv("QT_QPA_PLATFORM", "wayland"); proc.addEnv("XCURSOR_SIZE", XCURSOR_SIZE ? XCURSOR_SIZE : "24");