...
 
Commits (9)
......@@ -15,10 +15,12 @@ files/.weechat/*
!files/.weechat/sec.conf
files/.mutt/config/aliases
files/.mutt/cache
files/.mutt/config/hooks.mutt
files/.mutt/tmp
files/.mutt/certificates
files/.mutt/secure-ca.cert
files/.mutt/accounts/*
!files/.mutt/accounts/init.lua
scratch
......@@ -29,7 +31,7 @@ files/.newsboat/queue
files/.hammerspoon/Spoons/*
!files/.hammerspoon/Spoons/SpoonInstall.spoon
!files/.ignore
!.ignore
*.old
.zcompdump*
......
......@@ -6,7 +6,7 @@ DOTFILES="$(HOME)/.dotfiles"
SCRIPTS="$(DOTFILES)/script"
INSTALL="$(SCRIPTS)/install"
all: node python neovim rust macos
all: mail node python neovim rust macos
install:
bash <(cat $(INSTALL))
......@@ -34,6 +34,9 @@ homebrew-work: homebrew
brew cleanup
brew doctor
mail:
node $(DOTFILES)/files/.mutt/scripts/setup
node:
sh $(SCRIPTS)/node-packages
......
......@@ -19,7 +19,7 @@ create_session() {
open_or_log newsboat
tmux new-window -n 'reddit'
open_or_log rtv
open_or_log tuir
tmux new-window -n 'weechat'
# Stop Weechat from renaming the window
......
......@@ -70,7 +70,6 @@ brew "msmtp"
brew "offlineimap"
brew "neomutt/homebrew-neomutt/neomutt", args: ["with-gpgme", "with-notmuch-patch", "with-lua"]
# End Mail
brew "rtv"
brew "tmux", args: ["HEAD"]
brew "vim"
brew "weechat" # , args: ["with-curl"]
......
; Reddit Terminal Viewer Configuration File
; https://github.com/michael-lazar/rtv
; https://github.com/michael-lazar/tuir
;
; This file should be placed in $XDG_CONFIG/rtv/rtv.cfg
; If $XDG_CONFIG is not set, use ~/.config/rtv/rtv.cfg
; This file should be placed in $XDG_CONFIG/tuir/rtv.cfg
; If $XDG_CONFIG is not set, use ~/.config/tuir/rtv.cfg
[rtv]
[tuir]
##################
# General Settings
##################
......@@ -20,7 +20,7 @@ monochrome = False
flash = True
; Enable debugging by logging all HTTP requests and errors to the given file.
;log = /tmp/rtv.log
;log = /tmp/tuir.log
; Default subreddit that will be opened when the program launches.
subreddit = front
......@@ -28,7 +28,7 @@ subreddit = front
;subreddit = python+linux+programming
;subreddit = all
; Allow rtv to store reddit authentication credentials between sessions.
; Allow tuir to store reddit authentication credentials between sessions.
persistent = True
; Clear any stored credentials when the program starts.
......@@ -46,7 +46,7 @@ max_comment_cols = 120
; Hide username if logged in, display "Logged in" instead
hide_username = False
; Color theme, use "rtv --list-themes" to view a list of valid options.
; Color theme, use "tuir --list-themes" to view a list of valid options.
; This can be an absolute filepath, or the name of a theme file that has
; been installed into either the custom of default theme paths.
theme = molokai-modified
......@@ -55,16 +55,16 @@ theme = molokai-modified
# OAuth Settings
################
; This sections defines the paramaters that will be used during the OAuth
; authentication process. rtv is registered as an "installed app",
; authentication process. tuir is registered as an "installed app",
; see https://github.com/reddit/reddit/wiki/OAuth2 for more information.
; These settings are defined at https://www.reddit.com/prefs/apps and should
; not be altered unless you are defining your own developer application.
oauth_client_id = E2oEtRQfdfAfNQ
oauth_client_id = zjyhNI7tK8ivzQ
oauth_client_secret = praw_gapfill
oauth_redirect_uri = http://127.0.0.1:65000/
; Port that the rtv webserver will listen on. This should match the redirect
; Port that the tuir webserver will listen on. This should match the redirect
; uri defined above.
oauth_redirect_port = 65000
......@@ -74,7 +74,7 @@ oauth_scope = edit,history,identity,mysubreddits,privatemessages,read,report,sav
; This is a separate token for the imgur api. It's used to extract images
; from imgur links and albums so they can be opened with mailcap.
; See https://imgur.com/account/settings/apps to generate your own key.
imgur_client_id = 93396265f59dec9
imgur_client_id = b33d69ac8931734
[bindings]
##############
......
......@@ -109,8 +109,8 @@
remote = green
[color "diff"]
meta = yellow
frag = magenta
meta = 238 italic
frag = 240
old = red strike
new = green italic
whitespace = red reverse
......@@ -150,8 +150,6 @@
dm = d --word-diff-regex=.
doctor = remote -v show origin
fl = l -u
stat = --no-pager diff --stat
grr = grep --break --heading --line-number
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
unhide-all = update-index --really-refresh
......@@ -173,6 +171,19 @@
who = shortlog -sne
wt = whatchanged --pretty=format:\"%C(blue)%h %Creset- %C(green)(%cr) %C(cyan)<%aN> %Creset%aE %C(magenta)%d %n %C(yellow)%s %n%Creset\" --date=auto:human
unpushed-branches = log --branches --not --remotes --no-walk --decorate --oneline
# Review helpers: https://blog.jez.io/cli-code-review/
# https://github.com/jez/dotfiles/blob/d7b720fe13b6bc83829d248e23127b918d65de6e/util/gitconfig#L23-L53
review-base = !git merge-base HEAD \"${review_base:-master}\"
stat = !git --no-pager diff --stat $(git review-base)
files = !git --no-pager diff --name-only $(git review-base)
# Review by commit
by-commit = !tig log --reverse $(git review-base)..HEAD
# Show a markdown-formatted summary of commits from {review_base:-master} until HEAD
pr-summary = !git log --reverse --format=\"- **%s** (%h)%n%n%w(74,2,2)%b\" \"${review_base:-master}\"..HEAD
# split-diff style review using vim-fugitive Gdiff
review = !$EDITOR -p $(git files) +\"tabdo Gdiff ${review_base:-master}\" +\"let g:gitgutter_diff_base = '${review_base:-master}'\"
reviewone = !$EDITOR -p +\"tabdo Gdiff ${review_base:-master}\" +\"let g:gitgutter_diff_base = '${review_base:-master}'\"
reviewf = !$EDITOR -p $(git files | fzf) +\"tabdo Gdiff ${review_base:-master}\" +\"let g:gitgutter_diff_base = '${review_base:-master}'\"
[filter "media"]
clean = git-media-clean %f
......
# AGIGNORE
# ##########################
.git
vendor
doc
rdoc
coverage
node_modules
logs
log
tmp
cache
.cache
pack
.next
*.pyc
*.spl
*.jar
.DS_Store
.config/coc
-- vim:ft=lua:tw=0
local EMAIL_ENV_SUFFIX = "_EMAIL"
local EMAIL_ALIASES_ENV_SUFFIX = "_EMAIL_ALIASES"
local accounts = {
Personal = {
account_name = "Personal",
switch_account = "Work",
color = "blue",
required = true
},
Work = {
account_name = "Work",
switch_account = "Personal",
color = "red"
}
}
function init_accounts()
switch_account("Personal")
for _, acc in pairs(accounts) do
if acc.switch_account ~= nill then
local switch_to = acc.switch_account.."/"..acc.switch_account
local switch_to_env = os.getenv(string.upper(acc.switch_account) .. EMAIL_ENV_SUFFIX)
local first_char = string.lower(string.sub(acc.switch_account, 1, 1))
mutt.enter("folder-hook +"..acc.account_name.."/* 'lua switch_account(\""..acc.account_name.."\")'")
if switch_to_env ~= nil then
mutt.enter('macro index,pager g' ..first_char.. ' "<change-folder>=' ..switch_to.. '<enter>" "Switch account to ' ..acc.switch_account.. '"')
end
end
end
end
-- Create a string form a map
-- https://stackoverflow.com/a/1407187/213124
function listvalues(s)
local t = {}
for k,v in pairs(s) do
t[#t+1] = tostring(v)
end
return "'"..table.concat(t,"' '").."'"
end
function _switch_account(opt)
local notmuch_path = opt.account_name.."/**"
local prefix = opt.account_name.."/"..opt.account_name
local folder_prefix = "+"..prefix
local email_env = string.upper(opt.account_name) .. EMAIL_ENV_SUFFIX
local alternate_env = string.upper(opt.account_name) .. EMAIL_ALIASES_ENV_SUFFIX
local email = os.getenv(email_env)
local alternates = os.getenv(alternate_env)
if email == nil then
if opt.required then
print('You need to set $' .. email_env)
os.exit(1)
end
else
mutt.enter('macro index,pager gs "<change-folder>=' ..prefix.. '.Starred<enter>" "go to Starred"')
mutt.enter('macro index,pager gt "<change-folder>=' ..prefix.. '.Sent<enter>" "go to Sent"')
mutt.enter('macro index,pager gd "<change-folder>=' ..prefix.. '.Drafts<enter>" "go to Drafts"')
mutt.enter('macro browser gs "<exit><change-folder>=' ..prefix.. '.Starred<enter>" "go to Starred"')
mutt.enter('macro browser gt "<exit><change-folder>=' ..prefix.. '.Sent<enter>" "go to Sent"')
mutt.enter('macro browser gd "<exit><change-folder>=' ..prefix.. '.Drafts<enter>" "go to Drafts"')
mutt.enter('macro index,pager / "<vfolder-from-query>path:' ..notmuch_path.. ' " "Searching ' ..opt.account_name.. 'mailbox with notmuch integration in neomutt"')
mutt.enter("unmailboxes *")
if alternates ~= nil then
mutt.enter("alternates "..listvalues({ alternates }))
end
mutt.set("sendmail", opt.sendmail or "/usr/local/bin/msmtp -a "..string.lower(opt.account_name))
mutt.set("from", email)
mutt.set("spoolfile", opt.inbox or folder_prefix)
mutt.set("postponed", opt.drafts or folder_prefix..".Drafts")
mutt.set("mbox", opt.record or folder_prefix..".Archive")
mutt.set("trash", opt.trash or folder_prefix..".Trash")
mutt.set("header_cache", opt.header_cache or os.getenv('HOME').."/.mutt/cache/headers/"..string.lower(opt.account_name).."/")
mutt.set("message_cachedir", opt.message_cachedir or os.getenv('HOME').."/.mutt/cache/messages/"..string.lower(opt.account_name).."/")
mutt.call("mailboxes",
folder_prefix,
folder_prefix..".Starred",
folder_prefix..".Sent",
folder_prefix..".Drafts",
folder_prefix..".Archive",
folder_prefix..".Trash",
folder_prefix..".Spam",
-- [TODO]: This is awful, fix this!
"`tree ~/.mail -d -I \"cur|new|tmp|certs|.notmuch|Inbox|\\[Gmail\\]\" -a -f -i | sed -n -E -e \"s|^"..os.getenv('HOME').."/.mail/?||\" -e \"/^("..opt.account_name..")$/d\" -e \"/^("..opt.account_name..")/{p;}\" | sed -E -e 's/(.*)/+\"\\1\"/' | grep -v \"\\/\\.\" | tr '\\n' ' '`"
)
mutt.enter("macro index SI '<shell-escape>mbsync "..string.lower(opt.account_name).."-download<enter>' 'sync inbox'")
mutt.enter("macro index,pager y '<save-message>="..prefix..".Archive<enter>' 'Archive conversation'")
mutt.enter("macro index,pager Y '<tag-thread><save-message>="..prefix..".Archive<enter>' 'Archive conversation'")
mutt.enter("color status "..opt.color.." default")
mutt.enter("color sidebar_highlight black "..opt.color)
mutt.enter("color sidebar_indicator "..opt.color.." color0")
end
end
-- Switch Mutt accounts
function switch_account(name)
_switch_account(accounts[name])
end
init_accounts()
-- =======================================================================
-- = [TODO]: Enable gpg in neomutt
-- =======================================================================
-- https://github.com/sadsfae/misc-dotfiles/blob/5d10342013b7620e85eadb659c8295c243f49dec/muttrc-gpg.txt
-- set pgp_autosign=yes
-- set pgp_replyencrypt=yes
-- set pgp_replysign=yes
-- set pgp_replysignencrypted=yes
-- set pgp_timeout=600
-- set pgp_sign_as=XXXXXXXX
-- # decode application/pgp
-- set pgp_decode_command="/usr/local/bin/gpg --charset utf-8 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
-- # verify a pgp/mime signature
-- set pgp_verify_command="/usr/local/bin/gpg --no-verbose --quiet --batch --output - --verify %s %f"
-- # decrypt a pgp/mime attachment
-- set pgp_decrypt_command="/usr/local/bin/gpg --status-fd=2 --passphrase-fd 0 --no-verbose --quiet --batch --output - %f"
-- # create a pgp/mime signed attachment
-- # set pgp_sign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
-- set pgp_sign_command="/usr/local/bin/gpg --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
-- # create a application/pgp signed (old-style) message
-- # set pgp_clearsign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
-- set pgp_clearsign_command="/usr/local/bin/gpg --charset utf-8 --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
......@@ -2,10 +2,10 @@
set alias_file = "$HOME/.mutt/config/aliases.private"
# set display_filter = "$HOME/.mutt/scripts/add-address.sh"
# Headers cache is set automatically per account in init.lua
# set header_cache = "$HOME/.mutt/cache/headers/"
# set header_cache = "$XDG_CACHE_HOME/mutt/headers/"
set header_cache_backend=lmdb
set read_inc=1000
# set message_cachedir = "$HOME/.mutt/cache/message/"
# set message_cachedir = "$XDG_CACHE_HOME/mutt/message/"
set certificate_file = "$HOME/.mutt/certificates"
set tmpdir = "$HOME/.mutt/tmp/"
......@@ -124,3 +124,4 @@ set ts_status_format = 'mutt %m messages%?n?, %n new?'
source ./config/aliases.private
source ./config/colors.mutt
source ./config/bindings.mutt
source ./config/hooks.mutt
source ./muttrc
lua-source $HOME/.mutt/accounts/init.lua
#!/usr/bin/env node
const path = require('path')
const fs = require('fs')
/////////////////////////////////////////////////////////////////////////////////
// CONFIG //
/////////////////////////////////////////////////////////////////////////////////
const accounts = [
{
accountName: 'Personal',
switchAccount: 'Work',
color: 'blue',
required: true,
},
{
accountName: 'Work',
switchAccount: 'Personal',
color: 'red',
},
]
const EMAIL_ENV_SUFFIX = '_EMAIL'
const EMAIL_ALIASES_ENV_SUFFIX = '_EMAIL_ALIASES'
const MUTT_ROOT = '~/.mutt'
/////////////////////////////////////////////////////////////////////////////////
// HELPERS //
/////////////////////////////////////////////////////////////////////////////////
const lowerCase = str => str.toLowerCase()
const upperCase = str => str.toUpperCase()
const getPrefix = accountName => `${accountName}/${accountName}`
const generateFolder = accountName => (folder = '') =>
`+${getPrefix(accountName)}${folder ? '.' : ''}${folder}`
const getAccountFile = accountName =>
path.join(MUTT_ROOT, '/accounts/', lowerCase(accountName))
const getCacheFor = ffor =>
path.join(process.env.XDG_CACHE_HOME, '/.cache/mutt/', ffor, '/')
const getHeaderCache = accountName =>
path.join(getCacheFor('headers'), lowerCase(accountName), '/')
const getMessagesCache = accountName =>
path.join(getCacheFor('messages'), lowerCase(accountName), '/')
const mailboxes = accountName =>
`tree ~/.mail/${accountName} -d -I "cur|new|tmp|certs|.notmuch|Inbox|\[Gmail\]" -afin --noreport | awk '{if(NR>1)print}' | tr '\\n' ' '`
/////////////////////////////////////////////////////////////////////////////////
// GENERATION //
/////////////////////////////////////////////////////////////////////////////////
/////////////
// HOOKS //
/////////////
function updateHooks() {
const data = accounts.reduce((str, {accountName, switchAccount}) => {
str += `folder-hook +${accountName}/ source ${getAccountFile(
accountName,
)}\n`
return str
}, ``)
return `# vi:syntax=muttrc
# THIS FILE IS AUTO GENERATED, DONOT EDIT MANUALLY
# Source account-specific settings when moving around folders
# This allows us to change SMTP servers, for example, when inside different accounts
${data}
# Source this file initially, so it acts like a default account
source ${getAccountFile('personal')}`
}
////////////////
// ACCOUNTS //
////////////////
function createAccount({
accountName,
switchAccount,
color,
required,
sendmail,
inbox,
drafts,
trash,
headerCache,
messageCachedir,
record,
}) {
const notmuchPath = `${accountName}/**`
const prefix = getPrefix(accountName)
const getFolder = generateFolder(accountName)
const emailEnv = `${upperCase(accountName)}${EMAIL_ENV_SUFFIX}`
const alternateEnv = `${upperCase(accountName)}${EMAIL_ALIASES_ENV_SUFFIX}`
const email = process.env[emailEnv]
const alternates = process.env[alternateEnv]
const switchToEnv =
process.env[`${upperCase(switchAccount)}${EMAIL_ENV_SUFFIX}`]
const switchToPrefix = getPrefix(switchAccount)
const firstChar = lowerCase(switchAccount[0])
if (!email) {
if (required) {
console.log(`You need to set ${emailEnv}`)
process.exit(1)
}
} else {
const folders = [
{
name: 'Starred',
key: 's',
},
{
name: 'Sent',
key: 't',
},
{
name: 'Drafts',
key: 'd',
},
].reduce((str, {name, key}) => {
str += `macro index,pager g${key} "<change-folder>=${prefix}.${name}<enter>" "go to ${name}"
macro browser gs "<exit><change-folder>=${prefix}.${name}<enter>" "go to ${name}"\n`
return str
}, '')
return `# vi:syntax=muttrc
# THIS FILE IS AUTO GENERATED, DONOT EDIT MANUALLY
unmailboxes *
${
switchAccount && switchToEnv
? `macro index,pager g${firstChar} "<change-folder>=${switchToPrefix}<enter>" "Switch account to ${switchAccount}"`
: ''
}
${folders}
macro index,pager / "<vfolder-from-query>path:${notmuchPath} " "Searching ${accountName} mailbox with notmuch integration in neomutt"
# ${alternates ? `alternates "${alternates}"` : ''}
set sendmail = "${sendmail ||
`/usr/local/bin/msmtp -a ${lowerCase(accountName)}`}"
set from = "${email}"
set spoolfile = "${inbox || getFolder()}"
set postponed = "${drafts || getFolder('Drafts')}"
set mbox = "${record || getFolder('Archive')}"
set trash = "${trash || getFolder('Trash')}"
set header_cache = "${headerCache || getHeaderCache(accountName)}"
set message_cachedir = "${messageCachedir || getMessagesCache(accountName)}"
mailboxes "${getFolder()}" \\
"${getFolder('Starred')}" \\
"${getFolder('Sent')}" \\
"${getFolder('Drafts')}" \\
"${getFolder('Archive')}" \\
"${getFolder('Trash')}" \\
"${getFolder('Spam')}" \\
\`${mailboxes(accountName)}\`
macro index SI "<shell-escape>mbsync ${lowerCase(
accountName,
)} -download<enter>" "sync inbox"
macro index,pager y "<save-message>=${prefix}.Archive<enter>" "Archive conversation"
macro index,pager Y "<tag-thread><save-message>=${prefix}.Archive<enter>" "Archive conversation"
color status ${color} default
color sidebar_highlight black ${color}
color sidebar_indicator ${color} color0`
}
}
/////////////////////////////////////////////////////////////////////////////////
// DO IT //
/////////////////////////////////////////////////////////////////////////////////
fs.writeFileSync(
path.join(process.env.HOME, '/.mutt/config/hooks.mutt'),
updateHooks(),
)
accounts.forEach(a =>
fs.writeFileSync(
path.join(process.env.HOME, '/.mutt/accounts', lowerCase(a.accountName)),
createAccount(a),
),
)
# vim:ft=conf
email=${NPM_EMAIL}
init-license=MIT
init-author-email=${NPM_EMAIL}
......@@ -8,5 +9,5 @@ init-version=0.0.1
registry=https://registry.npmjs.org/
@lightspeed:registry=https://registry.npmjs.org/
//npm.pkg.github.com/:_authToken=${GITHUB_PKGS_TOKEN}
@ahmedelgabri:registry=https://npm.pkg.github.com/
# @ahmedelgabri:registry=https://npm.pkg.github.com/
@lightspeedretail:registry=https://npm.pkg.github.com/
" Work around filetype that landed in upstream Vim here:
" https://github.com/vim/vim/issues/4830
execute 'noautocmd set filetype=' . substitute(&filetype, 'javascriptreact', 'javascript', '')
" Work around filetype that landed in upstream Vim here:
" https://github.com/vim/vim/issues/4830
execute 'noautocmd set filetype=' . substitute(&filetype, 'typescriptreact', 'typescript', '')
......@@ -41,7 +41,6 @@ let g:ale_linter_aliases = {
let g:rust_cargo_use_clippy = executable('cargo-clippy')
let g:ale_linters = {
\ 'javascript': ['eslint'],
\ 'javascript.jsx': ['eslint'],
\ 'typescript': ['eslint'],
\}
......
......@@ -54,14 +54,6 @@ function! plugins#install_plugins() abort
call minpac#add('https://github.com/wincent/terminus')
call minpac#add('https://github.com/tommcdo/vim-lion')
call minpac#add('https://github.com/liuchengxu/vista.vim')
let g:vista#renderer#enable_icon = 1
let g:vista_executive_for = {
\ 'javascript': 'coc',
\ 'javascript.jsx': 'coc',
\ 'typescript': 'coc',
\ 'typescript.tsx': 'coc',
\ }
let g:vista_close_on_jump = 1
call minpac#add('https://github.com/christoomey/vim-tmux-navigator', {'type': 'opt'})
call minpac#add('https://github.com/tpope/vim-dispatch')
let g:dispatch_no_tmux_make = 1 " Prefer job strategy even in tmux.
......
autocmd BufNewFile,BufRead *.tsx noautocmd set filetype+=.tsx
......@@ -3,10 +3,10 @@ if !exists(':Vista')
endif
let g:vista#renderer#enable_icon = 1
let g:vista_close_on_jump = 1
let g:vista_executive_for = {
\ 'go': 'ctags',
\ 'go' : 'ctags',
\ 'javascript': 'coc',
\ 'typescript': 'coc',
\ 'javascript.jsx': 'coc',
\ 'python': 'coc',
\ 'python' : 'coc',
\ }
......@@ -35,14 +35,15 @@ function {
(( ${+_comps} )) && _comps[zplugin]=_zplugin
# Shell {{{
zplugin snippet OMZ::plugins/gpg-agent/gpg-agent.plugin.zsh
zplugin ice svn
zplugin snippet OMZ::plugins/gpg-agent
zplugin light zdharma/zui
zplugin load https://github.com/zdharma/zui
zplugin ice lucid wait'[[ -n ${ZLAST_COMMANDS[(r)cras*]} ]]'
zplugin light https://github.com/zdharma/zplugin-crasis
zplugin load https://github.com/zdharma/zplugin-crasis
zplugin ice pick"async.zsh" src"pure.zsh"
zplugin light https://github.com/ahmedelgabri/pure
zplugin load https://github.com/ahmedelgabri/pure
local SYMBOLS=("λ" "ϟ" "▲" "∴" "→" "»" "৸" "◗")
# Arrays in zsh starts from 1
......@@ -60,7 +61,7 @@ function {
# Utilities & enhancements {{{
zplugin ice wait lucid
zplugin light https://github.com/zsh-users/zsh-history-substring-search
zplugin load https://github.com/zsh-users/zsh-history-substring-search
# bind UP and DOWN keys
bindkey "${terminfo[kcuu1]}" history-substring-search-up
bindkey "${terminfo[kcud1]}" history-substring-search-down
......@@ -69,28 +70,29 @@ function {
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
zplugin ice wait blockf lucid
zplugin light https://github.com/zsh-users/zsh-completions
zplugin ice wait lucid atload"_zsh_autosuggest_start"
zplugin light https://github.com/zsh-users/zsh-autosuggestions
export ZSH_AUTOSUGGEST_USE_ASYNC=true
zplugin ice wait lucid atinit"zpcompinit; zpcdreplay"
zplugin light https://github.com/zdharma/fast-syntax-highlighting
zplugin ice wait lucid atclone"dircolors -b LS_COLORS > c.zsh" atpull'%atclone' pick"c.zsh"
zplugin light https://github.com/trapd00r/LS_COLORS
zplugin ice atclone"dircolors -b LS_COLORS > clrs.zsh" atpull'%atclone' pick"clrs.zsh" nocompile'!' atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”'
zplugin load trapd00r/LS_COLORS
# }}}
# Misc {{{
zplugin ice from"gh-r" as"program" bpick"*clojure-lsp*" atclone"chmod 755 clojure-lsp" atpull"%atclone" mv="clojure-lsp -> clojure-lsp"
zplugin light https://github.com/snoe/clojure-lsp
zplugin load https://github.com/snoe/clojure-lsp
# }}}
# Local plugins/completions/etc... {{{
zplugin light %HOME/.zsh.d/aliases
zplugin load %HOME/.zsh.d/aliases
# }}}
# Recommended be loaded last {{{
zplugin ice wait blockf lucid atpull'zplugin creinstall -q .'
zplugin load https://github.com/zsh-users/zsh-completions
zplugin ice wait lucid atinit"zpcompinit; zpcdreplay"
zplugin load https://github.com/zdharma/fast-syntax-highlighting
zplugin ice wait lucid atload"_zsh_autosuggest_start"
zplugin load https://github.com/zsh-users/zsh-autosuggestions
export ZSH_AUTOSUGGEST_USE_ASYNC=true
# }}}
##############################################################
......@@ -172,6 +174,7 @@ function {
export NODE_VERSIONS="${N_PREFIX}/n/versions/node"
export NODE_VERSION_PREFIX=""
(( $+commands[direnv] )) && eval "$(direnv hook zsh)"
(( $+commands[hub] )) && eval "$(hub alias -s)"
############### Kitty
if [[ ! -z "${KITTY_WINDOW_ID}" ]]; then
......
......@@ -58,13 +58,6 @@ alias r="ranger" # overrides built-in r command
(( $+commands[bat] )) && alias cat='bat '
(( $+commands[python3] )) && alias server="python3 -m http.server 80"
if (( $+commands[hub] )); then
alias git=hub
compdef g=hub
else
compdef g=git
fi
(( $+commands[yarn] )) && alias y=yarn
[[ -x "/Applications/Alacritty.app/Contents/MacOS/alacritty" ]] && alias alacritty='/Applications/Alacritty.app/Contents/MacOS/alacritty'
......@@ -17,13 +17,14 @@ PACKAGES=(
"black"
"pynvim"
"pylint"
"tuir"
)
FLAGS=''
for package in "${PACKAGES[@]}"; do
[[ $package == "pip" ]] && FLAGS="--upgrade" || FLAGS="--user"
[[ $package == "black" ]] && pip3 install "$FLAGS" "$package" || pip2 install "$FLAGS" "$package" && pip3 install "$FLAGS" "$package"
[[ $package == "black" || $package == 'tuir' ]] && pip3 install "$FLAGS" "$package" || pip2 install "$FLAGS" "$package" && pip3 install "$FLAGS" "$package"
done
unset -v PACKAGES FLAGS