Change config dir, offer to migrate

Moment has different default directories and is controlled by
different environment variables. On first startup, Moment
detects Mirage directories and offers to copy them.
It doesn't make sense to migrate logins without migrating encryption
keys, so this is now included in migration. Themes are migrated as well.
Only offer migration is only if both config and data directory are able to be
migrated.
This commit is contained in:
Maze
2022-01-14 19:27:59 +00:00
parent 63a56d92fd
commit 2839f83dde
9 changed files with 268 additions and 29 deletions

View File

@@ -29,7 +29,7 @@ class General:
# Can be the name of a built-in theme (Mirage.qpl or Glass.qpl), or
# the name (including extension) of a file in the user theme folder, which
# is "$XDG_DATA_HOME/mirage/themes" if that environment variable is set,
# else "~/.local/share/mirage/themes".
# else "~/.local/share/moment/themes".
# For Flatpak, it is
# "~/.var/app/io.github.mirukana.mirage/data/mirage/themes".
theme: str = "Midnight.qpl"
@@ -204,7 +204,7 @@ class Chat:
auto_play_gif: bool = True
# When clicking on a file in the timeline, open it in an external
# program instead of displaying it using Mirage's interface.
# program instead of displaying it using Moment's interface.
# On Linux, the xdg-open command is called.
click_opens_externally: bool = False
@@ -234,7 +234,7 @@ class Keys:
# would need to be pressed.
#
# A list of default bindings can be found at:
# https://github.com/mirukana/mirage/blob/master/docs/KEYBINDINGS.md
# https://gitlab.com/mx-moment/moment/-/blob/main/docs/KEYBINDINGS.md
# Helper functions
@@ -280,7 +280,7 @@ class Keys:
qml_console = ["F1"]
# Start the Python backend debugger.
# Mirage must be connected to a terminal for this to work.
# Moment must be connected to a terminal for this to work.
python_debugger = ["Shift+F1"]
# Start the Python backend debugger in remote access mode.