2022-03-18 11:40:04 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Show commands being executed
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# Workarounds for common flatpak app issues
|
2022-03-18 12:41:42 +01:00
|
|
|
|
2022-04-21 14:02:43 +02:00
|
|
|
# Let's begin by checking remotes and installing what this touches…
|
|
|
|
#flatpak update --appstream
|
|
|
|
#flatpak install --assumeyes flathub org.briarproject.Briar im.riot.Riot com.nextcloud.desktopclient.nextcloud
|
|
|
|
|
2022-03-18 12:41:42 +01:00
|
|
|
# Allowing system themes in flatpaks
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override --filesystem=/usr/local/share/themes:ro --filesystem=/usr/share/themes:ro --filesystem=~/.themes:ro $@
|
|
|
|
flatpak override --filesystem=/usr/local/share/icons:ro --filesystem=/usr/share/icons:ro --filesystem=~/.icons:ro $@
|
|
|
|
flatpak override --filesystem=/usr/local/share/cursors:ro --filesystem=/usr/share/cursors:ro --filesystem=~/.cursors:ro $@
|
2022-03-18 12:41:42 +01:00
|
|
|
|
2022-04-18 14:01:11 +02:00
|
|
|
# In case debugging flatpaks is subject to the other restrictions and running
|
2022-04-18 16:11:37 +02:00
|
|
|
# gdb there is made easier by access to the file. By same logic, they need
|
|
|
|
# to be able to write to the log.
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override --filesystem=~/.gdbinit:ro --filesystem=~/gdb.txt $@
|
2022-04-18 14:01:11 +02:00
|
|
|
|
2023-02-25 10:05:40 +01:00
|
|
|
# Allow read-only access to ~/.curlrc in case a flatpak is utilising curl
|
|
|
|
# or libcurl starts reading it
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override --filesystem=~/.curlrc:ro $@
|
2023-02-25 10:05:40 +01:00
|
|
|
|
2022-03-18 11:58:13 +01:00
|
|
|
# Backticks and a lot of common characters in all Flatpaks
|
|
|
|
# https://github.com/flatpak/flatpak/issues/2031
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override --talk-name=org.fcitx.Fcitx --talk-name=org.freedesktop.portal.Fcitx $@
|
2022-03-18 11:58:13 +01:00
|
|
|
|
2022-03-18 11:40:04 +01:00
|
|
|
# https://github.com/flathub/org.briarproject.Briar/issues/5
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override org.briarproject.Briar --filesystem=~/.briar:create $@
|
|
|
|
flatpak override org.briarproject.Briar --filesystem=~/.java/.userPrefs/org/briarproject/briar:create $@
|
2022-03-18 11:40:04 +01:00
|
|
|
|
2022-03-25 08:27:03 +01:00
|
|
|
# This is an ugly hack so I don't have to maintain the config.json separately
|
|
|
|
# in every profile and can just symlink it
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override im.riot.Riot --filesystem=~/src/gitea.blesmrt.net/Mikaela/gist/matrix/Element:ro $@
|
2022-03-25 08:27:03 +01:00
|
|
|
|
2022-04-13 11:38:10 +02:00
|
|
|
# email signature
|
2022-04-21 14:02:43 +02:00
|
|
|
#flatpak override org.claws_mail.Claws-Mail --filesystem=~/.signature:create
|
2022-04-13 11:38:10 +02:00
|
|
|
|
2022-04-21 13:30:59 +02:00
|
|
|
# Directory I have normal Nextcloud in
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override com.nextcloud.desktopclient.nextcloud --filesystem=~/Nextcloud:create $@
|
2022-04-21 13:30:59 +02:00
|
|
|
|
2022-05-23 18:49:24 +02:00
|
|
|
# PCSX2 files
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override net.pcsx2.PCSX2 --filesystem=~/.config/PCSX2:create $@
|
|
|
|
flatpak override net.pcsx2.PCSX2 --filesystem=~/PS2:create $@
|
2022-05-23 18:49:24 +02:00
|
|
|
|
2023-01-15 19:49:58 +01:00
|
|
|
# A directory I can share between native and flatpak Steam so both have the
|
|
|
|
# same games without having to navigate weird paths.
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override com.valvesoftware.Steam --filesystem=~/SteamLibrary:create $@
|
|
|
|
flatpak override net.lutris.Lutris --filesystem=~/SteamLibrary:create $@
|
2023-01-15 19:49:58 +01:00
|
|
|
|
2023-05-12 20:15:53 +02:00
|
|
|
# For use with system syncthing, note its flags
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override me.kozec.syncthingtk --filesystem=~/.config/syncthing:create $@
|
2023-05-12 20:15:53 +02:00
|
|
|
|
2022-03-18 12:45:33 +01:00
|
|
|
# Just for verbosity. The results can be seen in /var/lib/flatpak/overrides/global …
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override --show $@
|
2022-03-18 12:45:33 +01:00
|
|
|
# …and /var/lib/flatpak/overrides/org.briarproject.Briar
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override --show org.briarproject.Briar $@
|
2022-03-25 08:27:03 +01:00
|
|
|
# do I need to list those?
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override --show im.riot.Riot $@
|
2022-04-21 14:02:43 +02:00
|
|
|
#flatpak override --show org.claws_mail.Claws-Mail
|
2023-09-09 11:12:12 +02:00
|
|
|
flatpak override --show com.nextcloud.desktopclient.nextcloud $@
|
|
|
|
flatpak override --show net.pcsx2.PCSX2 $@
|
|
|
|
flatpak override --show com.valvesoftware.Steam $@
|
|
|
|
flatpak override --show net.lutris.Lutris $@
|
|
|
|
flatpak override --show me.kozec.syncthingtk $@
|
2022-03-18 11:41:35 +01:00
|
|
|
|
2022-03-18 11:40:04 +01:00
|
|
|
# Hide commands being executed again
|
|
|
|
set +x
|