aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/PortalHyprland.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts/PortalHyprland.sh')
-rwxr-xr-xconfig/hypr/scripts/PortalHyprland.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/hypr/scripts/PortalHyprland.sh b/config/hypr/scripts/PortalHyprland.sh
index 243ee2e8..3d3dc410 100755
--- a/config/hypr/scripts/PortalHyprland.sh
+++ b/config/hypr/scripts/PortalHyprland.sh
@@ -8,6 +8,19 @@
# For manually starting xdg-desktop-portal-hyprland
set -euo pipefail
+is_ubuntu_family() {
+ if [[ ! -r /etc/os-release ]]; then
+ return 1
+ fi
+
+ # shellcheck disable=SC1091
+ . /etc/os-release
+ [[ "${ID:-}" == "ubuntu" \
+ || "${ID:-}" == "linuxmint" \
+ || "${ID:-}" == "zorin" \
+ || "${ID:-}" == "rhino" \
+ || "${ID_LIKE:-}" == *ubuntu* ]]
+}
kill_quietly() {
killall -q "$1" 2>/dev/null || true
@@ -25,11 +38,15 @@ start_portal_binary() {
echo "Warning: no $description binary found (checked: $*)" >&2
return 1
}
+if ! is_ubuntu_family; then
+ exit 0
+fi
sleep 1
kill_quietly xdg-desktop-portal-hyprland
kill_quietly xdg-desktop-portal-wlr
kill_quietly xdg-desktop-portal-gnome
+kill_quietly xdg-desktop-portal-gtk
kill_quietly xdg-desktop-portal
sleep 1
@@ -39,6 +56,10 @@ start_portal_binary "xdg-desktop-portal-hyprland" \
sleep 2
+start_portal_binary "xdg-desktop-portal-gtk" \
+ /usr/lib/xdg-desktop-portal-gtk \
+ /usr/libexec/xdg-desktop-portal-gtk
+
start_portal_binary "xdg-desktop-portal" \
/usr/lib/xdg-desktop-portal \
/usr/libexec/xdg-desktop-portal
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage