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
2023-09-09 11:20:32 +02:00
# Reserved directories that cannot be shared
# to flatpaks include at least: /usr
2022-03-18 12:41:42 +01:00
2023-10-09 15:16:52 +02:00
# Overrides for all apps improving Quality of Life
# - debugging with gdb
# - curl configuration following
# - text editor configuration
# - user-specific fonts
2023-10-09 16:04:00 +02:00
flatpak override --filesystem= ~/.gdbinit:ro --filesystem= ~/gdb.txt:rw --filesystem= ~/.curlrc:ro --filesystem= ~/.editorconfig:ro --filesystem= ~/.local/share/fonts:ro $@
2023-10-09 14:18:29 +02:00
# Public git repositories I access or symlink much.
2023-10-09 15:30:35 +02:00
# Must be rw for access by text editors, otherwise they are ro or I will repeat myself
flatpak override --filesystem= ~/.shell-things:rw --filesystem= ~/src/gitea.blesmrt.net/Mikaela/shell-things:rw --filesystem= ~/src/gitea.blesmrt.net/Mikaela/gist:rw --filesystem= ~/src/gitea.blesmrt.net/Mikaela/scripts:rw --filesystem= ~/src/github.com/Mikaela/mikaela.github.io:rw $@
2023-10-09 14:18:29 +02: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
2023-10-09 16:02:21 +02:00
# Additional SDKs (`flatpak search org.freedesktop.Sdk.Extension`)
flatpak override --env= FLATPAK_ENABLE_SDK_EXT = texlive,dotnet,golang $@
2023-10-09 15:30:35 +02:00
# I don't have other nvim on SteamOS
flatpak override io.neovim.nvim --filesystem= host --filesystem= host-os --filesystem= host-etc $@
2022-03-18 11:40:04 +01:00
# https://github.com/flathub/org.briarproject.Briar/issues/5
2023-10-09 14:11:32 +02:00
flatpak override org.briarproject.Briar --filesystem= ~/.briar:create --filesystem= ~/.java/.userPrefs/org/briarproject/briar:create $@
2022-03-18 11:40:04 +01: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-10-09 14:11:32 +02:00
flatpak override net.pcsx2.PCSX2 --filesystem= ~/.config/PCSX2:create --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
2023-10-08 15:58:55 +02:00
# https://github.com/flathub/com.microsoft.Edge?tab=readme-ov-file#game-controllers-not-working
flatpak override --filesystem= /run/udev:ro com.microsoft.Edge $@
2023-10-12 10:13:12 +02:00
# Mosh starts by opening an SSH connection and thus it needs to at least read my SSH config. Seeing new keys probably needs rw to known_hosts and as I use sockets, they may need rw. Then there is my config.d being in a private git repo...
flatpak override --filesystem= ~/.ssh/config:ro --filesystem= ~/.ssh/config.d:ro --filesystem= ~/.ssh/known_hosts:rw --filesystem= ~/.ssh/sockets:rw --filesystem= ~/src/gitea.blesmrt.net/Mikaela/privgist/ssh/config.d:ro org.mosh.mosh $@
2023-11-17 11:51:53 +01:00
# Apparently Element needs this talk for encrypted search
# https://github.com/flathub/im.riot.Riot/issues/303#issuecomment-1816055123
flatpak override im.riot.Riot --talk-name= org.freedesktop.secrets $@
2024-01-12 10:06:12 +01:00
# DeltaChat wayland support (may break X11?)
flatpak override chat.delta.desktop --socket= wayland --socket= fallback-x11 $@
2023-10-09 15:11:53 +02:00
# Display the overrides
if [ -d /var/lib/flatpak/overrides/ ] ; then
tail -n +1 /var/lib/flatpak/overrides/*
fi
if [ -d $HOME /.local/share/flatpak/overrides/ ] ; then
tail -n +1 $HOME /.local/share/flatpak/overrides/*
fi
2022-03-18 11:41:35 +01:00
2022-03-18 11:40:04 +01:00
# Hide commands being executed again
set +x