feat(config): add toggleable auto focus on channel select (#671)
Co-authored-by: Ayyan <ayn2op@gmail.com>
This commit is contained in:
parent
88c7a75222
commit
6f7381df9d
3 changed files with 10 additions and 3 deletions
|
|
@ -194,7 +194,9 @@ func (gt *guildsTree) onSelected(node *tview.TreeNode) {
|
|||
app.chatView.messageInput.SetPlaceholder("You do not have permission to send messages in this channel.")
|
||||
} else {
|
||||
app.chatView.messageInput.SetPlaceholder("Message...")
|
||||
app.SetFocus(app.chatView.messageInput)
|
||||
if gt.cfg.AutoFocus {
|
||||
app.SetFocus(app.chatView.messageInput)
|
||||
}
|
||||
}
|
||||
|
||||
case nil: // Direct messages folder
|
||||
|
|
|
|||
|
|
@ -32,8 +32,9 @@ type (
|
|||
}
|
||||
|
||||
Config struct {
|
||||
Mouse bool `toml:"mouse"`
|
||||
Editor string `toml:"editor"`
|
||||
AutoFocus bool `toml:"auto_focus"`
|
||||
Mouse bool `toml:"mouse"`
|
||||
Editor string `toml:"editor"`
|
||||
|
||||
Status discord.Status `toml:"status"`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# Whether to focus the message input automatically when a channel is selected.
|
||||
# Set to false to preview channels without moving focus.
|
||||
auto_focus = true
|
||||
|
||||
# Whether to enable mouse or not.
|
||||
mouse = true
|
||||
# The program to open when the `keys.message_input.editor` keymap is pressed. Set the value to `"default"` to use `$EDITOR`.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue