I have a Snap configured on my system to install a specific app - Lunatask. It has itβs dark mode, but the context menu appears in light mode.
To force the application to dark mode, Iβve edited .desktop
file for the app.
.desktop
files for Snap are located in the/var/lib/snapd/desktop/applications/
directory.ls
this dir to find the file you need to edit. For me it was/var/lib/snapd/desktop/applications/lunatask_lunatask.desktop
. Copy this file to~/.local/share/applications
:
- Add
GTK_THEME=Adwaita-dark
to theExec
. Example:
[Desktop Entry]
X-SnapInstanceName=lunatask
Name=Lunatask
Exec=env GTK_THEME=Adwaita-dark BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/lunatask_lunatask.desktop /var/lib/snapd/snap/bin/lunatask %U
Terminal=false
Type=Application
Icon=/var/lib/snapd/snap/lunatask/51/meta/gui/icon.png
StartupWMClass=Lunatask
Comment=Encrypted to-do list, habit and mood tracker, journaling and notes app
Categories=Office;
- Open/restart the application.