From 6a1e131555242bca967e63369287a315c62ac86d Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Wed, 2 Nov 2022 16:34:18 +0000 Subject: [PATCH] Update dotfiles/.local/functions, dotfiles/.config/slack-term/config --- dotfiles/.config/slack-term/config | 88 ++++++++++++++++++++++++++++++ dotfiles/.local/functions | 15 +++++ 2 files changed, 103 insertions(+) create mode 100644 dotfiles/.config/slack-term/config diff --git a/dotfiles/.config/slack-term/config b/dotfiles/.config/slack-term/config new file mode 100644 index 00000000..6ed88e87 --- /dev/null +++ b/dotfiles/.config/slack-term/config @@ -0,0 +1,88 @@ +{ + "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", + "K": "thread-up", + "J": "thread-down", + "": "chat-up", + "C-b": "chat-up", + "C-u": "chat-up", + "": "chat-down", + "C-f": "chat-down", + "C-d": "chat-down", + "n": "channel-search-next", + "N": "channel-search-previous", + "'": "channel-jump", + "q": "quit", + "": "help" + }, + "insert": { + "": "cursor-left", + "": "cursor-right", + "": "send", + "": "mode-command", + "": "backspace", + "C-8": "backspace", + "": "delete", + "": "space" + }, + "search": { + "": "cursor-left", + "": "cursor-right", + "": "clear-input", + "": "clear-input", + "": "backspace", + "C-8": "backspace", + "": "delete", + "": "space" + } + }, + + // OPTIONAL: override the default theme, defaults are: + "theme": { + "view": { + "fg": "white", + "bg": "default", + "border_fg": "white", + "border_bg": "", + "label_fg": "white", + "label_bg": "" + }, + "channel": { + "prefix": "", + "icon": "", + "text": "" + }, + "message": { + // This uses golang time formatting: + // - https://yourbasic.org/golang/format-parse-string-time-date-example/ + // - https://golang.org/pkg/time/#Time.Format + "time_format": "15:04", + + // You can use 'colorize' to give every name an individual color + "name": "", + + "time": "", + "text": "" + } + } +} diff --git a/dotfiles/.local/functions b/dotfiles/.local/functions index b7e088eb..bd1f92f5 100644 --- a/dotfiles/.local/functions +++ b/dotfiles/.local/functions @@ -72,6 +72,21 @@ resetdocker() { docker system prune -a --force } +# ripgrep-all +rga-fzf() { + RG_PREFIX="rga --files-with-matches" + local file + file="$( + FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \ + fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \ + --phony -q "$1" \ + --bind "change:reload:$RG_PREFIX {q}" \ + --preview-window="70%:wrap" + )" && + echo "opening $file" && + xdg-open "$file" +} + # Easy file sharing from the command line, using transfer.sh transfer() { if [ $# -eq 0 ]; then