hackjutsu / Lepton

💻 Democratizing Snippet Management (macOS/Win/Linux)
https://hackjutsu.com/Lepton
MIT License
10.13k stars 475 forks source link

.leptonrc file not recognized #458

Closed Grumium closed 4 years ago

Grumium commented 4 years ago

Environment info

Description of the problem:

.leptonrc file is not recognized. chmod +rx was applied to the file

Log:

----- Lepton v1.9.1 linux-----

info: [conf] Looking for .leptonrc at /home/user/snap/lepton/x1/.leptonrc info: [conf] The resolved configuration is ... info: "theme": "light" info: "autoUpdate": false info: "userPanel": {"hideProfilePhoto":false} info: "logger": {"level":"debug"} [...]

Content of /home/user/snap/lepton/x1/.leptonrc :

{
    "theme": "dark",
    "autoUpdate": true,
    "snippet": {
        "expanded": true,
        "newSnippetPrivate": false,
        "sorting": "updated_at",
        "sortingReverse": true
    },
    "editor" : {
        "tabSize": 4,
        "validateFilename": true
    },
    "userPanel": {
        "hideProfilePhoto": false
    },
    "logger": {
        "level": "debug"
    },
    "proxy": {
        "enable": false,
        "address": "socks://localhost:1080"
    },
    "notifications": {
        "success": true,
        "failure": true
    },
    "shortcuts": {
        "keyShortcutForSearch": "CMD+F",
        "keyNewGist": "CommandOrControl+N",
        "keyEditGist": "CommandOrControl+E",
        "keySubmitGist": "CommandOrControl+S",
        "keyImmersiveMode": "CommandOrControl+I",
        "keyAboutPage": "CommandOrControl+,",
        "keyDashboard": "CommandOrControl+D",
        "keyEditorExit": "CommandOrControl+Escape",
        "keySyncGists": "CommandOrControl+R"
    },
    "enterprise": {
        "enable": false,
        "host": "github_enterprise_host",
        "token": "token_with_gist_enabled",
        "avatarUrl": "optional_avatar_url"
    }
}
itsgg commented 4 years ago

Try starting lepton from terminal, it will display the expected .leptonrc file. If the file location is correct, check the syntax of the configration

anvil:  ~ 
→ lepton 
info: [conf] Looking for .leptonrc at /home/gg/snap/lepton/10/.leptonrc
info: 
Grumium commented 4 years ago

Try starting lepton from terminal, it will display the expected .leptonrc file. If the file location is correct, check the syntax of the configration

Okay, found the culprit. The error was that my user did not own the file. sudo chown user /home/user/snap/lepton/x1/.leptonrc