Skip to content

Instantly share code, notes, and snippets.

@hackjutsu
Last active December 7, 2022 01:01
Show Gist options
  • Save hackjutsu/1ad7e4968eb64d881ec9dedd6c0f400b to your computer and use it in GitHub Desktop.
Save hackjutsu/1ad7e4968eb64d881ec9dedd6c0f400b to your computer and use it in GitHub Desktop.
[Template for .leptonrc] This is a template for Lepton's configuration file. Please place it on your home directory. #lepton
{
"theme": "light",
"autoUpdate": false,
"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"
}
}
@hackjutsu
Copy link
Author

hackjutsu commented Mar 11, 2018

Questions or issues

Please head to https://github.com/hackjutsu/Lepton for any issues or feature requests. We don't track conversation in this thread.

Home directory on Windows

The home directory varies on different Windows distributions, but most of the time you can begin with the following path.

C:\Users\<CurrentUserName>\.leptonrc

Home directory for Linux snap package

Experiment shows that app.getPath('home') used by Lepton to find .leptonrc doesn't point to ~, it points to

~/snap/lepton/current

@baybatu
Copy link

baybatu commented Aug 14, 2018

@promisepreston
Copy link

promisepreston commented Oct 22, 2019

Changing Lepton to Dark Theme and TabSize 2 for Linux Snap Package

N/B: Do not use administrative rights (sudo) for any command that you would run

  1. Create a file named .leptonrc on your Desktop

  2. Put the code below into it

{
    "theme": "dark",
    "snippet": {
        "expanded": true,
        "newSnippetPrivate": false,
        "sorting": "updated_at", 
        "sortingReverse": true
    },
    "editor" : {
        "tabSize": 2
    },
    "userPanel": {
        "hideProfilePhoto": false
    },
    "logger": {
        "level": "debug"
    },
    "proxy": {
        "enable": false,
        "address": "socks://localhost:1080"
    },
    "enterprise": {
        "enable": false,
        "host": "github_enterprise_host",
        "token": "token_with_gist_enabled",
        "avatarUrl": "optional_avatar_url"
    }
}
  1. Save and exit your text editor.

  2. Copy the .leptonrc file to ~/snap/lepton/9 directory by running the command below, which will create a symbolic link in the ~/snap/lepton/current directory.

    mv .leptonrc ~/snap/lepton/9/.leptonrc
  1. Restart your Lepton application.

That's all.

I hope this helps.

@unsalkorkmaz
Copy link

can you give an example to how put keyShortcutForSearch const?

@RyanOC
Copy link

RyanOC commented Dec 17, 2019

{
"theme": "dark",`
"snippet": {
"expanded": true,
"newSnippetPrivate": false,
"sorting": "updated_at",
"sortingReverse": true
},
"editor" : {
"tabSize": 2
},
"userPanel": {
"hideProfilePhoto": false
},
"logger": {
"level": "debug"
},
"proxy": {
"enable": false,
"address": "socks://localhost:1080"
},
"enterprise": {
"enable": false,
"host": "github_enterprise_host",
"token": "token_with_gist_enabled",
"avatarUrl": "optional_avatar_url"
}
}

The backtick on line 2 is inhibiting this theme from properly rendering.

@promisepreston
Copy link

{
"theme": "dark",`
"snippet": {
"expanded": true,
"newSnippetPrivate": false,
"sorting": "updated_at",
"sortingReverse": true
},
"editor" : {
"tabSize": 2
},
"userPanel": {
"hideProfilePhoto": false
},
"logger": {
"level": "debug"
},
"proxy": {
"enable": false,
"address": "socks://localhost:1080"
},
"enterprise": {
"enable": false,
"host": "github_enterprise_host",
"token": "token_with_gist_enabled",
"avatarUrl": "optional_avatar_url"
}
}

The back tick on line 2 is inhibiting this theme from properly rendering.

Thank you RyanOC, I just fixed it.

@Deadmau8772
Copy link

FIELDS SUB-FIELDS OPTIONS (first option is default)
theme light | dark select light or dark theme
snippet expanded true | false expansion for snippets
newSnippetPrivate false | true privacy for new snippets
sorting updated_at | created_at | description snippets order
sortingReverse true | false reverse the order above
editor tabSize number the tab size (numer of spaces)
userPanel hideProfilePhoto false | true hide the profile photo
logger level info | debug logging level
proxy enable false | true enable proxy
address proxy address your proxy address
enterprise enable false | true enable GitHub Enterprise
host host address github enterprise host address
token token token with "gist" enabled
avatarUrl url to an avatar image (optional) url for an avartar

@nitinsatish
Copy link

Dark mode wasn't working for me on Ubuntu 18.04 snap installation. Moving .leptonrc from home to ~/snap/lepton/9/.leptonrc fixed it. Thanks @promisepreston

@macintacos
Copy link

Is it not possible to change the font being used in the app? Would be nice to change the "body" font and the "code" font separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment