#!/usr/bin/env nix-shell
#!nix-shell -i bash -p glib

# usage: sane-open-desktop org.my.desktop
# given some .desktop file (by name, not by path), ask the xdg-desktop-portal service to open it

exec gdbus call --session --timeout 10 \
  --dest org.freedesktop.portal.Desktop \
  --object-path /org/freedesktop/portal/desktop \
  --method org.freedesktop.portal.DynamicLauncher.Launch \
  "$1" {}

