mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-12-22 01:39:49 +01:00
parent
fd85ef3936
commit
0c6861f819
2 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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<std::string> 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");
|
||||
|
|
Loading…
Reference in a new issue