Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profiles: anki: fix dark mode detection & misc changes #6581

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions etc/profile-a-l/anki.profile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ include anki.local
# Persistent global definitions
include globals.local

# Add the following to anki.local if you don't need media playing/recording
# (lua is needed by mpv):
# Add the following to anki.local if you don't need media playing/recording:
#ignore include allow-lua.inc
#machine-id
#nosound
Expand All @@ -17,6 +16,12 @@ noblacklist ${HOME}/.config/mpv
noblacklist ${HOME}/.local/share/Anki2
noblacklist ${HOME}/.mplayer

# sh and dbus-send are used by aqt/theme.py to query dark mode through
# org.freedesktop.portal.Desktop.
# Allow /bin/sh (blacklisted by disable-shell.inc)
include allow-bin-sh.inc

# Lua is required by mpv.
# Allow lua (blacklisted by disable-interpreters.inc)
include allow-lua.inc

Expand Down Expand Up @@ -57,15 +62,23 @@ novideo
protocol unix,inet,inet6
# QtWebengine needs chroot to set up its own sandbox
seccomp !chroot
seccomp.block-secondary

disable-mnt
private-bin anki,mplayer,mpv,python*
# env is required for python scripts on Gentoo Linux.
# anki uses mpv or mplayer for playing audio and uses lame to record audio.
# sh and dbus-send are used by aqt/theme.py to query dark mode through
# org.freedesktop.portal.Desktop.
private-bin anki,dbus-send,env,lame,lua*,mplayer,mpv,python*,sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is private-bin lua* actually needed?

mpv uses libluajit directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been lazy. I will get back soon.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been lazy. I will get back soon.

That's alright; it might be helpful to focus on one PR at a time.

I'd leave this and maybe 2 other PRs opened and close the rest if you don't
plan on working on them soon (and then they could gradually be reopened as the
open PRs are merged and as work is started on the closed ones).

This would also make reviews easier.

private-cache
private-dev
private-etc @tls-ca,@x11
private-tmp

dbus-user none
dbus-user filter
# org.freedesktop.portal.Desktop is queried for dark mode.
dbus-user.talk org.freedesktop.portal.Desktop
dbus-system none

deterministic-shutdown
#restrict-namespaces
Loading