blob: 653e9b5892e591bd218ae8d8d455f4a41c88f577 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/usr/bin/env bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# For manually starting xdg-desktop-portal-hyprland
set -euo pipefail
kill_quietly() {
killall -q "$1" 2>/dev/null || true
}
start_portal_binary() {
local description="$1"
shift
for candidate in "$@"; do
if [[ -x "$candidate" ]]; then
"$candidate" &
return 0
fi
done
echo "Warning: no $description binary found (checked: $*)" >&2
return 1
}
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
sleep 1
start_portal_binary "xdg-desktop-portal-hyprland" \
/usr/lib/xdg-desktop-portal-hyprland \
/usr/libexec/xdg-desktop-portal-hyprland
sleep 2
start_portal_binary "xdg-desktop-portal" \
/usr/lib/xdg-desktop-portal \
/usr/libexec/xdg-desktop-portal
|