Skip to content

Instantly share code, notes, and snippets.

@darianmorat
Last active October 13, 2024 01:43
Show Gist options
  • Save darianmorat/091fd359d9257a42ef6bc0f3e420817b to your computer and use it in GitHub Desktop.
Save darianmorat/091fd359d9257a42ef6bc0f3e420817b to your computer and use it in GitHub Desktop.
Full terminal + tools
# INSTALL:
# homebrew, nvim, zsh4, p10k, tmux, vifm, lazygit
# fzf, ripgrep, bat, zoxide, eza, trash-cli, empty-trash-cli
# =============== #
# ZSH4 CONFIG
# ~/.zshrc
# =============== #
zstyle ':z4h:' prompt-at-bottom 'yes'
ZSH_AUTOSUGGEST_HISTORY_IGNORE="?(#c160,)" # Ignore suggestions with more than 100char
zstyle ':z4h:autosuggestions' forward-char 'accept' # Accepts 1char 'partial-accept' or for all 'accept'
# Bindings
z4h bindkey z4h-backward-word Ctrl+Alt+B
z4h bindkey z4h-forward-word Ctrl+Alt+F
# find way to send vifm directly. Bash: bind -x '"\C-o":"vifm"'
bindkey -s '^O' '^Utmux rename-window vifm; vifm .^J'
# Aliases
alias dow="cd /mnt/d/DarianToledo/Downloads"
alias doc="cd /mnt/d/DarianToledo/Documents"
alias mf="touch" # md: make-dir
alias rm="trash"
# `$rm` cli: Trash/files/
# `dd` vifm: Trash/vifm/
# `$empty-trash` cli: Trash/
alias s="tmux"
alias sa="tmux a"
alias lg="lazygit"
alias ls="eza --color=always --long --git --no-filesize --no-time --no-user --no-permissions -F"
alias lsl="eza --color=always --long --git --no-filesize --no-time --no-user --no-permissions -F --grid"
alias lst="ls --tree --level=2"
alias clear=z4h-clear-screen-soft-bottom
eval "$(zoxide init zsh)"
# export PATH="$HOME/bin:$PATH" # ~/bin/color_test / if needed
# =============== #
# P10K CONFIG
# ~/.p10k.zsh
# =============== #
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
example # ~/
function prompt_example() {
p10k segment -f 4 -i '~/'
typeset -g POWERLEVEL9K_SHOW_RULER=true
typeset -g POWERLEVEL9K_RULER_CHAR='.'
typeset -g POWERLEVEL9K_RULER_FOREGROUND=0
# Default prompt symbol.
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯❯'
# Prompt symbol in command vi mode.
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮❮'
# typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_last
# =============== #
# TMUX CONFIG
# ~/.tmux.conf
# =============== #
unbind C-b
set -g prefix C-Space
bind-key C-Space send-prefix
bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
bind X confirm kill-session
set -s escape-time 0
set -sg repeat-time 600
# Copy mode
set -g mouse on
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
unbind -T copy-mode-vi MouseDragEnd1Pane
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Visuals
set -g default-terminal "screen-256color"
set -g message-style "fg=#CDC5B8 bg=#313131"
set -g status-style "fg=#CDC5B8 bg=#313131"
set -g status-left ' '
set -g status-right '[#S] #(date +"%m-%d-%y %H:%M ")'
set -g @continuum-restore 'on'
# Others
bind-key c new-window -n 'tmux'
# Initialize TMUX plugin manager
run '~/.tmux/plugins/tpm/tpm'
# =============== #
# VIFM CONFIG
# ~/.config/vifm/vifmrc
# =============== #
set dirsize=nitems
set nowrap
set confirm-=delete
set dotdirs=
set millerview
set milleroptions=lsize:0,csize:1,rsize:0,rpreview:all
only
set vicmd=code
set trash
set trashdir=$HOME/.local/share/Trash/vifm
set timefmt=%m-%d-%y\ %H:%M
set scrolloff=3
set statusline=" %A %-7g %= %18d "
colorscheme gruvdark
fileviewer *[^/] bat --color always --wrap never --pager never --theme TwoDark %c -p
# " Remaps
nnoremap <space> <Nop>
nnoremap <C-o> <Nop>
nnoremap <C-j> :q<cr>
nnoremap s :shell<cr>
nnoremap q :q<cr>
nnoremap x q
nnoremap w :!nvim %f<cr>
nnoremap md :mk<space>
nnoremap mf :touch<space>
nnoremap b :bmgo<space>
nnoremap mb :bmark<space>
nnoremap <space>fj :history<cr>
nnoremap o :histprev<cr>
nnoremap i :histnext<cr>
nnoremap ciw cw
# Vscode: diff-view, stage and revert
# Lazygit: revert-stage, add-files, commit, push, etc...
# =============== #
# LAZYGIT CONFIG
# ~/.config/lazygit/config.yml
# =============== #
gui:
authorColors:
'darianmorat': 'blue'
'*': 'blue'
border: single
showBottomLine: false
showPanelJumps: false
commandLogSize: 1
theme:
activeBorderColor:
- white
- bold
selectedLineBgColor:
- "#444444"
git:
paging:
pager: ""
externalDiffCommand: ""
commitPrefix:
pattern: " "
replace: " "
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
# =============== #
# GIT CONFIG
# ~/.gitconfig
# =============== #
[init]
defaultBranch = main
[core]
editor = nvim
pager = delta
[delta]
features = gruvdark
[delta "gruvdark"]
dark = true
syntax-theme = base16
side-by-side = true
# File
file-style = white bold
file-decoration-style = "#777777" ul
file-added-label = [+]
file-copied-label = [==]
file-modified-label = [*]
file-removed-label = [-]
file-renamed-label = [->]
hunk-header-style = omit
# Line numbers
line-numbers = true
line-numbers-left-style = "#84786A"
line-numbers-right-style = "#84786A"
line-numbers-minus-style = "#A02A11"
line-numbers-plus-style = "#479B36"
line-numbers-zero-style = "#84786A"
line-numbers-left-format = " {nm:>3} │"
line-numbers-right-format = " {np:>3} │"
# Diff contents
plus-style = syntax "#003a0310"
plus-emph-style = black green
minus-style = syntax "#67000010"
minus-emph-style = black red
line-numbers-minus-style = brightred
line-numbers-plus-style = brightgreen
line-numbers-left-style = "#3e3e43"
line-numbers-right-style = "#3e3e43"
line-numbers-zero-style = "#57575f"
zero-style = syntax
whitespace-error-style = black bold
# Commit hash / blame
commit-decoration-style = normal box # ?
commit-style = "#ffffff" bold # ?
blame-code-style = syntax
blame-format = "{author:>18} ({commit:>8}) {timestamp:<13} " # ?
blame-palette = "#161617" "#1b1b1d" "#2a2a2d" "#3e3e43"
# Merge conflicts
merge-conflict-begin-symbol = ⌃
merge-conflict-end-symbol = ⌄
merge-conflict-ours-diff-header-style = yellow bold
merge-conflict-theirs-diff-header-style = yellow bold
merge-conflict-ours-diff-header-decoration-style = "#3e3e43" box # ?
#merge-conflict-ours-diff-header-decoration-style = ''
merge-conflict-theirs-diff-header-decoration-style = "#3e3e43" box # ?
#merge-conflict-theirs-diff-header-decoration-style = ''
-- -------------------------------------------------------------------------------------------
-- MAIN CONFIG
-- -------------------------------------------------------------------------------------------
-- ALIASES
local set = vim.keymap.set
local set_hl = vim.api.nvim_set_hl
local set_api = vim.api.nvim_set_keymap
local p_opts = { silent=true, noremap=true }
local p_opt = { remap=true }
-- SETTINGS
vim.g.mapleader = " "
vim.opt.syntax = "on"
vim.opt.showmode = false
vim.opt.showcmd = false
vim.opt.guicursor = "a:block"
vim.opt.relativenumber = true
vim.opt.number = true
vim.opt.tabstop = 3
vim.opt.shiftwidth = 3
vim.opt.expandtab = true
vim.opt.clipboard = "unnamedplus"
vim.opt.scrolloff = 6
vim.opt.colorcolumn = "95"
vim.opt.wrap = false
vim.opt.signcolumn = "yes"
vim.opt.updatetime = 200
vim.opt.hlsearch = false
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.pumheight = 8
-- REMAPS
-- Normal mode
set("n", "<C-d>", "<C-d>zz")
set("n", "<C-u>", "<C-u>zz")
set("n", "n", "nzz")
set("n", "N", "Nzz")
set("n", "K", "m`i<CR><Esc>``")
set("n", "J", "m`J``")
set("n", "<leader>a", "A")
set("n", "<leader>i", "I")
set("n", "<leader>z", ":ZenMode<CR>")
set("n", "<leader>w", ":w<CR>")
set("n", "<leader>q", ":bd<CR>")
set("n", "<leader><leader>d", ":bd!<CR>")
set("n", "<leader><leader>b", ":BufOnly<CR>")
set("n", "<leader><leader>q", ":q<CR>")
set("n", "<C-k>", ":FloatermNew lazygit<CR>")
set("n", "<C-j>", ":FloatermNew vifm<CR>")
set("n", "<C-h>", "<C-6>")
-- Visual mode
set("v", "K", ":m '<-2<CR>gv=gv")
set("v", "J", ":m '>+1<CR>gv=gv")
-- -------------------------------------------------------------------------------------------
-- PLUGIN LIST
-- -------------------------------------------------------------------------------------------
local plugins = {
{ "navarasu/onedark.nvim" },
{ "nvim-lualine/lualine.nvim" },
{ "folke/zen-mode.nvim" },
{ "voldikss/vim-floaterm" },
{ "numToStr/Comment.nvim" },
{ "kylechui/nvim-surround" },
{ "jake-stewart/multicursor.nvim" },
{ "ggandor/leap.nvim" },
{ "nvim-telescope/telescope.nvim", tag = "0.1.8" },
{ "nvim-lua/plenary.nvim" },
{ "ThePrimeagen/harpoon" },
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "nvim-treesitter/nvim-treesitter-refactor" },
{ "windwp/nvim-autopairs" },
{ "windwp/nvim-ts-autotag" },
{ "lewis6991/gitsigns.nvim" },
{ "lukas-reineke/indent-blankline.nvim" },
{ "VonHeikemen/lsp-zero.nvim", branch = "v4.x" },
{ "williamboman/mason.nvim" },
{ "williamboman/mason-lspconfig.nvim" },
{ "neovim/nvim-lspconfig" },
{ "L3MON4D3/LuaSnip" },
{ "hrsh7th/nvim-cmp" },
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" },
{ "saadparwaiz1/cmp_luasnip" },
{ "rafamadriz/friendly-snippets" },
}
-- -------------------------------------------------------------------------------------------
-- PLUGIN INSTALLATION
-- -------------------------------------------------------------------------------------------
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup(plugins)
-- -------------------------------------------------------------------------------------------
-- GRUVDARK THEME
-- -------------------------------------------------------------------------------------------
require('onedark').setup({
style = 'warmer', code_style = { comments = 'none' },
colors = {
fg = '#CDC5B8', blue = '#5b98c9',
red = '#DB6A6A', yellow = '#D19F66',
green = '#76B568', cyan = '#CDC5B8',
purple = '#CD60B9', aqua = '#4DB0BD',
orange = '#D19F66',
},
highlights ={
Normal = { bg= '#1E1E1E' }, CursorLine = { bg = '#303030' },
Visual = { bg = '#353535' }, TelescopeSelection = { bg = '#303030'},
['@operator'] = { fg = '$blue' },
['@punctuation'] = { fg = '$fg' },
['@punctuation.bracket'] = { fg = '$fg' },
['@variable'] = {fg = '$fg'},
['@variable.member'] = {fg = '$fg'},
['@variable.parameter'] = {fg = '$fg'},
['@lsp.type.typeParameter'] = {fg = '$fg'},
['@lsp.type.parameter'] = {fg = '$fg'},
['@function'] = {fg = '$red'},
['@function.method'] = {fg = '$red'},
['@constructor'] = {fg = '$blue'},
['@keyword'] = {fg = '$blue'},
['@variable.builtin'] = {fg = '$yellow'},
['@type'] = {fg = '$aqua'},
['@type.builtin'] = {fg = '$aqua'},
['@tag'] = {fg = '$red'},
['@tag.delimiter'] = {fg = '$red'},
['@tag.attribute'] = {fg = '#9266DA'},
["@markup.heading"] = {fg = '$fg', fmt = 'none'},
["@property.css"] = { fg = '$blue' },
["@string.css"] = { fg = '$yellow' },
["@tag.css"] = { fg = '$red' },
["@type.css"] = { fg = '$red' },
["@operator.css"] = { fg = '$red' },
["@attribute.css"] = { fg = '$red' },
TSParameter = { fg = '$fg' }, TSParameterReference = { fg = '$fg' },
}
}) require('onedark').load()
vim.cmd("highlight Comment gui=NONE")
vim.cmd("highlight SignColumn ctermbg=NONE guibg=NONE")
vim.cmd("highlight EndOfBuffer guibg=NONE ctermbg=NONE")
vim.cmd("highlight ColorColumn ctermbg=237 guibg=#222222")
local onedark = require'lualine.themes.onedark'
onedark.normal.a.bg = '#292929' onedark.normal.b.bg = '#292929'
onedark.normal.c.bg = '#292929' onedark.normal.a.fg = '#CDC5B8'
onedark.insert.a.bg = '#292929' onedark.insert.a.fg = '#CDC5B8'
onedark.visual.a.bg = '#292929' onedark.visual.a.fg = '#CDC5B8'
onedark.command.a.bg = '#292929' onedark.command.a.fg = '#CDC5B8'
onedark.inactive.c.bg = '#292929'
-- -------------------------------------------------------------------------------------------
-- PLUGIN CONFIG
-- -------------------------------------------------------------------------------------------
-- LUALINE
local function dynamic_location()
local line = vim.fn.line('.')
local column = vim.fn.col('.')
return string.format('%d:%d', line, column)
end
require('lualine').setup({
options = {
icons_enabled = false,
theme = onedark,
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'filename', 'diff'},
lualine_c = {},
lualine_x = {},
lualine_y = {'selectioncount', 'diagnostics', dynamic_location, 'fileformat', 'encoding'},
lualine_z = {'progress'}
}
})
-- ZEN-MODE
require('zen-mode').setup({
window = {
backdrop = 0.94,
width = 130,
height = 1,
options = {
signcolumn = 'yes',
number = true,
relativenumber = true,
cursorline = false,
foldcolumn = '0',
list = false
}
}
})
-- FLOATERM
vim.g.floaterm_title = ''
vim.g.floaterm_height = 0.95
vim.g.floaterm_width = 0.6
vim.g.floaterm_position = 'top'
vim.g.floaterm_opener = 'edit'
vim.cmd("highlight FloatermBorder guibg=#1e1e1e guifg=NONE")
-- COMMENT
require('Comment').setup({})
set('n', '<leader>cc', 'gcc', p_opt)
set('n', '<leader>cb', 'gbc', p_opt)
set('n', '<leader>ca', 'gcA', p_opt)
set('n', '<leader>co', 'gco', p_opt)
set('n', '<leader>cO', 'gcO', p_opt)
set('v', '<leader>c', 'gc', p_opt)
set('v', '<leader>b', 'gb', p_opt)
-- SURROUND
require('nvim-surround').setup({})
-- MULTICURSOR
local mc = require('multicursor-nvim')
mc.setup({})
set({'n', 'v'}, "<c-l>", mc.matchAllAddCursors)
set({'n'}, '<c-n>', 'viw')
set({'v'}, '<c-n>', '')
set({'v'}, 'n', function() mc.matchAddCursor(1) end)
set({'v'}, 'N', function() mc.matchAddCursor(-1) end)
set({"v"}, "u", mc.deleteCursor)
set('n', '<esc>', function()
if not mc.cursorsEnabled() then mc.enableCursors()
elseif mc.hasCursors() then mc.clearCursors() else end
end)
-- LEAP
require('leap')
set({'n', 'x', 'o'}, 's', '<Plug>(leap)')
set_hl(0, 'LeapLabelPrimary', { fg = '#e6e3de', bg = '#5c5c5e' })
-- TELESCOPE
require('telescope').setup({
defaults = {
layout_strategy = 'vertical',
layout_config = {
preview_cutoff = 0,
width = 0.6,
preview_height = 0.6
},
border = {
prompt = { 1, 1, 1, 1 },
results = { 1, 1, 1, 1 },
preview = { 1, 1, 1, 1 }
},
borderchars = {
results = { '─', '│', '─', '│', '┌', '┐', '┘', '└' },
preview = { '─', '│', '─', '│', '┌', '┐', '┘', '└' },
prompt = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }
},
file_ignore_patterns = {
'node_modules'
}
}
})
local builtin = require('telescope.builtin')
set('n', '<leader>ff', function() builtin.find_files({ previewer = false }) end)
set('n', '<leader>fg', function() builtin.live_grep() end)
set('n', '<leader>fo', function() builtin.resume() end)
set('n', '<leader>fj', function() builtin.buffers({ previewer = false, sort_lastused = true }) end)
set('n', '<leader>fr', function() builtin.lsp_references() end)
set('n', '<leader>fw', function() builtin.grep_string({ search = vim.fn.expand('<cword>') }) end)
set('n', '<leader>fW', function() builtin.grep_string({ search = vim.fn.expand('<cWORD>') }) end)
set('n', '<leader>ej', function() builtin.diagnostics({ bufnr = 0 }) end)
-- HARPOON
require("harpoon").setup({
border_chars = { "─", "│", "─", "│", "┌", "┐", "┘", "└" } -- Not working
})
set_api("n", "<leader>fk", ":lua require('harpoon.ui').toggle_quick_menu()<CR>", p_opts)
set_api("n", "<c-m>", ":lua require('harpoon.mark').add_file()<CR>", p_opts)
set_api("n", "<c-o>", ":lua require('harpoon.ui').nav_next()<CR>", p_opts)
set_api("n", "<tab>", ":lua require('harpoon.ui').nav_prev()<CR>", p_opts) -- Tab refers <c-i>
set_api("n", "<leader>1", ":lua require('harpoon.ui').nav_file(1)<CR>", p_opts)
set_api("n", "<leader>2", ":lua require('harpoon.ui').nav_file(2)<CR>", p_opts)
set_api("n", "<leader>3", ":lua require('harpoon.ui').nav_file(3)<CR>", p_opts)
set_api("n", "<leader>4", ":lua require('harpoon.ui').nav_file(4)<CR>", p_opts)
-- TREESIETER
require'nvim-treesitter.configs'.setup({
ensure_installed = {'vim', 'lua', 'javascript', 'typescript', 'tsx', 'html', 'css', 'json', 'markdown'},
sync_install = false,
highlight = {
enable = true,
additional_vim_regex_highlighting = false
}
})
-- TREESIETER REFACTOR
require'nvim-treesitter.configs'.setup({
refactor = {
highlight_definitions = {
enable = true,
clear_on_cursor_move = true
},
smart_rename = {
enable = true,
keymaps = {
smart_rename = "<leader>er"
}
}
}
})
-- AUTOPAIRS
require('nvim-autopairs').setup({})
-- AUTOTAG
require('nvim-ts-autotag').setup({})
-- GITSIGNS
require('gitsigns').setup({})
set_api('n', '<leader>gi', '<cmd>lua require("gitsigns").preview_hunk_inline()<CR>', p_opts)
set_api('n', '<leader>gj', '<cmd>lua require("gitsigns").next_hunk()<CR>', p_opts)
set_api('n', '<leader>gk', '<cmd>lua require("gitsigns").prev_hunk()<CR>', p_opts)
-- LINE INDENTATION
require('ibl').setup({
indent = { char = '|' },
scope = {
enabled = true,
show_start = false,
show_end = false
}
})
-- LSP-ZERO
local lsp_zero = require('lsp-zero')
local lsp_attach = function(client, bufnr)
local b_opts = {buffer = bufnr}
set('n', 'gh', '<cmd>lua vim.lsp.buf.hover()<cr>', b_opts)
set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', b_opts)
set('n', '<leader>ef', '<cmd>lua vim.lsp.buf.code_action()<cr>', b_opts)
end
lsp_zero.extend_lspconfig({
sign_text = true,
lsp_attach = lsp_attach,
capabilities = require('cmp_nvim_lsp').default_capabilities()
})
-- MASON: 9
-- [css-lsp] [emmet-language-server] [eslint-lsp] [html-lsp]
-- [json-lsp] [marksman] [prettierd] [stylelint] [typescript-language-server]
require('mason').setup({})
require('mason-lspconfig').setup({
handlers = {
function(server_name)
require('lspconfig')[server_name].setup({})
end
}
})
-- CMP
local cmp = require('cmp')
local cmp_action = lsp_zero.cmp_action()
require('luasnip.loaders.from_vscode').lazy_load()
cmp.setup({
completion = { completeopt = 'menu,menuone,noinsert' }, -- Select first suggestion
sources = {
-- Mimic vscode suggestions
{name = 'nvim_lsp'},
{name = 'buffer', keyword_length = 2},
{name = 'luasnip', keyword_length = 2},
{name = 'path'}
},
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end
},
view = { docs = { auto_open = false } }, -- Docs closed by default
mapping = cmp.mapping.preset.insert({
['<Enter>'] = cmp.mapping.confirm({ select = true }),
['<C-Space>'] = cmp.mapping(function() -- Double press due TMUX (same vscode)
if cmp.visible_docs() then cmp.close_docs() else cmp.open_docs() end
end)
}),
formatting = lsp_zero.cmp_format({details = false})
})
-- AUTO-COMMANDS
vim.cmd("command BufOnly silent! execute '%bd|e#|bd#'") -- Close all buffers except current
vim.cmd("autocmd CursorHold * echon ''") -- Clear command line - uses 'updatetime' value - FIND WAY TO TOGGLE IT
vim.cmd("highlight incsearch guibg=#5c5c5e guifg=#e6e3de") -- Set search highlight when using
-- Yank highlighting
vim.cmd("autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup='YankHighlight', timeout=190}")
vim.cmd("highlight YankHighlight guibg=#2b2b2b guifg=#e6e3de")
-- No auto-comment when using motions like 'o'
vim.cmd("autocmd BufEnter * set formatoptions-=cro")
vim.cmd("autocmd BufEnter * setlocal formatoptions-=cro")
-- Rename tmux window
vim.cmd([[autocmd VimEnter * silent !tmux rename-window "nvim"]])
vim.cmd([[autocmd VimLeave * silent !tmux rename-window "tmux"]])
local wezterm = require 'wezterm'
local config = {}
if wezterm.config_builder then config = wezterm.config_builder() end
-- General
config.default_domain = 'WSL:Ubuntu'
config.window_decorations = "RESIZE"
config.enable_tab_bar = false --[[ true - TMUX ]]
config.color_scheme = 'Dark+'
config.font = wezterm.font 'JetBrains Mono NL Slashed'
config.font_size = 14.0
config.scrollback_lines = 1000
config.animation_fps = 0
config.cursor_blink_rate = 0
-- Window
config.window_padding = {
left = 2, --[[ 1 - TMUX ]]
right = 0,
top = 2,
bottom = 0,
}
config.foreground_text_hsb = {
saturation = 1.03,
brightness = 1.2,
}
-- Colors
-- Follows GruvDark palette
config.colors = {
tab_bar = {
background = '#313131', },
foreground = '#CDC5B8',
background = '#1E1E1E',
cursor_bg = '#c6c5c5',
cursor_fg = '#1E1E1E',
cursor_border = '#c6c5c5',
selection_fg = '#1E1E1E',
selection_bg = '#A9A9A9',
scrollbar_thumb = '#4F4F4F',
split = '#4F4F4F',
ansi = {
'#4F4F4F', -- black
'#DB6A6A', -- red
'#76B568', -- green
'#D19F66', -- yellow
'#5B98C9', -- blue
'#CD60B9', -- purple
'#4DB0BD', -- cyan
'#CDC5B8', -- white
},
brights = {
'#4F4F4F', -- brightBlack
'#DB6A6A', -- brightRed
'#76B568', -- brightGreen
'#D19F66', -- brightYellow
'#5B98C9', -- brightBlue
'#CD60B9', -- brightPurple
'#4DB0BD', -- brightCyan
'#CDC5B8', -- brightWhite
},
indexed = {},
copy_mode_active_highlight_bg = { Color = '#1E1E1E' },
copy_mode_active_highlight_fg = { Color = '#CDC5B8' },
copy_mode_inactive_highlight_bg = { Color = '#76B568' },
copy_mode_inactive_highlight_fg = { Color = '#CDC5B8' },
quick_select_label_bg = { Color = '#D19F66' },
quick_select_label_fg = { Color = '#CDC5B8' },
quick_select_match_bg = { Color = '#5B98C9' },
quick_select_match_fg = { Color = '#CDC5B8' },
}
-- Bindings
-- config.leader = { key = 'Space', mods = 'CTRL' } --[[ TMUX ]]
config.keys = {
{ key = 'v', mods = 'CTRL', action = wezterm.action{ PasteFrom="Clipboard" } },
{ key = 'c', mods = 'CTRL', action = wezterm.action{ CopyTo="Clipboard" } },
--[[ TMUX ]]
-- { key = '0', mods = 'LEADER', action = wezterm.action.ActivateTab(0) },
-- { key = '1', mods = 'LEADER', action = wezterm.action.ActivateTab(1) },
-- { key = '2', mods = 'LEADER', action = wezterm.action.ActivateTab(2) },
-- { key = '3', mods = 'LEADER', action = wezterm.action.ActivateTab(3) },
-- { key = '4', mods = 'LEADER', action = wezterm.action.ActivateTab(4) },
-- { key = '5', mods = 'LEADER', action = wezterm.action.ActivateTab(5) },
-- { key = 'l', mods = 'LEADER', action = wezterm.action.ActivateLastTab },
-- { key = 'c', mods = 'LEADER', action = wezterm.action{SpawnTab="CurrentPaneDomain"} },
-- { key = 'd', mods = 'LEADER', action = wezterm.action{CloseCurrentTab={confirm=true}} },
}
--[[ TMUX ]]
-- config.tab_bar_at_bottom = true
-- config.use_fancy_tab_bar = false
-- config.show_new_tab_button_in_tab_bar = false
-- config.tab_and_split_indices_are_zero_based = true
-- config.enable_scroll_bar = false
-- function tab_title(tab_info)
-- local title = tab_info.tab_title
-- if title and #title > 0 then
-- return title
-- end
-- return tab_info.tab_index .. ":" .. wezterm.truncate_right(tab_info.active_pane.title, 4)
-- end
-- wezterm.on(
-- 'format-tab-title',
-- function(tab, tabs, panes, config, hover, max_width)
-- local title = tab_title(tab)
-- if tab.is_active then
-- title = title .. "*"
-- end
-- return {
-- { Background = { Color = '#313131' } },
-- { Foreground = { Color = '#CDC5B8' } },
-- { Text = ' ' .. title .. ' ' },
-- }
-- end
-- )
-- wezterm.on('update-right-status', function(window, pane)
-- local date = wezterm.strftime '%m-%d-%y %H:%M '
-- window:set_right_status(wezterm.format {
-- { Text ="[dev] ".. date },
-- })
-- window:set_left_status(wezterm.format {
-- { Text =""},
-- })
-- end)
return config
# =============== #
# gruvdark.vifm
# ~/.config/vifm/colors
# =============== #
highlight clear
highlight Win cterm=none ctermfg=default ctermbg=default
highlight OtherWin cterm=none ctermfg=default ctermbg=default
highlight TopLine cterm=none ctermfg=default ctermbg=236
highlight TopLineSel cterm=bold ctermfg=default ctermbg=236
highlight JobLine cterm=bold ctermfg=default ctermbg=236
highlight StatusLine cterm=none ctermfg=default ctermbg=236
highlight Border cterm=none ctermfg=default ctermbg=default
highlight Selected cterm=bold ctermfg=default ctermbg=237
highlight CurrLine cterm=reverse ctermfg=default ctermbg=default
highlight WildMenu cterm=underline,reverse ctermfg=11 ctermbg=white
highlight CmdLine cterm=none ctermfg=default ctermbg=default
highlight ErrorMsg cterm=none ctermfg=red ctermbg=default
highlight Directory cterm=none ctermfg=blue ctermbg=default
highlight Link cterm=none ctermfg=green ctermbg=default
highlight BrokenLink cterm=none ctermfg=red ctermbg=default
highlight Socket cterm=none ctermfg=red ctermbg=default
highlight Device cterm=none ctermfg=yellow ctermbg=default
highlight Fifo cterm=none ctermfg=cyan ctermbg=default
highlight Executable cterm=none ctermfg=green ctermbg=default
# =============== #
# color_test
# ~/bin
# =============== #
#!/bin/bash
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
T='gYw' # The test text
echo -e "\n 40m 41m 42m 43m\
44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
' 36m' '1;36m' ' 37m' '1;37m';
do FG=${FGs// /}
echo -en " $FGs \033[$FG $T "
for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
done
echo;
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment