blob: 6412bb444ed433bdce767ea7732ec2f7eaea76d7 (
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
|
#!/usr/bin/env dash
# Read-only host config bindings for flatpaks that should pick up our
# chezmoi-managed ~/.config/<app>/ rather than maintaining a separate
# in-sandbox copy. Idempotent; flatpak override merges entries.
#
# script hash: {{ output "sh" "-c" (printf "sha256sum %q/run_onchange_after_deploy-flatpak-overrides.sh.tmpl 2>/dev/null || true" .chezmoi.sourceDir) }}
set -eu
command -v flatpak >/dev/null 2>&1 || exit 0
apply() {
app=$1
shift
flatpak info --user "$app" >/dev/null 2>&1 || return 0
flatpak override --user "$@" "$app"
}
apply org.pwmt.zathura --filesystem=xdg-config/zathura:ro
apply io.mpv.Mpv --filesystem=xdg-config/mpv:ro
# LibreWolf uses the camera portal. Revoke its old broad device override while
# retaining direct rendering access from the application manifest.
apply io.gitlab.librewolf-community --nodevice=all --device=dri
# Ungoogled Chromium needs /dev/hidraw* for WebHID (e.g. usevia.app
# configuring ZSA keyboards). --device=all is the only knob flatpak
# offers; the host udev rule (etc/udev/rules.d/50-zsa.rules) restricts
# which hidraw nodes the user can actually open.
apply io.github.ungoogled_software.ungoogled_chromium --device=all
|