Update README.md

This commit is contained in:
erroneousboat 2018-10-27 15:09:16 +02:00
parent 457f47776b
commit b32e91df92

View File

@ -35,90 +35,13 @@ Setup
1. Get a slack token, click [here](https://api.slack.com/docs/oauth-test-tokens)
2. Create a `.slack-term` file, and place it in your home directory. Below is
an example file, you can leave out the `OPTIONAL` parts, you are only
required to specify a `slack_token`. Remember that your file should be
a valid json file so don't forget to remove the comments.
an example of such a file. You are only required to specify a
`slack_token`. For more configuration options of the `.slack-term` file,
see the [wiki](https://github.com/erroneousboat/slack-term/wiki).
```javascript
{
"slack_token": "yourslacktokenhere",
// OPTIONAL: set the width of the sidebar (between 1 and 11), default is 1
"sidebar_width": 1,
// OPTIONAL: turn on desktop notifications for all incoming messages, set
// the value as: "all". For only mentions and im messages set the
// value as: "mention", default is turned off: ""
"notify": "",
// OPTIONAL: turn on emoji's, default is false
"emoji": false,
// OPTIONAL: define custom key mappings, defaults are:
"key_map": {
"command": {
"i": "mode-insert",
"/": "mode-search",
"k": "channel-up",
"j": "channel-down",
"g": "channel-top",
"G": "channel-bottom",
"<previous>": "chat-up",
"C-b": "chat-up",
"C-u": "chat-up",
"<next>": "chat-down",
"C-f": "chat-down",
"C-d": "chat-down",
"n": "channel-search-next",
"N": "channel-search-previous",
"q": "quit",
"<f1>": "help"
},
"insert": {
"<left>": "cursor-left",
"<right>": "cursor-right",
"<enter>": "send",
"<escape>": "mode-command",
"<backspace>": "backspace",
"C-8": "backspace",
"<delete>": "delete",
"<space>": "space"
},
"search": {
"<left>": "cursor-left",
"<right>": "cursor-right",
"<escape>": "clear-input",
"<enter>": "clear-input",
"<backspace>": "backspace",
"C-8": "backspace",
"<delete>": "delete",
"<space>": "space"
}
},
// OPTIONAL: override the default theme (see wiki for more information),
// defaults are:
"theme": {
"view": {
"fg": "white",
"bg": "default",
"border_fg": "white",
"border_bg": "",
"label_fg": "white",
"label_bg": ""
},
"channel": {
"prefix": "",
"icon": "",
"text": ""
},
"message": {
"time": "",
"name": "",
"text": "",
"time_format": "15:04"
}
}
"slack_token": "yourslacktokenhere"
}
```
@ -132,19 +55,11 @@ command:
$ slack-term
```
You can also specify the location of the config file, this will give you
the possibility to run several instances of `slack-term` with different
accounts.
```bash
$ slack-term -config [path-to-config-file]
```
Default Key Mapping
-------------------
Below are the default key-mappings for `slack-term`, you can change them
in your `slack-term.json` file.
in your `.slack-term` file.
| mode | key | action |
|---------|-----------|----------------------------|