# Typora 2 (Typora V2): a native host per platform — Swift on macOS, C# on # Windows, Electron on Linux — sharing one editor. It also ships this same rule # inside each package as its own otty.toml (packaging/otty.toml in # its source: Typora.app/Contents/Resources/otty.toml, otty.toml next # to Typora.exe, /usr/share/otty/apps/typora.toml from the .deb). id = "typora" since = "2.0" name = "Typora" homepage = "https://v2.typora.io" description = "A minimal Markdown editor and reader." icon = "https://typora.io/img/icon_256x256.png" # The `typora` command: apps/macos/Typora/CLI/typora (installed from # Settings ▸ General), apps/windows/Typora/Cli/typora.cmd, and the Linux # package's executableName (apps/electron/electron-builder.yml). executables = ["typora"] [dotfiles] # All of Typora V2's user config sits in one folder, $HOME/.config/Typora, on # every platform — not V1's ~/Library/Application Support/abnerworks.Typora, # ~/Library/Preferences/abnerworks.Typora.plist or [appData]/Typora/conf; V2 # reads none of those. The three hosts each hard-code the home directory plus # ".config/Typora" and never consult $XDG_CONFIG_HOME, which is why these are # literal `~/.config` paths and not `[configHome]`: # Linux (Electron) apps/electron/src/main/handlers/config.ts:14 # join(homedir(), ".config", "Typora", "settings.toml"); # handlers/library.ts:23 and handlers/extensions.ts:17 use # the same CONFIG_DIR. # macOS (Swift) apps/macos/Typora/Handlers/ConfigCommands.swift:39-44 # homeDirectoryForCurrentUser + .config/Typora/settings.toml; # ExtensionStore.swift:55-57 (configRoot). The app is not # sandboxed (Typora/Typora.entitlements: # com.apple.security.app-sandbox = false), so this is the # real ~/.config, not a container. # Windows (C#) apps/windows/Typora/Handlers/ConfigCommands.cs:16-18 # SpecialFolder.UserProfile + .config\Typora\settings.toml; # LibraryCommands.cs:29-31, ExtensionCommands.cs:20-22. # # What is in that folder: # settings.toml every setting, including key bindings (`keyBindings.config`) # and the snippet trigger — packages/common/src/data/ # SettingsSchema.ts, written by SettingsToml.ts # Themes/ user themes (one folder each, theme.toml …) and user.css — # extensions.ts:21, ThemeCommands.swift:34-36, # ExtensionStore.cs:65 # Templates/ document templates — library.ts:24-29, # Snippets/ snippets ConfigCommands.swift:404-414, # Skills/ the AI's skills LibraryCommands.cs:17-20 paths = [ "~/.config/Typora/settings.toml", "~/.config/Typora/Themes/", "~/.config/Typora/Templates/", "~/.config/Typora/Snippets/", "~/.config/Typora/Skills/", ] # Deliberately not listed: # ~/.config/Typora/Extensions/ installed extension packages (store # downloads, language packs with ~20 MB # dictionaries); their enabled state, # consent and settings already travel in # settings.toml (`extensions.*`) # ~/.config/Typora/ExtensionData/ each extension's private storage and files # recent.json, drafts, the document journal, AI chats and API keys, file-sync # state — application state under [appData]/io.appmakes.Typora # (handlers/config.ts:17, ConfigCommands.swift:53-61, ConfigCommands.cs:20-22, # handlers/ai.ts:44, SyncCommands.swift:25-28) # license-v2.json — Electron's userData (license/service.ts:50), # ~/Library/Application Support/Typora (LicenseService.swift:15-17), # %APPDATA%\Typora (LicenseService.cs:13) # the WebView2 / Chromium profiles and logs — %LOCALAPPDATA%\Typora # (MainWindow.cs:685-687), Electron's userData on Linux # # No `exclude`: nothing above holds state, and Otty already skips .git/, # node_modules/, __pycache__/ and virtualenvs inside a synced directory. # No credential among the paths above. Folder-sync passwords and tokens and # AI keys go to the OS credential store or [appData]/io.appmakes.Typora # (packages/workbench/src/sync/runtime.ts `secret.*`, handlers/ai.ts:74-76), # and the licence lives outside ~/.config/Typora (see above). secret = [] # settings.toml is read once at launch and rewritten whole from memory on the # next change, so a rewrite under a running app is lost: side_effect stays at # its default, true. # settings.toml keys that name things on this machine only. Every key is # always written (SettingsToml.ts serializeSettingsToml) and dotted keys become # nested tables (writeNested), so these key paths always exist in the file. [[dotfiles.machine_lines]] file = "~/.config/Typora/settings.toml" # Local folder path -> its sync binding; the binding's credentials are in this # machine's credential store and its sync state under [appData] # (SettingsSchema.ts `files.folderSync`, sync/folderBindings.ts). The export # folder is a folder on this disk. Worth restoring on this device, wrong on # any other. match = { key_path = ["files.folderSync", "export.general.customFolder"] } scope = "backup" [[dotfiles.machine_lines]] file = "~/.config/Typora/settings.toml" # Where PicGo, PicList and pandoc are installed: the same on machines of one # kind (/Applications/PicGo.app, /opt/homebrew/bin/pandoc), not across them. match = { key_path = ["image.picgoAppPath", "image.piclistAppPath", "export.general.pandocPath"] } scope = "platform" # Which installed build this file describes. The macOS app's bundle id is # io.appmakes.typora (PRODUCT_BUNDLE_IDENTIFIER in apps/macos; the .dev # suffix is development builds only), the Windows host's executable is # Typora.exe (AssemblyName in apps/windows/Typora/Typora.csproj), and the # Linux .deb is the package `typora` — electron-builder names it after the # product, Typora, since the workspace package name is scoped # (@typemark/electron), and fpm lowercases it for dpkg. Windows and Linux keep # Typora 1.x's names, so there the version number decides. [version_from] macos = ["io.appmakes.typora"] windows = ["Typora.exe"] linux = ["typora"]