nixos-configs/overlays/xdg-desktop-portal-kde/default.nix

104 lines
5.5 KiB
Nix
Raw Normal View History

(final: prev: {
kdePackages = prev.kdePackages.overrideScope (kfinal: kprev: {
xdg-desktop-portal-kde = kprev.xdg-desktop-portal-kde.overrideAttrs (o: {
patches =
(o.patches or [])
++ [
# https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/issues/15#note_906047
(builtins.toFile
"rdp.patch"
chore: update flake.lock Flake Inputs: • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/c103496' (2024-08-08) → 'github:matt1432/discord-nightly-overlay/86c671c' (2024-08-10) • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=b9b60ab' (2024-08-09) → 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=01b8cdc' (2024-08-10) • Updated input 'headscale': 'github:juanfont/headscale/948d53f' (2024-08-04) → 'github:juanfont/headscale/fcd1183' (2024-08-11) • Updated input 'home-manager': 'github:nix-community/home-manager/b3d5ea6' (2024-08-07) → 'github:nix-community/home-manager/086f619' (2024-08-11) • Updated input 'hyprgrass': 'github:horriblename/hyprgrass/5c93341' (2024-07-28) → 'github:horriblename/hyprgrass/0bb3b82' (2024-08-11) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/fc3d12d' (2024-08-07) → 'github:Jovian-Experiments/Jovian-NixOS/9117806' (2024-08-11) • Updated input 'nix-gaming': 'github:fufexan/nix-gaming/88aa6c5' (2024-08-04) → 'github:fufexan/nix-gaming/e8ef080' (2024-08-11) • Updated input 'nix-gaming/umu': 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=babc721&submodules=1' (2024-08-03) → 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=74656e9&submodules=1' (2024-08-10) • Updated input 'nix-index-db': 'github:Mic92/nix-index-database/97ca0a0' (2024-08-04) → 'github:Mic92/nix-index-database/ec78079' (2024-08-11) • Updated input 'nixd': 'github:nix-community/nixd/af1255e' (2024-08-06) → 'github:nix-community/nixd/c9d8970' (2024-08-11) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/cb9a96f' (2024-08-04) → 'github:NixOS/nixpkgs/5e0ca22' (2024-08-09) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/e28b410' (2024-08-08) → 'github:nix-community/nixpkgs-wayland/9f566ee' (2024-08-11) • Updated input 'pcsd': 'github:matt1432/nixos-pcsd/f7870c6' (2024-08-06) → 'github:matt1432/nixos-pcsd/7e50677' (2024-08-10) • Updated input 'pr-tracker': 'github:matt1432/pr-tracker/8e93c30' (2024-07-30) → 'github:matt1432/pr-tracker/616ee60' (2024-08-11) • Updated input 'pr-tracker/rust-overlay': 'github:oxalica/rust-overlay/a6fbda5' (2024-07-29) → 'github:oxalica/rust-overlay/615cfd8' (2024-08-10) Docker Images: • codeberg.org/forgejo/forgejo 8.0.1: sha256:f3ec5c63038cf2ce31a71e50e48b24c334ba0a5233808d1a5a60d45203f84f02 → sha256:221639a84fae9d9ec5236a50f4980c3cd5332851949f6e989f5f44cc411cf4fa • postgres 14: sha256:b4d7cd7bd1bc275e8862271531e2180b6c3e9bd92f09e2f53f6c87836183235a → sha256:328bd8cf4b64b81567def9de01a893fb819ab2a94a714a24c9f304995b5645c1 • rssbridge/rss-bridge latest: sha256:2ed2ac1c2308f929947b363d0866aa48543600368f6df4f29a004aa0869d9f22 → sha256:4a7ccb015ded6bcde686a6d6340b5dbad2ec296a6653b42ec91998bb66259272 • ghcr.io/gethomepage/homepage latest: sha256:e23fcd332ecf927fe5c0149142040236b17686916004566c149eef06eb6f8d75 → sha256:e5b2616d17db8961a53c0b7d389d812d31c265d35696d475732f53278c9276f7 • quay.io/vaultwarden/server latest: sha256:4e28425bad4bd13568e1779f682ff7e441eca2ecd079bd77cfcba6e4eaf1b999 → sha256:71668d20d4208d70919cf8cb3caf3071d41ed4b7d95afe71125ccad8408b040d • ghcr.io/wg-easy/wg-easy latest: sha256:4c2c591498aa910ce86a90fa00c4714ffd78dd7556b1f488f226471b97346bc6 → sha256:f6c2587da3fdc9d5927743fb4a92cff42d690b182396ffd0cdad034becb41053 • ghcr.io/linuxserver/radarr latest: sha256:9d6f0548fd805edb30108fdd06d0fc5a4436c9bd708b57bd4119d7aefa815fe4 → sha256:71e29caebf16da4701fc7a6c04d5f34c6b01753549900edf4ecfa585263ea1d4 • ghcr.io/linuxserver/sonarr latest: sha256:f0c1fe322671a5c4a302e27ee7aac622fb3c7ba6da231f6c378fe07ab900d6eb → sha256:bffa87787eacff9023df4400f521c159566d14b5a280caec8b54196071e6038e
2024-08-11 19:47:45 -04:00
(
if o.version == "6.1.3"
# cpp
then ''
diff --git a/src/remotedesktop.cpp b/src/remotedesktop.cpp
index 99ce57f..af64eff 100644
--- a/src/remotedesktop.cpp
+++ b/src/remotedesktop.cpp
@@ -19,6 +19,8 @@
#include <KNotification>
#include <QGuiApplication>
#include <QRegion>
+#include <KSharedConfig>
+#include <KConfigGroup>
#include <QScreen>
chore: update flake.lock Flake Inputs: • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/c103496' (2024-08-08) → 'github:matt1432/discord-nightly-overlay/86c671c' (2024-08-10) • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=b9b60ab' (2024-08-09) → 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=01b8cdc' (2024-08-10) • Updated input 'headscale': 'github:juanfont/headscale/948d53f' (2024-08-04) → 'github:juanfont/headscale/fcd1183' (2024-08-11) • Updated input 'home-manager': 'github:nix-community/home-manager/b3d5ea6' (2024-08-07) → 'github:nix-community/home-manager/086f619' (2024-08-11) • Updated input 'hyprgrass': 'github:horriblename/hyprgrass/5c93341' (2024-07-28) → 'github:horriblename/hyprgrass/0bb3b82' (2024-08-11) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/fc3d12d' (2024-08-07) → 'github:Jovian-Experiments/Jovian-NixOS/9117806' (2024-08-11) • Updated input 'nix-gaming': 'github:fufexan/nix-gaming/88aa6c5' (2024-08-04) → 'github:fufexan/nix-gaming/e8ef080' (2024-08-11) • Updated input 'nix-gaming/umu': 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=babc721&submodules=1' (2024-08-03) → 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=74656e9&submodules=1' (2024-08-10) • Updated input 'nix-index-db': 'github:Mic92/nix-index-database/97ca0a0' (2024-08-04) → 'github:Mic92/nix-index-database/ec78079' (2024-08-11) • Updated input 'nixd': 'github:nix-community/nixd/af1255e' (2024-08-06) → 'github:nix-community/nixd/c9d8970' (2024-08-11) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/cb9a96f' (2024-08-04) → 'github:NixOS/nixpkgs/5e0ca22' (2024-08-09) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/e28b410' (2024-08-08) → 'github:nix-community/nixpkgs-wayland/9f566ee' (2024-08-11) • Updated input 'pcsd': 'github:matt1432/nixos-pcsd/f7870c6' (2024-08-06) → 'github:matt1432/nixos-pcsd/7e50677' (2024-08-10) • Updated input 'pr-tracker': 'github:matt1432/pr-tracker/8e93c30' (2024-07-30) → 'github:matt1432/pr-tracker/616ee60' (2024-08-11) • Updated input 'pr-tracker/rust-overlay': 'github:oxalica/rust-overlay/a6fbda5' (2024-07-29) → 'github:oxalica/rust-overlay/615cfd8' (2024-08-10) Docker Images: • codeberg.org/forgejo/forgejo 8.0.1: sha256:f3ec5c63038cf2ce31a71e50e48b24c334ba0a5233808d1a5a60d45203f84f02 → sha256:221639a84fae9d9ec5236a50f4980c3cd5332851949f6e989f5f44cc411cf4fa • postgres 14: sha256:b4d7cd7bd1bc275e8862271531e2180b6c3e9bd92f09e2f53f6c87836183235a → sha256:328bd8cf4b64b81567def9de01a893fb819ab2a94a714a24c9f304995b5645c1 • rssbridge/rss-bridge latest: sha256:2ed2ac1c2308f929947b363d0866aa48543600368f6df4f29a004aa0869d9f22 → sha256:4a7ccb015ded6bcde686a6d6340b5dbad2ec296a6653b42ec91998bb66259272 • ghcr.io/gethomepage/homepage latest: sha256:e23fcd332ecf927fe5c0149142040236b17686916004566c149eef06eb6f8d75 → sha256:e5b2616d17db8961a53c0b7d389d812d31c265d35696d475732f53278c9276f7 • quay.io/vaultwarden/server latest: sha256:4e28425bad4bd13568e1779f682ff7e441eca2ecd079bd77cfcba6e4eaf1b999 → sha256:71668d20d4208d70919cf8cb3caf3071d41ed4b7d95afe71125ccad8408b040d • ghcr.io/wg-easy/wg-easy latest: sha256:4c2c591498aa910ce86a90fa00c4714ffd78dd7556b1f488f226471b97346bc6 → sha256:f6c2587da3fdc9d5927743fb4a92cff42d690b182396ffd0cdad034becb41053 • ghcr.io/linuxserver/radarr latest: sha256:9d6f0548fd805edb30108fdd06d0fc5a4436c9bd708b57bd4119d7aefa815fe4 → sha256:71e29caebf16da4701fc7a6c04d5f34c6b01753549900edf4ecfa585263ea1d4 • ghcr.io/linuxserver/sonarr latest: sha256:f0c1fe322671a5c4a302e27ee7aac622fb3c7ba6da231f6c378fe07ab900d6eb → sha256:bffa87787eacff9023df4400f521c159566d14b5a280caec8b54196071e6038e
2024-08-11 19:47:45 -04:00
RemoteDesktopPortal::RemoteDesktopPortal(QObject *parent)
@@ -152,14 +154,19 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle,
notification->setIconName(QStringLiteral("krfb"));
notification->sendEvent();
} else {
- QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(
- new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled()));
- Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);
- Request::makeClosableDialogRequest(handle, remoteDesktopDialog.get());
- connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject);
-
- if (!remoteDesktopDialog->exec()) {
- return 1;
+ auto cfg = KSharedConfig::openConfig(QStringLiteral("plasmaremotedesktoprc"));
+ const auto unattendedAccess = cfg->group("Sharing").readEntry("Unattended", false);
+ if (!unattendedAccess)
+ {
+ QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(
+ new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled()));
+ Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);
+ Request::makeClosableDialogRequest(handle, remoteDesktopDialog.get());
+ connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject);
+
+ if (!remoteDesktopDialog->exec()) {
+ return 1;
+ }
}
}
chore: update flake.lock Flake Inputs: • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/c103496' (2024-08-08) → 'github:matt1432/discord-nightly-overlay/86c671c' (2024-08-10) • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=b9b60ab' (2024-08-09) → 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=01b8cdc' (2024-08-10) • Updated input 'headscale': 'github:juanfont/headscale/948d53f' (2024-08-04) → 'github:juanfont/headscale/fcd1183' (2024-08-11) • Updated input 'home-manager': 'github:nix-community/home-manager/b3d5ea6' (2024-08-07) → 'github:nix-community/home-manager/086f619' (2024-08-11) • Updated input 'hyprgrass': 'github:horriblename/hyprgrass/5c93341' (2024-07-28) → 'github:horriblename/hyprgrass/0bb3b82' (2024-08-11) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/fc3d12d' (2024-08-07) → 'github:Jovian-Experiments/Jovian-NixOS/9117806' (2024-08-11) • Updated input 'nix-gaming': 'github:fufexan/nix-gaming/88aa6c5' (2024-08-04) → 'github:fufexan/nix-gaming/e8ef080' (2024-08-11) • Updated input 'nix-gaming/umu': 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=babc721&submodules=1' (2024-08-03) → 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=74656e9&submodules=1' (2024-08-10) • Updated input 'nix-index-db': 'github:Mic92/nix-index-database/97ca0a0' (2024-08-04) → 'github:Mic92/nix-index-database/ec78079' (2024-08-11) • Updated input 'nixd': 'github:nix-community/nixd/af1255e' (2024-08-06) → 'github:nix-community/nixd/c9d8970' (2024-08-11) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/cb9a96f' (2024-08-04) → 'github:NixOS/nixpkgs/5e0ca22' (2024-08-09) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/e28b410' (2024-08-08) → 'github:nix-community/nixpkgs-wayland/9f566ee' (2024-08-11) • Updated input 'pcsd': 'github:matt1432/nixos-pcsd/f7870c6' (2024-08-06) → 'github:matt1432/nixos-pcsd/7e50677' (2024-08-10) • Updated input 'pr-tracker': 'github:matt1432/pr-tracker/8e93c30' (2024-07-30) → 'github:matt1432/pr-tracker/616ee60' (2024-08-11) • Updated input 'pr-tracker/rust-overlay': 'github:oxalica/rust-overlay/a6fbda5' (2024-07-29) → 'github:oxalica/rust-overlay/615cfd8' (2024-08-10) Docker Images: • codeberg.org/forgejo/forgejo 8.0.1: sha256:f3ec5c63038cf2ce31a71e50e48b24c334ba0a5233808d1a5a60d45203f84f02 → sha256:221639a84fae9d9ec5236a50f4980c3cd5332851949f6e989f5f44cc411cf4fa • postgres 14: sha256:b4d7cd7bd1bc275e8862271531e2180b6c3e9bd92f09e2f53f6c87836183235a → sha256:328bd8cf4b64b81567def9de01a893fb819ab2a94a714a24c9f304995b5645c1 • rssbridge/rss-bridge latest: sha256:2ed2ac1c2308f929947b363d0866aa48543600368f6df4f29a004aa0869d9f22 → sha256:4a7ccb015ded6bcde686a6d6340b5dbad2ec296a6653b42ec91998bb66259272 • ghcr.io/gethomepage/homepage latest: sha256:e23fcd332ecf927fe5c0149142040236b17686916004566c149eef06eb6f8d75 → sha256:e5b2616d17db8961a53c0b7d389d812d31c265d35696d475732f53278c9276f7 • quay.io/vaultwarden/server latest: sha256:4e28425bad4bd13568e1779f682ff7e441eca2ecd079bd77cfcba6e4eaf1b999 → sha256:71668d20d4208d70919cf8cb3caf3071d41ed4b7d95afe71125ccad8408b040d • ghcr.io/wg-easy/wg-easy latest: sha256:4c2c591498aa910ce86a90fa00c4714ffd78dd7556b1f488f226471b97346bc6 → sha256:f6c2587da3fdc9d5927743fb4a92cff42d690b182396ffd0cdad034becb41053 • ghcr.io/linuxserver/radarr latest: sha256:9d6f0548fd805edb30108fdd06d0fc5a4436c9bd708b57bd4119d7aefa815fe4 → sha256:71e29caebf16da4701fc7a6c04d5f34c6b01753549900edf4ecfa585263ea1d4 • ghcr.io/linuxserver/sonarr latest: sha256:f0c1fe322671a5c4a302e27ee7aac622fb3c7ba6da231f6c378fe07ab900d6eb → sha256:bffa87787eacff9023df4400f521c159566d14b5a280caec8b54196071e6038e
2024-08-11 19:47:45 -04:00
''
# cpp
else ''
diff --git a/src/remotedesktop.cpp b/src/remotedesktop.cpp
index 02a32a7..6b9b687 100644
--- a/src/remotedesktop.cpp
+++ b/src/remotedesktop.cpp
@@ -22,6 +22,8 @@
#include <QDBusReply>
#include <QGuiApplication>
#include <QRegion>
+#include <KSharedConfig>
+#include <KConfigGroup>
#include <QScreen>
using namespace Qt::StringLiterals;
@@ -178,14 +180,19 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle,
notification->setIconName(QStringLiteral("krfb"));
notification->sendEvent();
} else {
- QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(
- new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->persistMode()));
- Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);
- Request::makeClosableDialogRequest(handle, remoteDesktopDialog.get());
- connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject);
-
- if (!remoteDesktopDialog->exec()) {
- return 1;
+ auto cfg = KSharedConfig::openConfig(QStringLiteral("plasmaremotedesktoprc"));
+ const auto unattendedAccess = cfg->group("Sharing").readEntry("Unattended", false);
+ if (!unattendedAccess)
+ {
+ QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(
+ new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->persistMode()));
+ Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);
+ Request::makeClosableDialogRequest(handle, remoteDesktopDialog.get());
+ connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject);
+
+ if (!remoteDesktopDialog->exec()) {
+ return 1;
+ }
}
}
''
))
];
});
});
})