Compare commits
2 Commits
3c8c7d699b
...
10714e9258
Author | SHA1 | Date | |
---|---|---|---|
10714e9258 | |||
b178f8c58f |
466
config/.config/nvim/plugin/packer_compiled.lua
Normal file
466
config/.config/nvim/plugin/packer_compiled.lua
Normal file
@ -0,0 +1,466 @@
|
|||||||
|
-- Automatically generated packer.nvim plugin loader code
|
||||||
|
|
||||||
|
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||||
|
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_command('packadd packer.nvim')
|
||||||
|
|
||||||
|
local no_errors, error_msg = pcall(function()
|
||||||
|
|
||||||
|
_G._packer = _G._packer or {}
|
||||||
|
_G._packer.inside_compile = true
|
||||||
|
|
||||||
|
local time
|
||||||
|
local profile_info
|
||||||
|
local should_profile = false
|
||||||
|
if should_profile then
|
||||||
|
local hrtime = vim.loop.hrtime
|
||||||
|
profile_info = {}
|
||||||
|
time = function(chunk, start)
|
||||||
|
if start then
|
||||||
|
profile_info[chunk] = hrtime()
|
||||||
|
else
|
||||||
|
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
time = function(chunk, start) end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function save_profiles(threshold)
|
||||||
|
local sorted_times = {}
|
||||||
|
for chunk_name, time_taken in pairs(profile_info) do
|
||||||
|
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||||
|
end
|
||||||
|
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||||
|
local results = {}
|
||||||
|
for i, elem in ipairs(sorted_times) do
|
||||||
|
if not threshold or threshold and elem[2] > threshold then
|
||||||
|
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if threshold then
|
||||||
|
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
|
||||||
|
end
|
||||||
|
|
||||||
|
_G._packer.profile_output = results
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[Luarocks path setup]], true)
|
||||||
|
local package_path_str = "/usr/local/google/home/cnieves/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/usr/local/google/home/cnieves/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/usr/local/google/home/cnieves/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/usr/local/google/home/cnieves/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||||
|
local install_cpath_pattern = "/usr/local/google/home/cnieves/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
||||||
|
if not string.find(package.path, package_path_str, 1, true) then
|
||||||
|
package.path = package.path .. ';' .. package_path_str
|
||||||
|
end
|
||||||
|
|
||||||
|
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
||||||
|
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[Luarocks path setup]], false)
|
||||||
|
time([[try_loadstring definition]], true)
|
||||||
|
local function try_loadstring(s, component, name)
|
||||||
|
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||||
|
if not success then
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[try_loadstring definition]], false)
|
||||||
|
time([[Defining packer_plugins]], true)
|
||||||
|
_G.packer_plugins = {
|
||||||
|
LuaSnip = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||||
|
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||||
|
},
|
||||||
|
MatchTagAlways = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/MatchTagAlways",
|
||||||
|
url = "https://github.com/Valloric/MatchTagAlways"
|
||||||
|
},
|
||||||
|
["asyncrun.vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/asyncrun.vim",
|
||||||
|
url = "https://github.com/skywind3000/asyncrun.vim"
|
||||||
|
},
|
||||||
|
["auto-session"] = {
|
||||||
|
config = { "\27LJ\2\n<EFBFBD>\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\1K\0\1\0\31auto_session_suppress_dirs\1\4\0\0\a~/\16~/Downloads\6/\1\0\1\14log_level\nerror\nsetup\17auto-session\frequire\0" },
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/auto-session",
|
||||||
|
url = "https://github.com/rmagatti/auto-session"
|
||||||
|
},
|
||||||
|
catppuccin = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/catppuccin",
|
||||||
|
url = "https://github.com/catppuccin/nvim"
|
||||||
|
},
|
||||||
|
["cmp-buffer"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||||
|
},
|
||||||
|
["cmp-cmdline"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-cmdline"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lsp"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lsp-document-symbol"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-document-symbol",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp-document-symbol"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lsp-signature-help"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lua"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lua"
|
||||||
|
},
|
||||||
|
["cmp-path"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-path"
|
||||||
|
},
|
||||||
|
["cmp-under-comparator"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-under-comparator",
|
||||||
|
url = "https://github.com/lukas-reineke/cmp-under-comparator"
|
||||||
|
},
|
||||||
|
["cmp-vsnip"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-vsnip",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-vsnip"
|
||||||
|
},
|
||||||
|
cmp_luasnip = {
|
||||||
|
after_files = { "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/cmp_luasnip/after/plugin/cmp_luasnip.lua" },
|
||||||
|
load_after = {},
|
||||||
|
loaded = true,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/cmp_luasnip",
|
||||||
|
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||||
|
},
|
||||||
|
["fidget.nvim"] = {
|
||||||
|
config = { 'require("fidget").setup()' },
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/fidget.nvim",
|
||||||
|
url = "https://github.com/j-hui/fidget.nvim"
|
||||||
|
},
|
||||||
|
["fzf.vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/fzf.vim",
|
||||||
|
url = "https://github.com/junegunn/fzf.vim"
|
||||||
|
},
|
||||||
|
["git-conflict.nvim"] = {
|
||||||
|
config = { "require('git-conflict').setup()" },
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/git-conflict.nvim",
|
||||||
|
url = "https://github.com/akinsho/git-conflict.nvim"
|
||||||
|
},
|
||||||
|
["gitsigns.nvim"] = {
|
||||||
|
config = { "require('config.gitsigns')" },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim",
|
||||||
|
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
|
},
|
||||||
|
["java-syntax.vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/java-syntax.vim",
|
||||||
|
url = "https://github.com/squk/java-syntax.vim"
|
||||||
|
},
|
||||||
|
["kotlin-vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/kotlin-vim",
|
||||||
|
url = "https://github.com/udalov/kotlin-vim"
|
||||||
|
},
|
||||||
|
["lsp_lines.nvim"] = {
|
||||||
|
config = { 'require("lsp_lines").setup()' },
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/lsp_lines.nvim",
|
||||||
|
url = "https://github.com/ErichDonGubler/lsp_lines.nvim"
|
||||||
|
},
|
||||||
|
["lspkind.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/lspkind.nvim",
|
||||||
|
url = "https://github.com/onsails/lspkind.nvim"
|
||||||
|
},
|
||||||
|
["lualine.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||||
|
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
|
},
|
||||||
|
["mkdir.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/mkdir.nvim",
|
||||||
|
url = "https://github.com/jghauser/mkdir.nvim"
|
||||||
|
},
|
||||||
|
neogit = {
|
||||||
|
commands = { "Neogit" },
|
||||||
|
config = { "require('config.neogit')" },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = true,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/neogit",
|
||||||
|
url = "https://github.com/TimUntersberger/neogit"
|
||||||
|
},
|
||||||
|
nerdcommenter = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nerdcommenter",
|
||||||
|
url = "https://github.com/scrooloose/nerdcommenter"
|
||||||
|
},
|
||||||
|
nerdtree = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nerdtree",
|
||||||
|
url = "https://github.com/preservim/nerdtree"
|
||||||
|
},
|
||||||
|
["nvim-cmp"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||||
|
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||||
|
},
|
||||||
|
["nvim-lightbulb"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-lightbulb",
|
||||||
|
url = "https://github.com/kosayoda/nvim-lightbulb"
|
||||||
|
},
|
||||||
|
["nvim-lspconfig"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
|
},
|
||||||
|
["nvim-notify"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-notify",
|
||||||
|
url = "https://github.com/rcarriga/nvim-notify"
|
||||||
|
},
|
||||||
|
["nvim-scrollbar"] = {
|
||||||
|
config = { 'require("scrollbar").setup()' },
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-scrollbar",
|
||||||
|
url = "https://github.com/petertriho/nvim-scrollbar"
|
||||||
|
},
|
||||||
|
["nvim-treesitter"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||||
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
|
},
|
||||||
|
["nvim-web-devicons"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
|
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
["packer.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||||
|
url = "https://github.com/wbthomason/packer.nvim"
|
||||||
|
},
|
||||||
|
["plenary.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||||
|
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
["registers.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/registers.nvim",
|
||||||
|
url = "https://github.com/tversteeg/registers.nvim"
|
||||||
|
},
|
||||||
|
["symbols-outline.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
|
||||||
|
url = "https://github.com/simrat39/symbols-outline.nvim"
|
||||||
|
},
|
||||||
|
["telescope-codesearch.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/telescope-codesearch.nvim",
|
||||||
|
url = "sso://googler@user/vintharas/telescope-codesearch.nvim"
|
||||||
|
},
|
||||||
|
["telescope.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
["trouble.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/trouble.nvim",
|
||||||
|
url = "https://github.com/folke/trouble.nvim"
|
||||||
|
},
|
||||||
|
undotree = {
|
||||||
|
commands = { "UndotreeToggle" },
|
||||||
|
config = { "vim.g.undotree_SetFocusWhenToggle = 1" },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/undotree",
|
||||||
|
url = "https://github.com/mbbill/undotree"
|
||||||
|
},
|
||||||
|
["vim-better-whitespace"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-better-whitespace",
|
||||||
|
url = "https://github.com/ntpeters/vim-better-whitespace"
|
||||||
|
},
|
||||||
|
["vim-case-convert"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-case-convert",
|
||||||
|
url = "https://github.com/chiedo/vim-case-convert"
|
||||||
|
},
|
||||||
|
["vim-gitgutter"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
|
||||||
|
url = "https://github.com/airblade/vim-gitgutter"
|
||||||
|
},
|
||||||
|
["vim-indent-guides"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-indent-guides",
|
||||||
|
url = "https://github.com/nathanaelkane/vim-indent-guides"
|
||||||
|
},
|
||||||
|
["vim-matchup"] = {
|
||||||
|
after_files = { "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/vim-matchup/after/plugin/matchit.vim" },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = true,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/vim-matchup",
|
||||||
|
url = "https://github.com/andymass/vim-matchup"
|
||||||
|
},
|
||||||
|
["vim-nerdtree-syntax-highlight"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-nerdtree-syntax-highlight",
|
||||||
|
url = "https://github.com/tiagofumo/vim-nerdtree-syntax-highlight"
|
||||||
|
},
|
||||||
|
["vim-obsession"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-obsession",
|
||||||
|
url = "https://github.com/tpope/vim-obsession"
|
||||||
|
},
|
||||||
|
["vim-quantum"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-quantum",
|
||||||
|
url = "https://github.com/squk/vim-quantum"
|
||||||
|
},
|
||||||
|
["vim-ripgrep"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-ripgrep",
|
||||||
|
url = "https://github.com/jremmen/vim-ripgrep"
|
||||||
|
},
|
||||||
|
["vim-signify"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-signify",
|
||||||
|
url = "https://github.com/mhinz/vim-signify"
|
||||||
|
},
|
||||||
|
["vim-surround"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-surround",
|
||||||
|
url = "https://github.com/tpope/vim-surround"
|
||||||
|
},
|
||||||
|
["vim-titlecase"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-titlecase",
|
||||||
|
url = "https://github.com/christoomey/vim-titlecase"
|
||||||
|
},
|
||||||
|
["vim-tmux"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-tmux",
|
||||||
|
url = "https://github.com/tmux-plugins/vim-tmux"
|
||||||
|
},
|
||||||
|
["vim-tmux-focus-events"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-tmux-focus-events",
|
||||||
|
url = "https://github.com/tmux-plugins/vim-tmux-focus-events"
|
||||||
|
},
|
||||||
|
["vim-tmux-navigator"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator",
|
||||||
|
url = "https://github.com/christoomey/vim-tmux-navigator"
|
||||||
|
},
|
||||||
|
["vim-tmux-syntax"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-tmux-syntax",
|
||||||
|
url = "https://github.com/whatyouhide/vim-tmux-syntax"
|
||||||
|
},
|
||||||
|
["vim-vsnip"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-vsnip",
|
||||||
|
url = "https://github.com/hrsh7th/vim-vsnip"
|
||||||
|
},
|
||||||
|
["vim-windowswap"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-windowswap",
|
||||||
|
url = "https://github.com/wesQ3/vim-windowswap"
|
||||||
|
},
|
||||||
|
vimux = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vimux",
|
||||||
|
url = "https://github.com/preservim/vimux"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
time([[Defining packer_plugins]], false)
|
||||||
|
-- Config for: nvim-scrollbar
|
||||||
|
time([[Config for nvim-scrollbar]], true)
|
||||||
|
require("scrollbar").setup()
|
||||||
|
time([[Config for nvim-scrollbar]], false)
|
||||||
|
-- Config for: lsp_lines.nvim
|
||||||
|
time([[Config for lsp_lines.nvim]], true)
|
||||||
|
require("lsp_lines").setup()
|
||||||
|
time([[Config for lsp_lines.nvim]], false)
|
||||||
|
-- Config for: fidget.nvim
|
||||||
|
time([[Config for fidget.nvim]], true)
|
||||||
|
require("fidget").setup()
|
||||||
|
time([[Config for fidget.nvim]], false)
|
||||||
|
-- Config for: auto-session
|
||||||
|
time([[Config for auto-session]], true)
|
||||||
|
try_loadstring("\27LJ\2\n<EFBFBD>\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\1K\0\1\0\31auto_session_suppress_dirs\1\4\0\0\a~/\16~/Downloads\6/\1\0\1\14log_level\nerror\nsetup\17auto-session\frequire\0", "config", "auto-session")
|
||||||
|
time([[Config for auto-session]], false)
|
||||||
|
-- Config for: git-conflict.nvim
|
||||||
|
time([[Config for git-conflict.nvim]], true)
|
||||||
|
require('git-conflict').setup()
|
||||||
|
time([[Config for git-conflict.nvim]], false)
|
||||||
|
-- Load plugins in order defined by `after`
|
||||||
|
time([[Sequenced loading]], true)
|
||||||
|
vim.cmd [[ packadd LuaSnip ]]
|
||||||
|
vim.cmd [[ packadd cmp_luasnip ]]
|
||||||
|
time([[Sequenced loading]], false)
|
||||||
|
|
||||||
|
-- Command lazy-loads
|
||||||
|
time([[Defining lazy-load commands]], true)
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file UndotreeToggle lua require("packer.load")({'undotree'}, { cmd = "UndotreeToggle", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Neogit lua require("packer.load")({'neogit'}, { cmd = "Neogit", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
time([[Defining lazy-load commands]], false)
|
||||||
|
|
||||||
|
vim.cmd [[augroup packer_load_aucmds]]
|
||||||
|
vim.cmd [[au!]]
|
||||||
|
-- Event lazy-loads
|
||||||
|
time([[Defining lazy-load event autocommands]], true)
|
||||||
|
vim.cmd [[au VimEnter * ++once lua require("packer.load")({'vim-matchup'}, { event = "VimEnter *" }, _G.packer_plugins)]]
|
||||||
|
vim.cmd [[au User ActuallyEditing ++once lua require("packer.load")({'gitsigns.nvim'}, { event = "User ActuallyEditing" }, _G.packer_plugins)]]
|
||||||
|
time([[Defining lazy-load event autocommands]], false)
|
||||||
|
vim.cmd("augroup END")
|
||||||
|
|
||||||
|
_G._packer.inside_compile = false
|
||||||
|
if _G._packer.needs_bufread == true then
|
||||||
|
vim.cmd("doautocmd BufRead")
|
||||||
|
end
|
||||||
|
_G._packer.needs_bufread = false
|
||||||
|
|
||||||
|
if should_profile then save_profiles() end
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
if not no_errors then
|
||||||
|
error_msg = error_msg:gsub('"', '\\"')
|
||||||
|
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||||
|
end
|
@ -95,11 +95,7 @@ bind-key C-a set-option -g prefix C-a
|
|||||||
# No delay for escape key press
|
# No delay for escape key press
|
||||||
set -sg escape-time 0
|
set -sg escape-time 0
|
||||||
|
|
||||||
setw -g window-status-format "#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #W "
|
|
||||||
setw -g window-status-current-format "#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #W "
|
|
||||||
|
|
||||||
# List of plugins
|
# List of plugins
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
@ -107,9 +103,10 @@ set -g @plugin 'christoomey/vim-tmux-navigator'
|
|||||||
set -g @plugin 'tmux-plugins/tmux-cpu'
|
set -g @plugin 'tmux-plugins/tmux-cpu'
|
||||||
set -g @plugin 'tmux-plugins/tmux-battery'
|
set -g @plugin 'tmux-plugins/tmux-battery'
|
||||||
set -g @plugin 'tmux-plugins/tmux-cowboy' # Kill process in pane w/ prefix+*
|
set -g @plugin 'tmux-plugins/tmux-cowboy' # Kill process in pane w/ prefix+*
|
||||||
|
set -g @plugin 'catppuccin/tmux'
|
||||||
#set -g @plugin 'odedlaz/tmux-onedark-theme'
|
#set -g @plugin 'odedlaz/tmux-onedark-theme'
|
||||||
|
|
||||||
# set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
|
set -g @catppuccin_flavour 'macchiato' # or frappe, macchiato, mocha
|
||||||
|
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||||
run '~/.tmux/plugins/tpm/tpm'
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
Submodule tmux/.tmux/plugins/tmux deleted from d9e5c6d1e3
12
tmux/.tmux/plugins/tmux-cpu/.github/workflows/check.yml
vendored
Normal file
12
tmux/.tmux/plugins/tmux-cpu/.github/workflows/check.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: Check
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: luizm/action-sh-checker@master
|
||||||
|
env:
|
||||||
|
SHELLCHECK_OPTS: -x
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
source "$CURRENT_DIR/scripts/helpers.sh"
|
source "$CURRENT_DIR/scripts/helpers.sh"
|
||||||
|
|
||||||
@ -65,16 +65,19 @@ set_tmux_option() {
|
|||||||
|
|
||||||
do_interpolation() {
|
do_interpolation() {
|
||||||
local all_interpolated="$1"
|
local all_interpolated="$1"
|
||||||
for ((i=0; i<${#cpu_commands[@]}; i++)); do
|
for ((i = 0; i < ${#cpu_commands[@]}; i++)); do
|
||||||
all_interpolated=${all_interpolated//${cpu_interpolation[$i]}/${cpu_commands[$i]}}
|
all_interpolated=${all_interpolated//${cpu_interpolation[$i]}/${cpu_commands[$i]}}
|
||||||
done
|
done
|
||||||
echo "$all_interpolated"
|
echo "$all_interpolated"
|
||||||
}
|
}
|
||||||
|
|
||||||
update_tmux_option() {
|
update_tmux_option() {
|
||||||
local option=$1
|
local option
|
||||||
local option_value=$(get_tmux_option "$option")
|
local option_value
|
||||||
local new_option_value=$(do_interpolation "$option_value")
|
local new_option_value
|
||||||
|
option=$1
|
||||||
|
option_value=$(get_tmux_option "$option")
|
||||||
|
new_option_value=$(do_interpolation "$option_value")
|
||||||
set_tmux_option "$option" "$new_option_value"
|
set_tmux_option "$option" "$new_option_value"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
cpu_low_bg_color=""
|
cpu_low_bg_color=""
|
||||||
@ -19,13 +20,15 @@ get_bg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_bg_color() {
|
print_bg_color() {
|
||||||
local cpu_percentage=$($CURRENT_DIR/cpu_percentage.sh | sed -e 's/%//')
|
local cpu_percentage
|
||||||
local load_status=$(load_status $cpu_percentage)
|
local load_status
|
||||||
if [ $load_status == "low" ]; then
|
cpu_percentage=$("$CURRENT_DIR"/cpu_percentage.sh | sed -e 's/%//')
|
||||||
|
load_status=$(load_status "$cpu_percentage" "cpu")
|
||||||
|
if [ "$load_status" == "low" ]; then
|
||||||
echo "$cpu_low_bg_color"
|
echo "$cpu_low_bg_color"
|
||||||
elif [ $load_status == "medium" ]; then
|
elif [ "$load_status" == "medium" ]; then
|
||||||
echo "$cpu_medium_bg_color"
|
echo "$cpu_medium_bg_color"
|
||||||
elif [ $load_status == "high" ]; then
|
elif [ "$load_status" == "high" ]; then
|
||||||
echo "$cpu_high_bg_color"
|
echo "$cpu_high_bg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -34,4 +37,4 @@ main() {
|
|||||||
get_bg_color_settings
|
get_bg_color_settings
|
||||||
print_bg_color
|
print_bg_color
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
cpu_low_fg_color=""
|
cpu_low_fg_color=""
|
||||||
@ -19,13 +20,15 @@ get_fg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_fg_color() {
|
print_fg_color() {
|
||||||
local cpu_percentage=$($CURRENT_DIR/cpu_percentage.sh | sed -e 's/%//')
|
local cpu_percentage
|
||||||
local load_status=$(load_status $cpu_percentage)
|
local load_status
|
||||||
if [ $load_status == "low" ]; then
|
cpu_percentage=$("$CURRENT_DIR"/cpu_percentage.sh | sed -e 's/%//')
|
||||||
|
load_status=$(load_status "$cpu_percentage" "cpu")
|
||||||
|
if [ "$load_status" == "low" ]; then
|
||||||
echo "$cpu_low_fg_color"
|
echo "$cpu_low_fg_color"
|
||||||
elif [ $load_status == "medium" ]; then
|
elif [ "$load_status" == "medium" ]; then
|
||||||
echo "$cpu_medium_fg_color"
|
echo "$cpu_medium_fg_color"
|
||||||
elif [ $load_status == "high" ]; then
|
elif [ "$load_status" == "high" ]; then
|
||||||
echo "$cpu_high_fg_color"
|
echo "$cpu_high_fg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -34,4 +37,4 @@ main() {
|
|||||||
get_fg_color_settings
|
get_fg_color_settings
|
||||||
print_fg_color
|
print_fg_color
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
# script global variables
|
# script global variables
|
||||||
@ -21,13 +22,15 @@ get_icon_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_icon() {
|
print_icon() {
|
||||||
local cpu_percentage=$($CURRENT_DIR/cpu_percentage.sh | sed -e 's/%//')
|
local cpu_percentage
|
||||||
local load_status=$(load_status $cpu_percentage)
|
local load_status
|
||||||
if [ $load_status == "low" ]; then
|
cpu_percentage=$("$CURRENT_DIR"/cpu_percentage.sh | sed -e 's/%//')
|
||||||
|
load_status=$(load_status "$cpu_percentage" "cpu")
|
||||||
|
if [ "$load_status" == "low" ]; then
|
||||||
echo "$cpu_low_icon"
|
echo "$cpu_low_icon"
|
||||||
elif [ $load_status == "medium" ]; then
|
elif [ "$load_status" == "medium" ]; then
|
||||||
echo "$cpu_medium_icon"
|
echo "$cpu_medium_icon"
|
||||||
elif [ $load_status == "high" ]; then
|
elif [ "$load_status" == "high" ]; then
|
||||||
echo "$cpu_high_icon"
|
echo "$cpu_high_icon"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -36,4 +39,4 @@ main() {
|
|||||||
get_icon_settings
|
get_icon_settings
|
||||||
print_icon "$1"
|
print_icon "$1"
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
cpu_percentage_format="%3.1f%%"
|
cpu_percentage_format="%3.1f%%"
|
||||||
@ -25,9 +26,10 @@ print_cpu_percentage() {
|
|||||||
else
|
else
|
||||||
if is_cygwin; then
|
if is_cygwin; then
|
||||||
usage="$(cached_eval WMIC cpu get LoadPercentage | grep -Eo '^[0-9]+')"
|
usage="$(cached_eval WMIC cpu get LoadPercentage | grep -Eo '^[0-9]+')"
|
||||||
|
# shellcheck disable=SC2059
|
||||||
printf "$cpu_percentage_format" "$usage"
|
printf "$cpu_percentage_format" "$usage"
|
||||||
else
|
else
|
||||||
load=`cached_eval ps -aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}'`
|
load=$(cached_eval ps -aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}')
|
||||||
cpus=$(cpus_number)
|
cpus=$(cpus_number)
|
||||||
echo "$load $cpus" | awk -v format="$cpu_percentage_format" '{printf format, $1/$2}'
|
echo "$load $cpus" | awk -v format="$cpu_percentage_format" '{printf format, $1/$2}'
|
||||||
fi
|
fi
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
cpu_temp_format="%2.0f"
|
cpu_temp_format="%2.0f"
|
||||||
@ -11,7 +12,13 @@ print_cpu_temp() {
|
|||||||
cpu_temp_format=$(get_tmux_option "@cpu_temp_format" "$cpu_temp_format")
|
cpu_temp_format=$(get_tmux_option "@cpu_temp_format" "$cpu_temp_format")
|
||||||
cpu_temp_unit=$(get_tmux_option "@cpu_temp_unit" "$cpu_temp_unit")
|
cpu_temp_unit=$(get_tmux_option "@cpu_temp_unit" "$cpu_temp_unit")
|
||||||
if command_exists "sensors"; then
|
if command_exists "sensors"; then
|
||||||
([ "$cpu_temp_unit" == F ] && sensors -f || sensors) | sed -e 's/^Tccd/Core /' | awk -v format="$cpu_temp_format$cpu_temp_unit" '/^Core [0-9]+/ {gsub("[^0-9.]", "", $3); sum+=$3; n+=1} END {printf(format, sum/n)}'
|
local val
|
||||||
|
if [[ "$cpu_temp_unit" == F ]]; then
|
||||||
|
val="$(sensors -f)"
|
||||||
|
else
|
||||||
|
val="$(sensors)"
|
||||||
|
fi
|
||||||
|
echo "$val" | sed -e 's/^Tccd/Core /' | awk -v format="$cpu_temp_format$cpu_temp_unit" '/^Core [0-9]+/ {gsub("[^0-9.]", "", $3); sum+=$3; n+=1} END {printf(format, sum/n)}'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
cpu_temp_low_bg_color=""
|
cpu_temp_low_bg_color=""
|
||||||
@ -19,13 +20,15 @@ get_bg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_bg_color() {
|
print_bg_color() {
|
||||||
local cpu_temp=$($CURRENT_DIR/cpu_temp.sh | sed -e 's/[^0-9.]//')
|
local cpu_temp
|
||||||
local cpu_temp_status=$(temp_status $cpu_temp)
|
local cpu_temp_status
|
||||||
if [ $cpu_temp_status == "low" ]; then
|
cpu_temp=$("$CURRENT_DIR"/cpu_temp.sh | sed -e 's/[^0-9.]//')
|
||||||
|
cpu_temp_status=$(temp_status "$cpu_temp")
|
||||||
|
if [ "$cpu_temp_status" == "low" ]; then
|
||||||
echo "$cpu_temp_low_bg_color"
|
echo "$cpu_temp_low_bg_color"
|
||||||
elif [ $cpu_temp_status == "medium" ]; then
|
elif [ "$cpu_temp_status" == "medium" ]; then
|
||||||
echo "$cpu_temp_medium_bg_color"
|
echo "$cpu_temp_medium_bg_color"
|
||||||
elif [ $cpu_temp_status == "high" ]; then
|
elif [ "$cpu_temp_status" == "high" ]; then
|
||||||
echo "$cpu_temp_high_bg_color"
|
echo "$cpu_temp_high_bg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
cpu_temp_low_fg_color=""
|
cpu_temp_low_fg_color=""
|
||||||
@ -19,13 +20,15 @@ get_fg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_fg_color() {
|
print_fg_color() {
|
||||||
local cpu_temp=$($CURRENT_DIR/cpu_temp.sh | sed -e 's/[^0-9.]//')
|
local cpu_temp
|
||||||
local cpu_temp_status=$(temp_status $cpu_temp)
|
local cpu_temp_status
|
||||||
if [ $cpu_temp_status == "low" ]; then
|
cpu_temp=$("$CURRENT_DIR"/cpu_temp.sh | sed -e 's/[^0-9.]//')
|
||||||
|
cpu_temp_status=$(temp_status "$cpu_temp")
|
||||||
|
if [ "$cpu_temp_status" == "low" ]; then
|
||||||
echo "$cpu_temp_low_fg_color"
|
echo "$cpu_temp_low_fg_color"
|
||||||
elif [ $cpu_temp_status == "medium" ]; then
|
elif [ "$cpu_temp_status" == "medium" ]; then
|
||||||
echo "$cpu_temp_medium_fg_color"
|
echo "$cpu_temp_medium_fg_color"
|
||||||
elif [ $cpu_temp_status == "high" ]; then
|
elif [ "$cpu_temp_status" == "high" ]; then
|
||||||
echo "$cpu_temp_high_fg_color"
|
echo "$cpu_temp_high_fg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
# script global variables
|
# script global variables
|
||||||
@ -21,13 +22,15 @@ get_icon_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_icon() {
|
print_icon() {
|
||||||
local cpu_temp=$($CURRENT_DIR/cpu_temp.sh | sed -e 's/[^0-9.]//')
|
local cpu_temp
|
||||||
local cpu_temp_status=$(temp_status $cpu_temp)
|
local cpu_temp_status
|
||||||
if [ $cpu_temp_status == "low" ]; then
|
cpu_temp=$("$CURRENT_DIR"/cpu_temp.sh | sed -e 's/[^0-9.]//')
|
||||||
|
cpu_temp_status=$(temp_status "$cpu_temp")
|
||||||
|
if [ "$cpu_temp_status" == "low" ]; then
|
||||||
echo "$cpu_temp_low_icon"
|
echo "$cpu_temp_low_icon"
|
||||||
elif [ $cpu_temp_status == "medium" ]; then
|
elif [ "$cpu_temp_status" == "medium" ]; then
|
||||||
echo "$cpu_temp_medium_icon"
|
echo "$cpu_temp_medium_icon"
|
||||||
elif [ $cpu_temp_status == "high" ]; then
|
elif [ "$cpu_temp_status" == "high" ]; then
|
||||||
echo "$cpu_temp_high_icon"
|
echo "$cpu_temp_high_icon"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -36,4 +39,4 @@ main() {
|
|||||||
get_icon_settings
|
get_icon_settings
|
||||||
print_icon "$1"
|
print_icon "$1"
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gpu_low_bg_color=""
|
gpu_low_bg_color=""
|
||||||
@ -19,13 +20,15 @@ get_bg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_bg_color() {
|
print_bg_color() {
|
||||||
local gpu_percentage=$($CURRENT_DIR/gpu_percentage.sh | sed -e 's/%//')
|
local gpu_percentage
|
||||||
local gpu_load_status=$(load_status $gpu_percentage)
|
local gpu_load_status
|
||||||
if [ $gpu_load_status == "low" ]; then
|
gpu_percentage=$("$CURRENT_DIR"/gpu_percentage.sh | sed -e 's/%//')
|
||||||
|
gpu_load_status=$(load_status "$gpu_percentage" "gpu")
|
||||||
|
if [ "$gpu_load_status" == "low" ]; then
|
||||||
echo "$gpu_low_bg_color"
|
echo "$gpu_low_bg_color"
|
||||||
elif [ $gpu_load_status == "medium" ]; then
|
elif [ "$gpu_load_status" == "medium" ]; then
|
||||||
echo "$gpu_medium_bg_color"
|
echo "$gpu_medium_bg_color"
|
||||||
elif [ $gpu_load_status == "high" ]; then
|
elif [ "$gpu_load_status" == "high" ]; then
|
||||||
echo "$gpu_high_bg_color"
|
echo "$gpu_high_bg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -34,4 +37,4 @@ main() {
|
|||||||
get_bg_color_settings
|
get_bg_color_settings
|
||||||
print_bg_color
|
print_bg_color
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gpu_low_fg_color=""
|
gpu_low_fg_color=""
|
||||||
@ -19,13 +20,15 @@ get_fg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_fg_color() {
|
print_fg_color() {
|
||||||
local gpu_percentage=$($CURRENT_DIR/gpu_percentage.sh | sed -e 's/%//')
|
local gpu_percentage
|
||||||
local gpu_load_status=$(load_status $gpu_percentage)
|
local gpu_load_status
|
||||||
if [ $gpu_load_status == "low" ]; then
|
gpu_percentage=$("$CURRENT_DIR"/gpu_percentage.sh | sed -e 's/%//')
|
||||||
|
gpu_load_status=$(load_status "$gpu_percentage" "gpu")
|
||||||
|
if [ "$gpu_load_status" == "low" ]; then
|
||||||
echo "$gpu_low_fg_color"
|
echo "$gpu_low_fg_color"
|
||||||
elif [ $gpu_load_status == "medium" ]; then
|
elif [ "$gpu_load_status" == "medium" ]; then
|
||||||
echo "$gpu_medium_fg_color"
|
echo "$gpu_medium_fg_color"
|
||||||
elif [ $gpu_load_status == "high" ]; then
|
elif [ "$gpu_load_status" == "high" ]; then
|
||||||
echo "$gpu_high_fg_color"
|
echo "$gpu_high_fg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -34,4 +37,4 @@ main() {
|
|||||||
get_fg_color_settings
|
get_fg_color_settings
|
||||||
print_fg_color
|
print_fg_color
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
# script global variables
|
# script global variables
|
||||||
@ -21,13 +22,15 @@ get_icon_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_icon() {
|
print_icon() {
|
||||||
local gpu_percentage=$($CURRENT_DIR/gpu_percentage.sh | sed -e 's/%//')
|
local gpu_percentage
|
||||||
local gpu_load_status=$(load_status $gpu_percentage)
|
local gpu_load_status
|
||||||
if [ $gpu_load_status == "low" ]; then
|
gpu_percentage=$("$CURRENT_DIR"/gpu_percentage.sh | sed -e 's/%//')
|
||||||
|
gpu_load_status=$(load_status "$gpu_percentage" "gpu")
|
||||||
|
if [ "$gpu_load_status" == "low" ]; then
|
||||||
echo "$gpu_low_icon"
|
echo "$gpu_low_icon"
|
||||||
elif [ $gpu_load_status == "medium" ]; then
|
elif [ "$gpu_load_status" == "medium" ]; then
|
||||||
echo "$gpu_medium_icon"
|
echo "$gpu_medium_icon"
|
||||||
elif [ $gpu_load_status == "high" ]; then
|
elif [ "$gpu_load_status" == "high" ]; then
|
||||||
echo "$gpu_high_icon"
|
echo "$gpu_high_icon"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -36,4 +39,4 @@ main() {
|
|||||||
get_icon_settings
|
get_icon_settings
|
||||||
print_icon "$1"
|
print_icon "$1"
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gpu_percentage_format="%3.1f%%"
|
gpu_percentage_format="%3.1f%%"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gpu_temp_format="%2.0f"
|
gpu_temp_format="%2.0f"
|
||||||
@ -20,7 +21,7 @@ print_gpu_temp() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
tempC=$(echo "$loads" | sed -nr 's/.*\s([0-9]+)C.*/\1/p' | awk '{sum+=$1; n+=1} END {printf "%5.3f", sum/n}')
|
tempC=$(echo "$loads" | sed -nr 's/.*\s([0-9]+)C.*/\1/p' | awk '{sum+=$1; n+=1} END {printf "%5.3f", sum/n}')
|
||||||
if [ $gpu_temp_unit == "C" ]; then
|
if [ "$gpu_temp_unit" == "C" ]; then
|
||||||
echo "$tempC" | awk -v format="${gpu_temp_format}C" '{sum+=$1} END {printf format, sum}'
|
echo "$tempC" | awk -v format="${gpu_temp_format}C" '{sum+=$1} END {printf format, sum}'
|
||||||
else
|
else
|
||||||
echo "$tempC" | awk -v format="${gpu_temp_format}F" '{sum+=$1} END {printf format, sum*9/5+32}'
|
echo "$tempC" | awk -v format="${gpu_temp_format}F" '{sum+=$1} END {printf format, sum*9/5+32}'
|
||||||
@ -30,4 +31,4 @@ print_gpu_temp() {
|
|||||||
main() {
|
main() {
|
||||||
print_gpu_temp
|
print_gpu_temp
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gpu_temp_low_bg_color=""
|
gpu_temp_low_bg_color=""
|
||||||
@ -19,13 +20,15 @@ get_bg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_bg_color() {
|
print_bg_color() {
|
||||||
local gpu_temp=$($CURRENT_DIR/gpu_temp.sh | sed -e 's/[^0-9.]//')
|
local gpu_temp
|
||||||
local gpu_temp_status=$(temp_status $gpu_temp)
|
local gpu_temp_status
|
||||||
if [ $gpu_temp_status == "low" ]; then
|
gpu_temp=$("$CURRENT_DIR"/gpu_temp.sh | sed -e 's/[^0-9.]//')
|
||||||
|
gpu_temp_status=$(temp_status "$gpu_temp")
|
||||||
|
if [ "$gpu_temp_status" == "low" ]; then
|
||||||
echo "$gpu_temp_low_bg_color"
|
echo "$gpu_temp_low_bg_color"
|
||||||
elif [ $gpu_temp_status == "medium" ]; then
|
elif [ "$gpu_temp_status" == "medium" ]; then
|
||||||
echo "$gpu_temp_medium_bg_color"
|
echo "$gpu_temp_medium_bg_color"
|
||||||
elif [ $gpu_temp_status == "high" ]; then
|
elif [ "$gpu_temp_status" == "high" ]; then
|
||||||
echo "$gpu_temp_high_bg_color"
|
echo "$gpu_temp_high_bg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -34,4 +37,4 @@ main() {
|
|||||||
get_bg_color_settings
|
get_bg_color_settings
|
||||||
print_bg_color
|
print_bg_color
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gpu_temp_low_fg_color=""
|
gpu_temp_low_fg_color=""
|
||||||
@ -19,13 +20,15 @@ get_fg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_fg_color() {
|
print_fg_color() {
|
||||||
local gpu_temp=$($CURRENT_DIR/gpu_temp.sh | sed -e 's/[^0-9.]//')
|
local gpu_temp
|
||||||
local gpu_temp_status=$(temp_status $gpu_temp)
|
local gpu_temp_status
|
||||||
if [ $gpu_temp_status == "low" ]; then
|
gpu_temp=$("$CURRENT_DIR"/gpu_temp.sh | sed -e 's/[^0-9.]//')
|
||||||
|
gpu_temp_status=$(temp_status "$gpu_temp")
|
||||||
|
if [ "$gpu_temp_status" == "low" ]; then
|
||||||
echo "$gpu_temp_low_fg_color"
|
echo "$gpu_temp_low_fg_color"
|
||||||
elif [ $gpu_temp_status == "medium" ]; then
|
elif [ "$gpu_temp_status" == "medium" ]; then
|
||||||
echo "$gpu_temp_medium_fg_color"
|
echo "$gpu_temp_medium_fg_color"
|
||||||
elif [ $gpu_temp_status == "high" ]; then
|
elif [ "$gpu_temp_status" == "high" ]; then
|
||||||
echo "$gpu_temp_high_fg_color"
|
echo "$gpu_temp_high_fg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -34,4 +37,4 @@ main() {
|
|||||||
get_fg_color_settings
|
get_fg_color_settings
|
||||||
print_fg_color
|
print_fg_color
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
# script global variables
|
# script global variables
|
||||||
@ -21,13 +22,15 @@ get_icon_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_icon() {
|
print_icon() {
|
||||||
local gpu_temp=$($CURRENT_DIR/gpu_temp.sh | sed -e 's/[^0-9.]//')
|
local gpu_temp
|
||||||
local gpu_temp_status=$(temp_status $gpu_temp)
|
local gpu_temp_status
|
||||||
if [ $gpu_temp_status == "low" ]; then
|
gpu_temp=$("$CURRENT_DIR"/gpu_temp.sh | sed -e 's/[^0-9.]//')
|
||||||
|
gpu_temp_status=$(temp_status "$gpu_temp")
|
||||||
|
if [ "$gpu_temp_status" == "low" ]; then
|
||||||
echo "$gpu_temp_low_icon"
|
echo "$gpu_temp_low_icon"
|
||||||
elif [ $gpu_temp_status == "medium" ]; then
|
elif [ "$gpu_temp_status" == "medium" ]; then
|
||||||
echo "$gpu_temp_medium_icon"
|
echo "$gpu_temp_medium_icon"
|
||||||
elif [ $gpu_temp_status == "high" ]; then
|
elif [ "$gpu_temp_status" == "high" ]; then
|
||||||
echo "$gpu_temp_high_icon"
|
echo "$gpu_temp_high_icon"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -36,4 +39,4 @@ main() {
|
|||||||
get_icon_settings
|
get_icon_settings
|
||||||
print_icon "$1"
|
print_icon "$1"
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gram_low_bg_color=""
|
gram_low_bg_color=""
|
||||||
@ -19,13 +20,15 @@ get_bg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_bg_color() {
|
print_bg_color() {
|
||||||
local gram_percentage=$($CURRENT_DIR/gram_percentage.sh | sed -e 's/%//')
|
local gram_percentage
|
||||||
local gram_load_status=$(load_status $gram_percentage)
|
local gram_load_status
|
||||||
if [ $gram_load_status == "low" ]; then
|
gram_percentage=$("$CURRENT_DIR"/gram_percentage.sh | sed -e 's/%//')
|
||||||
|
gram_load_status=$(load_status "$gram_percentage" "gram")
|
||||||
|
if [ "$gram_load_status" == "low" ]; then
|
||||||
echo "$gram_low_bg_color"
|
echo "$gram_low_bg_color"
|
||||||
elif [ $gram_load_status == "medium" ]; then
|
elif [ "$gram_load_status" == "medium" ]; then
|
||||||
echo "$gram_medium_bg_color"
|
echo "$gram_medium_bg_color"
|
||||||
elif [ $gram_load_status == "high" ]; then
|
elif [ "$gram_load_status" == "high" ]; then
|
||||||
echo "$gram_high_bg_color"
|
echo "$gram_high_bg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -34,4 +37,4 @@ main() {
|
|||||||
get_bg_color_settings
|
get_bg_color_settings
|
||||||
print_bg_color
|
print_bg_color
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gram_low_fg_color=""
|
gram_low_fg_color=""
|
||||||
@ -19,13 +20,15 @@ get_fg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_fg_color() {
|
print_fg_color() {
|
||||||
local gram_percentage=$($CURRENT_DIR/gram_percentage.sh | sed -e 's/%//')
|
local gram_percentage
|
||||||
local gram_load_status=$(load_status $gram_percentage)
|
local gram_load_status
|
||||||
if [ $gram_load_status == "low" ]; then
|
gram_percentage=$("$CURRENT_DIR"/gram_percentage.sh | sed -e 's/%//')
|
||||||
|
gram_load_status=$(load_status "$gram_percentage" "gram")
|
||||||
|
if [ "$gram_load_status" == "low" ]; then
|
||||||
echo "$gram_low_fg_color"
|
echo "$gram_low_fg_color"
|
||||||
elif [ $gram_load_status == "medium" ]; then
|
elif [ "$gram_load_status" == "medium" ]; then
|
||||||
echo "$gram_medium_fg_color"
|
echo "$gram_medium_fg_color"
|
||||||
elif [ $gram_load_status == "high" ]; then
|
elif [ "$gram_load_status" == "high" ]; then
|
||||||
echo "$gram_high_fg_color"
|
echo "$gram_high_fg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -34,4 +37,4 @@ main() {
|
|||||||
get_fg_color_settings
|
get_fg_color_settings
|
||||||
print_fg_color
|
print_fg_color
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
# script global variables
|
# script global variables
|
||||||
@ -21,13 +22,15 @@ get_icon_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_icon() {
|
print_icon() {
|
||||||
local gram_percentage=$($CURRENT_DIR/gram_percentage.sh | sed -e 's/%//')
|
local gram_percentage
|
||||||
local gram_load_status=$(load_status $gram_percentage)
|
local gram_load_status
|
||||||
if [ $gram_load_status == "low" ]; then
|
gram_percentage=$("$CURRENT_DIR"/gram_percentage.sh | sed -e 's/%//')
|
||||||
|
gram_load_status=$(load_status "$gram_percentage" "gram")
|
||||||
|
if [ "$gram_load_status" == "low" ]; then
|
||||||
echo "$gram_low_icon"
|
echo "$gram_low_icon"
|
||||||
elif [ $gram_load_status == "medium" ]; then
|
elif [ "$gram_load_status" == "medium" ]; then
|
||||||
echo "$gram_medium_icon"
|
echo "$gram_medium_icon"
|
||||||
elif [ $gram_load_status == "high" ]; then
|
elif [ "$gram_load_status" == "high" ]; then
|
||||||
echo "$gram_high_icon"
|
echo "$gram_high_icon"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -36,4 +39,4 @@ main() {
|
|||||||
get_icon_settings
|
get_icon_settings
|
||||||
print_icon "$1"
|
print_icon "$1"
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
gram_percentage_format="%3.1f%%"
|
gram_percentage_format="%3.1f%%"
|
||||||
@ -17,10 +18,10 @@ print_gram_percentage() {
|
|||||||
echo "No GPU"
|
echo "No GPU"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
echo "$loads" | awk -v format="$gram_percentage_format" '{used+=$1; tot+=$2} END {printf format, 100*$1/$2}'
|
echo "$loads" | awk -v format="$gram_percentage_format" '{used+=$1; tot+=$2} END {printf format, 100*used/tot}'
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
print_gram_percentage
|
print_gram_percentage
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
export LANG=C
|
export LANG=C
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
get_tmux_option() {
|
get_tmux_option() {
|
||||||
local option="$1"
|
local option
|
||||||
local default_value="$2"
|
local default_value
|
||||||
local option_value="$(tmux show-option -qv "$option")"
|
local option_value
|
||||||
|
option="$1"
|
||||||
|
default_value="$2"
|
||||||
|
option_value="$(tmux show-option -qv "$option")"
|
||||||
if [ -z "$option_value" ]; then
|
if [ -z "$option_value" ]; then
|
||||||
option_value="$(tmux show-option -gqv "$option")"
|
option_value="$(tmux show-option -gqv "$option")"
|
||||||
fi
|
fi
|
||||||
@ -16,42 +21,43 @@ get_tmux_option() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
is_osx() {
|
is_osx() {
|
||||||
[ $(uname) == "Darwin" ]
|
[ "$(uname)" == "Darwin" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
is_freebsd() {
|
is_freebsd() {
|
||||||
[ $(uname) == "FreeBSD" ]
|
[ "$(uname)" == "FreeBSD" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
is_openbsd() {
|
is_openbsd() {
|
||||||
[ $(uname) == "OpenBSD" ]
|
[ "$(uname)" == "OpenBSD" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
is_linux() {
|
is_linux() {
|
||||||
[ $(uname) == "Linux" ]
|
[ "$(uname)" == "Linux" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
is_cygwin() {
|
is_cygwin() {
|
||||||
command -v WMIC &> /dev/null
|
command -v WMIC &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
is_linux_iostat() {
|
is_linux_iostat() {
|
||||||
# Bug in early versions of linux iostat -V return error code
|
# Bug in early versions of linux iostat -V return error code
|
||||||
iostat -c &> /dev/null
|
iostat -c &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# is second float bigger or equal?
|
# is second float bigger or equal?
|
||||||
fcomp() {
|
fcomp() {
|
||||||
awk -v n1=$1 -v n2=$2 'BEGIN {if (n1<=n2) exit 0; exit 1}'
|
awk -v n1="$1" -v n2="$2" 'BEGIN {if (n1<=n2) exit 0; exit 1}'
|
||||||
}
|
}
|
||||||
|
|
||||||
load_status() {
|
load_status() {
|
||||||
local percentage=$1
|
local percentage=$1
|
||||||
cpu_medium_thresh=$(get_tmux_option "@cpu_medium_thresh" "30")
|
local prefix=$2
|
||||||
cpu_high_thresh=$(get_tmux_option "@cpu_high_thresh" "80")
|
medium_thresh=$(get_tmux_option "@${prefix}_medium_thresh" "30")
|
||||||
if fcomp $cpu_high_thresh $percentage; then
|
high_thresh=$(get_tmux_option "@${prefix}_high_thresh" "80")
|
||||||
|
if fcomp "$high_thresh" "$percentage"; then
|
||||||
echo "high"
|
echo "high"
|
||||||
elif fcomp $cpu_medium_thresh $percentage && fcomp $percentage $cpu_high_thresh; then
|
elif fcomp "$medium_thresh" "$percentage" && fcomp "$percentage" "$high_thresh"; then
|
||||||
echo "medium"
|
echo "medium"
|
||||||
else
|
else
|
||||||
echo "low"
|
echo "low"
|
||||||
@ -59,12 +65,13 @@ load_status() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
temp_status() {
|
temp_status() {
|
||||||
local temp=$1
|
local temp
|
||||||
|
temp=$1
|
||||||
cpu_temp_medium_thresh=$(get_tmux_option "@cpu_temp_medium_thresh" "80")
|
cpu_temp_medium_thresh=$(get_tmux_option "@cpu_temp_medium_thresh" "80")
|
||||||
cpu_temp_high_thresh=$(get_tmux_option "@cpu_temp_high_thresh" "90")
|
cpu_temp_high_thresh=$(get_tmux_option "@cpu_temp_high_thresh" "90")
|
||||||
if fcomp $cpu_temp_high_thresh $temp; then
|
if fcomp "$cpu_temp_high_thresh" "$temp"; then
|
||||||
echo "high"
|
echo "high"
|
||||||
elif fcomp $cpu_temp_medium_thresh $temp && fcomp $temp $cpu_temp_high_thresh; then
|
elif fcomp "$cpu_temp_medium_thresh" "$temp" && fcomp "$temp" "$cpu_temp_high_thresh"; then
|
||||||
echo "medium"
|
echo "medium"
|
||||||
else
|
else
|
||||||
echo "low"
|
echo "low"
|
||||||
@ -76,7 +83,7 @@ cpus_number() {
|
|||||||
if command_exists "nproc"; then
|
if command_exists "nproc"; then
|
||||||
nproc
|
nproc
|
||||||
else
|
else
|
||||||
echo "$(( $(sed -n 's/^processor.*:\s*\([0-9]\+\)/\1/p' /proc/cpuinfo | tail -n 1) + 1 ))"
|
echo "$(($(sed -n 's/^processor.*:\s*\([0-9]\+\)/\1/p' /proc/cpuinfo | tail -n 1) + 1))"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
sysctl -n hw.ncpu
|
sysctl -n hw.ncpu
|
||||||
@ -84,12 +91,14 @@ cpus_number() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
command_exists() {
|
command_exists() {
|
||||||
local command="$1"
|
local command
|
||||||
command -v "$command" &> /dev/null
|
command="$1"
|
||||||
|
command -v "$command" &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
get_tmp_dir() {
|
get_tmp_dir() {
|
||||||
local tmpdir="${TMPDIR:-${TMP:-${TEMP:-/tmp}}}"
|
local tmpdir
|
||||||
|
tmpdir="${TMPDIR:-${TMP:-${TEMP:-/tmp}}}"
|
||||||
[ -d "$tmpdir" ] || local tmpdir=~/tmp
|
[ -d "$tmpdir" ] || local tmpdir=~/tmp
|
||||||
echo "$tmpdir/tmux-$EUID-cpu"
|
echo "$tmpdir/tmux-$EUID-cpu"
|
||||||
}
|
}
|
||||||
@ -98,32 +107,41 @@ get_time() {
|
|||||||
date +%s.%N
|
date +%s.%N
|
||||||
}
|
}
|
||||||
|
|
||||||
get_cache_val(){
|
get_cache_val() {
|
||||||
local key="$1"
|
local key
|
||||||
|
local timeout
|
||||||
|
local cache
|
||||||
|
key="$1"
|
||||||
# seconds after which cache is invalidated
|
# seconds after which cache is invalidated
|
||||||
local timeout="${2:-2}"
|
timeout="${2:-2}"
|
||||||
local cache="$(get_tmp_dir)/$key"
|
cache="$(get_tmp_dir)/$key"
|
||||||
if [ -f "$cache" ]; then
|
if [ -f "$cache" ]; then
|
||||||
awk -v cache="$(head -n1 "$cache")" -v timeout=$timeout -v now=$(get_time) \
|
awk -v cache="$(head -n1 "$cache")" -v timeout="$timeout" -v now="$(get_time)" \
|
||||||
'BEGIN {if (now - timeout < cache) exit 0; exit 1}' \
|
'BEGIN {if (now - timeout < cache) exit 0; exit 1}' &&
|
||||||
&& tail -n+2 "$cache"
|
tail -n+2 "$cache"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
put_cache_val(){
|
put_cache_val() {
|
||||||
local key="$1"
|
local key
|
||||||
local val="${@:2}"
|
local val
|
||||||
local tmpdir="$(get_tmp_dir)"
|
local tmpdir
|
||||||
|
key="$1"
|
||||||
|
val="${*:2}"
|
||||||
|
tmpdir="$(get_tmp_dir)"
|
||||||
[ ! -d "$tmpdir" ] && mkdir -p "$tmpdir" && chmod 0700 "$tmpdir"
|
[ ! -d "$tmpdir" ] && mkdir -p "$tmpdir" && chmod 0700 "$tmpdir"
|
||||||
echo "$(get_time)" > "$tmpdir/$key"
|
get_time >"$tmpdir/$key"
|
||||||
echo -n "$val" >> "$tmpdir/$key"
|
echo -n "$val" >>"$tmpdir/$key"
|
||||||
echo -n "$val"
|
echo -n "$val"
|
||||||
}
|
}
|
||||||
|
|
||||||
cached_eval(){
|
cached_eval() {
|
||||||
local command="$1"
|
local command
|
||||||
local key="$(basename "$command")"
|
local key
|
||||||
local val="$(get_cache_val "$key")"
|
local val
|
||||||
|
command="$1"
|
||||||
|
key="$(basename "$command")"
|
||||||
|
val="$(get_cache_val "$key")"
|
||||||
if [ -z "$val" ]; then
|
if [ -z "$val" ]; then
|
||||||
put_cache_val "$key" "$($command "${@:2}")"
|
put_cache_val "$key" "$($command "${@:2}")"
|
||||||
else
|
else
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
ram_low_bg_color=""
|
ram_low_bg_color=""
|
||||||
@ -19,13 +20,15 @@ get_bg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_bg_color() {
|
print_bg_color() {
|
||||||
local ram_percentage=$($CURRENT_DIR/ram_percentage.sh | sed -e 's/%//')
|
local ram_percentage
|
||||||
local ram_load_status=$(load_status $ram_percentage)
|
local ram_load_status
|
||||||
if [ $ram_load_status == "low" ]; then
|
ram_percentage=$("$CURRENT_DIR"/ram_percentage.sh | sed -e 's/%//')
|
||||||
|
ram_load_status=$(load_status "$ram_percentage" "ram")
|
||||||
|
if [ "$ram_load_status" == "low" ]; then
|
||||||
echo "$ram_low_bg_color"
|
echo "$ram_low_bg_color"
|
||||||
elif [ $ram_load_status == "medium" ]; then
|
elif [ "$ram_load_status" == "medium" ]; then
|
||||||
echo "$ram_medium_bg_color"
|
echo "$ram_medium_bg_color"
|
||||||
elif [ $ram_load_status == "high" ]; then
|
elif [ "$ram_load_status" == "high" ]; then
|
||||||
echo "$ram_high_bg_color"
|
echo "$ram_high_bg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
ram_low_fg_color=""
|
ram_low_fg_color=""
|
||||||
@ -19,13 +20,15 @@ get_fg_color_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_fg_color() {
|
print_fg_color() {
|
||||||
local ram_percentage=$($CURRENT_DIR/ram_percentage.sh | sed -e 's/%//')
|
local ram_percentage
|
||||||
local ram_load_status=$(load_status $ram_percentage)
|
local ram_load_status
|
||||||
if [ $ram_load_status == "low" ]; then
|
ram_percentage=$("$CURRENT_DIR"/ram_percentage.sh | sed -e 's/%//')
|
||||||
|
ram_load_status=$(load_status "$ram_percentage" "ram")
|
||||||
|
if [ "$ram_load_status" == "low" ]; then
|
||||||
echo "$ram_low_fg_color"
|
echo "$ram_low_fg_color"
|
||||||
elif [ $ram_load_status == "medium" ]; then
|
elif [ "$ram_load_status" == "medium" ]; then
|
||||||
echo "$ram_medium_fg_color"
|
echo "$ram_medium_fg_color"
|
||||||
elif [ $ram_load_status == "high" ]; then
|
elif [ "$ram_load_status" == "high" ]; then
|
||||||
echo "$ram_high_fg_color"
|
echo "$ram_high_fg_color"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
# script global variables
|
# script global variables
|
||||||
@ -21,13 +22,15 @@ get_icon_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_icon() {
|
print_icon() {
|
||||||
local ram_percentage=$($CURRENT_DIR/ram_percentage.sh | sed -e 's/%//')
|
local ram_percentage
|
||||||
local ram_load_status=$(load_status $ram_percentage)
|
local ram_load_status
|
||||||
if [ $ram_load_status == "low" ]; then
|
ram_percentage=$("$CURRENT_DIR"/ram_percentage.sh | sed -e 's/%//')
|
||||||
|
ram_load_status=$(load_status "$ram_percentage" "ram")
|
||||||
|
if [ "$ram_load_status" == "low" ]; then
|
||||||
echo "$ram_low_icon"
|
echo "$ram_low_icon"
|
||||||
elif [ $ram_load_status == "medium" ]; then
|
elif [ "$ram_load_status" == "medium" ]; then
|
||||||
echo "$ram_medium_icon"
|
echo "$ram_medium_icon"
|
||||||
elif [ $ram_load_status == "high" ]; then
|
elif [ "$ram_load_status" == "high" ]; then
|
||||||
echo "$ram_high_icon"
|
echo "$ram_high_icon"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -36,4 +39,4 @@ main() {
|
|||||||
get_icon_settings
|
get_icon_settings
|
||||||
print_icon "$1"
|
print_icon "$1"
|
||||||
}
|
}
|
||||||
main
|
main "$@"
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# shellcheck source=scripts/helpers.sh
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
|
|
||||||
ram_percentage_format="%3.1f%%"
|
ram_percentage_format="%3.1f%%"
|
||||||
|
|
||||||
sum_macos_vm_stats() {
|
sum_macos_vm_stats() {
|
||||||
grep -Eo '[0-9]+' \
|
grep -Eo '[0-9]+' |
|
||||||
| awk '{ a += $1 * 4096 } END { print a }'
|
awk '{ a += $1 * 4096 } END { print a }'
|
||||||
}
|
}
|
||||||
|
|
||||||
print_ram_percentage() {
|
print_ram_percentage() {
|
||||||
@ -20,23 +21,26 @@ print_ram_percentage() {
|
|||||||
# page size of 4096 bytes
|
# page size of 4096 bytes
|
||||||
stats="$(cached_eval vm_stat)"
|
stats="$(cached_eval vm_stat)"
|
||||||
|
|
||||||
used_and_cached=$(echo "$stats" \
|
used_and_cached=$(
|
||||||
| grep -E "(Pages active|Pages inactive|Pages speculative|Pages wired down|Pages occupied by compressor)" \
|
echo "$stats" |
|
||||||
| sum_macos_vm_stats \
|
grep -E "(Pages active|Pages inactive|Pages speculative|Pages wired down|Pages occupied by compressor)" |
|
||||||
|
sum_macos_vm_stats
|
||||||
)
|
)
|
||||||
|
|
||||||
cached=$(echo "$stats" \
|
cached=$(
|
||||||
| grep -E "(Pages purgeable|File-backed pages)" \
|
echo "$stats" |
|
||||||
| sum_macos_vm_stats \
|
grep -E "(Pages purgeable|File-backed pages)" |
|
||||||
|
sum_macos_vm_stats
|
||||||
)
|
)
|
||||||
|
|
||||||
free=$(echo "$stats" \
|
free=$(
|
||||||
| grep -E "(Pages free)" \
|
echo "$stats" |
|
||||||
| sum_macos_vm_stats \
|
grep -E "(Pages free)" |
|
||||||
|
sum_macos_vm_stats
|
||||||
)
|
)
|
||||||
|
|
||||||
used=$(($used_and_cached - $cached))
|
used=$((used_and_cached - cached))
|
||||||
total=$(($used_and_cached + $free))
|
total=$((used_and_cached + free))
|
||||||
|
|
||||||
echo "$used $total" | awk -v format="$ram_percentage_format" '{printf(format, 100*$1/$2)}'
|
echo "$used $total" | awk -v format="$ram_percentage_format" '{printf(format, 100*$1/$2)}'
|
||||||
fi
|
fi
|
||||||
|
@ -24,56 +24,60 @@ Tested and working on Linux, OSX and Cygwin.
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
# utf8 is on
|
```tmux
|
||||||
set -g utf8 on
|
# Address vim mode switching delay (http://superuser.com/a/252717/65504)
|
||||||
set -g status-utf8 on
|
set -s escape-time 0
|
||||||
|
|
||||||
# address vim mode switching delay (http://superuser.com/a/252717/65504)
|
# Increase scrollback buffer size from 2000 to 50000 lines
|
||||||
set -s escape-time 0
|
set -g history-limit 50000
|
||||||
|
|
||||||
# increase scrollback buffer size
|
# Increase tmux messages display duration from 750ms to 4s
|
||||||
set -g history-limit 50000
|
set -g display-time 4000
|
||||||
|
|
||||||
# tmux messages are displayed for 4 seconds
|
# Refresh 'status-left' and 'status-right' more often, from every 15s to 5s
|
||||||
set -g display-time 4000
|
set -g status-interval 5
|
||||||
|
|
||||||
# refresh 'status-left' and 'status-right' more often
|
# (OS X) Fix pbcopy/pbpaste for old tmux versions (pre 2.6)
|
||||||
set -g status-interval 5
|
set -g default-command "reattach-to-user-namespace -l $SHELL"
|
||||||
|
|
||||||
# set only on OS X where it's required
|
# Upgrade $TERM
|
||||||
set -g default-command "reattach-to-user-namespace -l $SHELL"
|
set -g default-terminal "screen-256color"
|
||||||
|
|
||||||
# upgrade $TERM
|
# Emacs key bindings in tmux command prompt (prefix + :) are better than
|
||||||
set -g default-terminal "screen-256color"
|
# vi keys, even for vim users
|
||||||
|
set -g status-keys emacs
|
||||||
|
|
||||||
# emacs key bindings in tmux command prompt (prefix + :) are better than
|
# Focus events enabled for terminals that support them
|
||||||
# vi keys, even for vim users
|
set -g focus-events on
|
||||||
set -g status-keys emacs
|
|
||||||
|
|
||||||
# focus events enabled for terminals that support them
|
# Super useful when using "grouped sessions" and multi-monitor setup
|
||||||
set -g focus-events on
|
setw -g aggressive-resize on
|
||||||
|
```
|
||||||
# super useful when using "grouped sessions" and multi-monitor setup
|
|
||||||
setw -g aggressive-resize on
|
|
||||||
|
|
||||||
### Key bindings
|
### Key bindings
|
||||||
|
|
||||||
# easier and faster switching between next/prev window
|
```tmux
|
||||||
bind C-p previous-window
|
# Easier and faster switching between next/prev window
|
||||||
bind C-n next-window
|
bind C-p previous-window
|
||||||
|
bind C-n next-window
|
||||||
|
```
|
||||||
|
|
||||||
Above bindings enhance the default `prefix + p` and `prefix + n` bindings by
|
Above bindings enhance the default `prefix + p` and `prefix + n` bindings by
|
||||||
allowing you to hold `Ctrl` and repeat `a + p`/`a + n` (if your prefix is
|
allowing you to hold `Ctrl` and repeat `a + p`/`a + n` (if your prefix is
|
||||||
`C-a`), which is a lot quicker.
|
`C-a`), which is a lot quicker.
|
||||||
|
|
||||||
# source .tmux.conf as suggested in `man tmux`
|
```tmux
|
||||||
bind R source-file '~/.tmux.conf'
|
# Source .tmux.conf as suggested in `man tmux`
|
||||||
|
bind R source-file '~/.tmux.conf'
|
||||||
|
```
|
||||||
|
|
||||||
"Adaptable" key bindings that build upon your `prefix` value:
|
"Adaptable" key bindings that build upon your `prefix` value:
|
||||||
|
|
||||||
# if prefix is 'C-a'
|
```tmux
|
||||||
bind C-a send-prefix
|
# If prefix is 'C-a'
|
||||||
bind a last-window
|
bind C-a send-prefix
|
||||||
|
bind a last-window
|
||||||
|
```
|
||||||
|
|
||||||
If prefix is `C-b`, above keys will be `C-b` and `b`.<br/>
|
If prefix is `C-b`, above keys will be `C-b` and `b`.<br/>
|
||||||
If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea.
|
If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea.
|
||||||
@ -82,7 +86,9 @@ If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea.
|
|||||||
|
|
||||||
Add plugin to the list of TPM plugins in `.tmux.conf`:
|
Add plugin to the list of TPM plugins in `.tmux.conf`:
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
```tmux
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
```
|
||||||
|
|
||||||
Hit `prefix + I` to fetch the plugin and source it. That's it!
|
Hit `prefix + I` to fetch the plugin and source it. That's it!
|
||||||
|
|
||||||
@ -94,7 +100,9 @@ Clone the repo:
|
|||||||
|
|
||||||
Add this line to the bottom of `.tmux.conf`:
|
Add this line to the bottom of `.tmux.conf`:
|
||||||
|
|
||||||
run-shell ~/clone/path/sensible.tmux
|
```tmux
|
||||||
|
run-shell ~/clone/path/sensible.tmux
|
||||||
|
```
|
||||||
|
|
||||||
Reload TMUX environment with `$ tmux source-file ~/.tmux.conf`, and that's it.
|
Reload TMUX environment with `$ tmux source-file ~/.tmux.conf`, and that's it.
|
||||||
|
|
||||||
|
29
tmux/.tmux/plugins/tmux-sensible/sensible.tmux
Normal file → Executable file
29
tmux/.tmux/plugins/tmux-sensible/sensible.tmux
Normal file → Executable file
@ -11,7 +11,7 @@ is_osx() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
iterm_terminal() {
|
iterm_terminal() {
|
||||||
[[ "$TERM_PROGRAM" =~ ^iTerm ]]
|
[[ "${TERM_PROGRAM}" =~ ^iTerm || "${LC_TERMINAL}" =~ ^iTerm ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
command_exists() {
|
command_exists() {
|
||||||
@ -45,7 +45,7 @@ server_option_value_not_changed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
key_binding_not_set() {
|
key_binding_not_set() {
|
||||||
local key="$1"
|
local key="${1//\\/\\\\}"
|
||||||
if $(tmux list-keys | grep -q "${KEY_BINDING_REGEX}${key}[[:space:]]"); then
|
if $(tmux list-keys | grep -q "${KEY_BINDING_REGEX}${key}[[:space:]]"); then
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
@ -64,15 +64,20 @@ key_binding_not_changed() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_tmux_config() {
|
||||||
|
local tmux_config_xdg="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf"
|
||||||
|
local tmux_config="$HOME/.tmux.conf"
|
||||||
|
|
||||||
|
if [ -f "${tmux_config_xdg}" ]; then
|
||||||
|
echo "${tmux_config_xdg}"
|
||||||
|
else
|
||||||
|
echo ${tmux_config}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
|
|
||||||
# enable utf8 (option removed in tmux 2.2)
|
|
||||||
tmux set-option -g utf8 on 2>/dev/null
|
|
||||||
|
|
||||||
# enable utf8 in tmux status-left and status-right (option removed in tmux 2.2)
|
|
||||||
tmux set-option -g status-utf8 on 2>/dev/null
|
|
||||||
|
|
||||||
# address vim mode switching delay (http://superuser.com/a/252717/65504)
|
# address vim mode switching delay (http://superuser.com/a/252717/65504)
|
||||||
if server_option_value_not_changed "escape-time" "500"; then
|
if server_option_value_not_changed "escape-time" "500"; then
|
||||||
tmux set-option -s escape-time 0
|
tmux set-option -s escape-time 0
|
||||||
@ -153,9 +158,11 @@ main() {
|
|||||||
|
|
||||||
# source `.tmux.conf` file - as suggested in `man tmux`
|
# source `.tmux.conf` file - as suggested in `man tmux`
|
||||||
if key_binding_not_set "R"; then
|
if key_binding_not_set "R"; then
|
||||||
tmux bind-key R run-shell ' \
|
local tmux_config=$(get_tmux_config)
|
||||||
tmux source-file ~/.tmux.conf > /dev/null; \
|
|
||||||
tmux display-message "Sourced .tmux.conf!"'
|
tmux bind-key R run-shell " \
|
||||||
|
tmux source-file ${tmux_config} > /dev/null; \
|
||||||
|
tmux display-message 'Sourced ${tmux_config}!'"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
main
|
main
|
||||||
|
@ -76,6 +76,8 @@ without `reattach-to-user-namespace`. It doesn't hurt to have it installed.
|
|||||||
- OS X 10.10: Yosemite – *not required*
|
- OS X 10.10: Yosemite – *not required*
|
||||||
- OS X 10.11: El Capitan – *not required*
|
- OS X 10.11: El Capitan – *not required*
|
||||||
- macOS 10.12: Sierra – *required*
|
- macOS 10.12: Sierra – *required*
|
||||||
|
- macOS 10.14: Mojave - *required*
|
||||||
|
- macOS 10.15: Catalina - *not required*
|
||||||
|
|
||||||
The easiest way to use `reattach-to-user-namespace` with `tmux` is use to
|
The easiest way to use `reattach-to-user-namespace` with `tmux` is use to
|
||||||
use the [`tmux-sensible`](https://github.com/tmux-plugins/tmux-sensible)
|
use the [`tmux-sensible`](https://github.com/tmux-plugins/tmux-sensible)
|
||||||
|
0
tmux/.tmux/plugins/tmux-yank/citest
Normal file → Executable file
0
tmux/.tmux/plugins/tmux-yank/citest
Normal file → Executable file
0
tmux/.tmux/plugins/tmux-yank/scripts/copy_line.sh
Normal file → Executable file
0
tmux/.tmux/plugins/tmux-yank/scripts/copy_line.sh
Normal file → Executable file
5
tmux/.tmux/plugins/tmux-yank/scripts/copy_pane_pwd.sh
Normal file → Executable file
5
tmux/.tmux/plugins/tmux-yank/scripts/copy_pane_pwd.sh
Normal file → Executable file
@ -16,10 +16,13 @@ display_notice() {
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
local copy_command
|
local copy_command
|
||||||
|
local payload
|
||||||
# shellcheck disable=SC2119
|
# shellcheck disable=SC2119
|
||||||
copy_command="$(clipboard_copy_command)"
|
copy_command="$(clipboard_copy_command)"
|
||||||
|
payload="$(pane_current_path | tr -d '\n')"
|
||||||
# $copy_command below should not be quoted
|
# $copy_command below should not be quoted
|
||||||
pane_current_path | tr -d '\n' | $copy_command
|
echo "$payload" | $copy_command
|
||||||
|
tmux set-buffer "$payload"
|
||||||
display_notice
|
display_notice
|
||||||
}
|
}
|
||||||
main
|
main
|
||||||
|
@ -174,7 +174,7 @@ clipboard_copy_command() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Cache the TMUX version for speed.
|
# Cache the TMUX version for speed.
|
||||||
tmux_version="$(tmux -V | cut -d ' ' -f 2)"
|
tmux_version="$(tmux -V | cut -d ' ' -f 2 | sed 's/next-//')"
|
||||||
|
|
||||||
tmux_is_at_least() {
|
tmux_is_at_least() {
|
||||||
if [[ $tmux_version == "$1" ]] || [[ $tmux_version == master ]]; then
|
if [[ $tmux_version == "$1" ]] || [[ $tmux_version == master ]]; then
|
||||||
@ -200,6 +200,9 @@ tmux_is_at_least() {
|
|||||||
if ((10#${current_version[i]} < 10#${wanted_version[i]})); then
|
if ((10#${current_version[i]} < 10#${wanted_version[i]})); then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
if ((10#${current_version[i]} > 10#${wanted_version[i]})); then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
0
tmux/.tmux/plugins/tmux-yank/yank.tmux
Normal file → Executable file
0
tmux/.tmux/plugins/tmux-yank/yank.tmux
Normal file → Executable file
21
tmux/.tmux/plugins/tmux/LICENSE
Normal file
21
tmux/.tmux/plugins/tmux/LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Catppuccin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
58
tmux/.tmux/plugins/tmux/README.md
Normal file
58
tmux/.tmux/plugins/tmux/README.md
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<h3 align="center">
|
||||||
|
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
|
||||||
|
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
|
||||||
|
Catppuccin for <a href="https://github.com/tmux/tmux">Tmux</a>
|
||||||
|
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/catppuccin/tmux/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/tmux?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
|
||||||
|
<a href="https://github.com/catppuccin/tmux/issues"><img src="https://img.shields.io/github/issues/catppuccin/tmux?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
|
||||||
|
<a href="https://github.com/catppuccin/tmux/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/tmux?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="./assets/preview.webp"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## Themes
|
||||||
|
|
||||||
|
- 🌻 [Latte](./catppuccin-latte.tmuxtheme)
|
||||||
|
- 🪴 [Frappé](./catppuccin-frappe.tmuxtheme)
|
||||||
|
- 🌺 [Macchiato](./catppuccin-macchiato.tmuxtheme)
|
||||||
|
- 🌿 [Mocha](./catppuccin-mocha.tmuxtheme)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### TPM
|
||||||
|
|
||||||
|
1. Install [TPM](https://github.com/tmux-plugins/tpm)
|
||||||
|
2. Add the Catppuccin plugin:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
set -g @plugin 'catppuccin/tmux'
|
||||||
|
# ...alongside
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
```
|
||||||
|
|
||||||
|
3. (Optional) Set your preferred flavour, it defaults to `"mocha"`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manual
|
||||||
|
|
||||||
|
1. Copy your desired theme's configuration contents into your Tmux config (usually stored at `~/.tmux.conf`)
|
||||||
|
2. Reload Tmux by either restarting the session or reloading it with `tmux source-file ~/.tmux.conf`
|
||||||
|
|
||||||
|
## 💝 Thanks to
|
||||||
|
|
||||||
|
- [Pocco81](https://github.com/catppuccin)
|
||||||
|
- [vinnyA3](https://github.com/vinnyA3)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p align="center"><img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" /></p>
|
||||||
|
<p align="center">Copyright © 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
|
||||||
|
<p align="center"><a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a></p>
|
BIN
tmux/.tmux/plugins/tmux/assets/frappe.webp
Normal file
BIN
tmux/.tmux/plugins/tmux/assets/frappe.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
BIN
tmux/.tmux/plugins/tmux/assets/latte.webp
Normal file
BIN
tmux/.tmux/plugins/tmux/assets/latte.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 98 KiB |
BIN
tmux/.tmux/plugins/tmux/assets/macchiato.webp
Normal file
BIN
tmux/.tmux/plugins/tmux/assets/macchiato.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
BIN
tmux/.tmux/plugins/tmux/assets/mocha.webp
Normal file
BIN
tmux/.tmux/plugins/tmux/assets/mocha.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 96 KiB |
BIN
tmux/.tmux/plugins/tmux/assets/preview.webp
Normal file
BIN
tmux/.tmux/plugins/tmux/assets/preview.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 159 KiB |
71
tmux/.tmux/plugins/tmux/catppuccin-frappe.tmuxtheme
Executable file
71
tmux/.tmux/plugins/tmux/catppuccin-frappe.tmuxtheme
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
||||||
|
# WARNING: hex colors can't contain capital letters
|
||||||
|
|
||||||
|
# --> Catppuccin (Frappe)
|
||||||
|
thm_bg="#303446"
|
||||||
|
thm_fg="#c6d0f5"
|
||||||
|
thm_cyan="#99d1db"
|
||||||
|
thm_black="#292c3c"
|
||||||
|
thm_gray="#414559"
|
||||||
|
thm_magenta="#ca9ee6"
|
||||||
|
thm_pink="#f4b8e4"
|
||||||
|
thm_red="#e78284"
|
||||||
|
thm_green="#a6d189"
|
||||||
|
thm_yellow="#e5c890"
|
||||||
|
thm_blue="#8caaee"
|
||||||
|
thm_orange="#ef9f76"
|
||||||
|
thm_black4="#626880"
|
||||||
|
|
||||||
|
# ----------------------------=== Theme ===--------------------------
|
||||||
|
|
||||||
|
# utils
|
||||||
|
set() {
|
||||||
|
local option=$1
|
||||||
|
local value=$2
|
||||||
|
tmux set-option -gq "$option" "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
setw() {
|
||||||
|
local option=$1
|
||||||
|
local value=$2
|
||||||
|
tmux set-window-option -gq "$option" "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
# status
|
||||||
|
set status "on"
|
||||||
|
set status-bg "${thm_bg}"
|
||||||
|
set status-justify "left"
|
||||||
|
set status-left-length "100"
|
||||||
|
set status-right-length "100"
|
||||||
|
|
||||||
|
# messages
|
||||||
|
set message-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||||
|
set message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||||
|
|
||||||
|
# panes
|
||||||
|
set pane-border-style "fg=${thm_gray}"
|
||||||
|
set pane-active-border-style "fg=${thm_blue}"
|
||||||
|
|
||||||
|
# windows
|
||||||
|
setw window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||||
|
setw window-status-separator ""
|
||||||
|
setw window-status-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||||
|
|
||||||
|
# --------=== Statusline
|
||||||
|
|
||||||
|
set status-left ""
|
||||||
|
set status-right "#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}#[bg=$thm_gray]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S "
|
||||||
|
|
||||||
|
# current_dir
|
||||||
|
setw window-status-format "#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
|
||||||
|
setw window-status-current-format "#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #{b:pane_current_path} "
|
||||||
|
|
||||||
|
# parent_dir/current_dir
|
||||||
|
# setw window-status-format "#[fg=colour232,bg=colour111] #I #[fg=colour222,bg=colour235] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
||||||
|
# setw window-status-current-format "#[fg=colour232,bg=colour208] #I #[fg=colour255,bg=colour237] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
||||||
|
|
||||||
|
# --------=== Modes
|
||||||
|
setw clock-mode-colour "${thm_blue}"
|
||||||
|
setw mode-style "fg=${thm_pink} bg=${thm_black4} bold"
|
71
tmux/.tmux/plugins/tmux/catppuccin-latte.tmuxtheme
Executable file
71
tmux/.tmux/plugins/tmux/catppuccin-latte.tmuxtheme
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
||||||
|
# WARNING: hex colors can't contain capital letters
|
||||||
|
|
||||||
|
# --> Catppuccin (Latte)
|
||||||
|
thm_bg="#dce0e8"
|
||||||
|
thm_fg="#4c4f69"
|
||||||
|
thm_cyan="#179299"
|
||||||
|
thm_black="#e6e9ef"
|
||||||
|
thm_gray="#bcc0cc"
|
||||||
|
thm_magenta="#ea76cb"
|
||||||
|
thm_pink="#8839ef"
|
||||||
|
thm_red="#d20f39"
|
||||||
|
thm_green="#40a02b"
|
||||||
|
thm_yellow="#df8e1d"
|
||||||
|
thm_blue="#1e66f5"
|
||||||
|
thm_orange="#fe640b"
|
||||||
|
thm_black4="#acb0be"
|
||||||
|
|
||||||
|
# ----------------------------=== Theme ===--------------------------
|
||||||
|
|
||||||
|
# utils
|
||||||
|
set() {
|
||||||
|
local option=$1
|
||||||
|
local value=$2
|
||||||
|
tmux set-option -gq "$option" "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
setw() {
|
||||||
|
local option=$1
|
||||||
|
local value=$2
|
||||||
|
tmux set-window-option -gq "$option" "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
# status
|
||||||
|
set status "on"
|
||||||
|
set status-bg "${thm_bg}"
|
||||||
|
set status-justify "left"
|
||||||
|
set status-left-length "100"
|
||||||
|
set status-right-length "100"
|
||||||
|
|
||||||
|
# messages
|
||||||
|
set message-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||||
|
set message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||||
|
|
||||||
|
# panes
|
||||||
|
set pane-border-style "fg=${thm_gray}"
|
||||||
|
set pane-active-border-style "fg=${thm_blue}"
|
||||||
|
|
||||||
|
# windows
|
||||||
|
setw window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||||
|
setw window-status-separator ""
|
||||||
|
setw window-status-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||||
|
|
||||||
|
# --------=== Statusline
|
||||||
|
|
||||||
|
set status-left ""
|
||||||
|
set status-right "#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}#[bg=$thm_gray]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S "
|
||||||
|
|
||||||
|
# current_dir
|
||||||
|
setw window-status-format "#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
|
||||||
|
setw window-status-current-format "#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #{b:pane_current_path} "
|
||||||
|
|
||||||
|
# parent_dir/current_dir
|
||||||
|
# setw window-status-format "#[fg=colour232,bg=colour111] #I #[fg=colour222,bg=colour235] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
||||||
|
# setw window-status-current-format "#[fg=colour232,bg=colour208] #I #[fg=colour255,bg=colour237] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
||||||
|
|
||||||
|
# --------=== Modes
|
||||||
|
setw clock-mode-colour "${thm_blue}"
|
||||||
|
setw mode-style "fg=${thm_pink} bg=${thm_black4} bold"
|
71
tmux/.tmux/plugins/tmux/catppuccin-macchiato.tmuxtheme
Executable file
71
tmux/.tmux/plugins/tmux/catppuccin-macchiato.tmuxtheme
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
||||||
|
# WARNING: hex colors can't contain capital letters
|
||||||
|
|
||||||
|
# --> Catppuccin (Macchiato)
|
||||||
|
thm_bg="#24273a"
|
||||||
|
thm_fg="#cad3f5"
|
||||||
|
thm_cyan="#91d7e3"
|
||||||
|
thm_black="#1e2030"
|
||||||
|
thm_gray="#363a4f"
|
||||||
|
thm_magenta="#c6a0f6"
|
||||||
|
thm_pink="#f5bde6"
|
||||||
|
thm_red="#ed8796"
|
||||||
|
thm_green="#a6da95"
|
||||||
|
thm_yellow="#eed49f"
|
||||||
|
thm_blue="#8aadf4"
|
||||||
|
thm_orange="#f5a97f"
|
||||||
|
thm_black4="#5b6078"
|
||||||
|
|
||||||
|
# ----------------------------=== Theme ===--------------------------
|
||||||
|
|
||||||
|
# utils
|
||||||
|
set() {
|
||||||
|
local option=$1
|
||||||
|
local value=$2
|
||||||
|
tmux set-option -gq "$option" "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
setw() {
|
||||||
|
local option=$1
|
||||||
|
local value=$2
|
||||||
|
tmux set-window-option -gq "$option" "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
# status
|
||||||
|
set status "on"
|
||||||
|
set status-bg "${thm_bg}"
|
||||||
|
set status-justify "left"
|
||||||
|
set status-left-length "100"
|
||||||
|
set status-right-length "100"
|
||||||
|
|
||||||
|
# messages
|
||||||
|
set message-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||||
|
set message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||||
|
|
||||||
|
# panes
|
||||||
|
set pane-border-style "fg=${thm_gray}"
|
||||||
|
set pane-active-border-style "fg=${thm_blue}"
|
||||||
|
|
||||||
|
# windows
|
||||||
|
setw window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||||
|
setw window-status-separator ""
|
||||||
|
setw window-status-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||||
|
|
||||||
|
# --------=== Statusline
|
||||||
|
|
||||||
|
set status-left ""
|
||||||
|
set status-right "#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}#[bg=$thm_gray]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S "
|
||||||
|
|
||||||
|
# current_dir
|
||||||
|
setw window-status-format "#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #W "
|
||||||
|
setw window-status-current-format "#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #W "
|
||||||
|
|
||||||
|
# parent_dir/current_dir
|
||||||
|
# setw window-status-format "#[fg=colour232,bg=colour111] #I #[fg=colour222,bg=colour235] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
||||||
|
# setw window-status-current-format "#[fg=colour232,bg=colour208] #I #[fg=colour255,bg=colour237] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
||||||
|
|
||||||
|
# --------=== Modes
|
||||||
|
setw clock-mode-colour "${thm_blue}"
|
||||||
|
setw mode-style "fg=${thm_pink} bg=${thm_black4} bold"
|
71
tmux/.tmux/plugins/tmux/catppuccin-mocha.tmuxtheme
Executable file
71
tmux/.tmux/plugins/tmux/catppuccin-mocha.tmuxtheme
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
||||||
|
# WARNING: hex colors can't contain capital letters
|
||||||
|
|
||||||
|
# --> Catppuccin (Mocha)
|
||||||
|
thm_bg="#1e1e2e"
|
||||||
|
thm_fg="#cdd6f4"
|
||||||
|
thm_cyan="#89dceb"
|
||||||
|
thm_black="#181825"
|
||||||
|
thm_gray="#313244"
|
||||||
|
thm_magenta="#cba6f7"
|
||||||
|
thm_pink="#f5c2e7"
|
||||||
|
thm_red="#f38ba8"
|
||||||
|
thm_green="#a6e3a1"
|
||||||
|
thm_yellow="#f9e2af"
|
||||||
|
thm_blue="#89b4fa"
|
||||||
|
thm_orange="#fab387"
|
||||||
|
thm_black4="#585b70"
|
||||||
|
|
||||||
|
# ----------------------------=== Theme ===--------------------------
|
||||||
|
|
||||||
|
# utils
|
||||||
|
set() {
|
||||||
|
local option=$1
|
||||||
|
local value=$2
|
||||||
|
tmux set-option -gq "$option" "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
setw() {
|
||||||
|
local option=$1
|
||||||
|
local value=$2
|
||||||
|
tmux set-window-option -gq "$option" "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
# status
|
||||||
|
set status "on"
|
||||||
|
set status-bg "${thm_bg}"
|
||||||
|
set status-justify "left"
|
||||||
|
set status-left-length "100"
|
||||||
|
set status-right-length "100"
|
||||||
|
|
||||||
|
# messages
|
||||||
|
set message-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||||
|
set message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||||
|
|
||||||
|
# panes
|
||||||
|
set pane-border-style "fg=${thm_gray}"
|
||||||
|
set pane-active-border-style "fg=${thm_blue}"
|
||||||
|
|
||||||
|
# windows
|
||||||
|
setw window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||||
|
setw window-status-separator ""
|
||||||
|
setw window-status-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||||
|
|
||||||
|
# --------=== Statusline
|
||||||
|
|
||||||
|
set status-left ""
|
||||||
|
set status-right "#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}#[bg=$thm_gray]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S "
|
||||||
|
|
||||||
|
# current_dir
|
||||||
|
setw window-status-format "#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
|
||||||
|
setw window-status-current-format "#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #{b:pane_current_path} "
|
||||||
|
|
||||||
|
# parent_dir/current_dir
|
||||||
|
# setw window-status-format "#[fg=colour232,bg=colour111] #I #[fg=colour222,bg=colour235] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
||||||
|
# setw window-status-current-format "#[fg=colour232,bg=colour208] #I #[fg=colour255,bg=colour237] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
||||||
|
|
||||||
|
# --------=== Modes
|
||||||
|
setw clock-mode-colour "${thm_blue}"
|
||||||
|
setw mode-style "fg=${thm_pink} bg=${thm_black4} bold"
|
23
tmux/.tmux/plugins/tmux/catppuccin.tmux
Executable file
23
tmux/.tmux/plugins/tmux/catppuccin.tmux
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
get-tmux-option() {
|
||||||
|
local option value default
|
||||||
|
option="$1"
|
||||||
|
default="$2"
|
||||||
|
value="$(tmux show-option -gqv "$option")"
|
||||||
|
|
||||||
|
if [ -n "$value" ]; then
|
||||||
|
echo "$value"
|
||||||
|
else
|
||||||
|
echo "$default"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
local theme
|
||||||
|
theme="$(get-tmux-option "@catppuccin_flavour" "mocha")"
|
||||||
|
tmux run -b "$CURRENT_DIR/catppuccin-${theme}.tmuxtheme"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
@ -92,12 +92,12 @@ That should set up the key binding. Now hit `prefix + T` and see if it works.
|
|||||||
### 6. publish the plugin
|
### 6. publish the plugin
|
||||||
|
|
||||||
When everything is ready, push the plugin to an online git repository,
|
When everything is ready, push the plugin to an online git repository,
|
||||||
preferably Github.
|
preferably GitHub.
|
||||||
|
|
||||||
Other users can install your plugin by just adding plugin git URL to the
|
Other users can install your plugin by just adding plugin git URL to the
|
||||||
`@plugin` list in their `.tmux.conf`.
|
`@plugin` list in their `.tmux.conf`.
|
||||||
|
|
||||||
If the plugin is on Github, your users will be able to use the shorthand of
|
If the plugin is on GitHub, your users will be able to use the shorthand of
|
||||||
`github_username/repository`.
|
`github_username/repository`.
|
||||||
|
|
||||||
### Conclusion
|
### Conclusion
|
||||||
|
1
tmux/.tmux/plugins/tpm/lib/tmux-test
Submodule
1
tmux/.tmux/plugins/tpm/lib/tmux-test
Submodule
Submodule tmux/.tmux/plugins/tpm/lib/tmux-test added at 33fa65fbfb
@ -26,7 +26,7 @@ clone() {
|
|||||||
|
|
||||||
# tries cloning:
|
# tries cloning:
|
||||||
# 1. plugin name directly - works if it's a valid git url
|
# 1. plugin name directly - works if it's a valid git url
|
||||||
# 2. expands the plugin name to point to a github repo and tries cloning again
|
# 2. expands the plugin name to point to a GitHub repo and tries cloning again
|
||||||
clone_plugin() {
|
clone_plugin() {
|
||||||
local plugin="$1"
|
local plugin="$1"
|
||||||
local branch="$2"
|
local branch="$2"
|
||||||
|
@ -115,16 +115,16 @@ Add the following to your `~/.vimrc` to define your custom maps:
|
|||||||
``` vim
|
``` vim
|
||||||
let g:tmux_navigator_no_mappings = 1
|
let g:tmux_navigator_no_mappings = 1
|
||||||
|
|
||||||
nnoremap <silent> {Left-Mapping} :TmuxNavigateLeft<cr>
|
noremap <silent> {Left-Mapping} :<C-U>TmuxNavigateLeft<cr>
|
||||||
nnoremap <silent> {Down-Mapping} :TmuxNavigateDown<cr>
|
noremap <silent> {Down-Mapping} :<C-U>TmuxNavigateDown<cr>
|
||||||
nnoremap <silent> {Up-Mapping} :TmuxNavigateUp<cr>
|
noremap <silent> {Up-Mapping} :<C-U>TmuxNavigateUp<cr>
|
||||||
nnoremap <silent> {Right-Mapping} :TmuxNavigateRight<cr>
|
noremap <silent> {Right-Mapping} :<C-U>TmuxNavigateRight<cr>
|
||||||
nnoremap <silent> {Previous-Mapping} :TmuxNavigatePrevious<cr>
|
noremap <silent> {Previous-Mapping} :<C-U>TmuxNavigatePrevious<cr>
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note* Each instance of `{Left-Mapping}` or `{Down-Mapping}` must be replaced
|
*Note* Each instance of `{Left-Mapping}` or `{Down-Mapping}` must be replaced
|
||||||
in the above code with the desired mapping. Ie, the mapping for `<ctrl-h>` =>
|
in the above code with the desired mapping. Ie, the mapping for `<ctrl-h>` =>
|
||||||
Left would be created with `nnoremap <silent> <c-h> :TmuxNavigateLeft<cr>`.
|
Left would be created with `noremap <silent> <c-h> :<C-U>TmuxNavigateLeft<cr>`.
|
||||||
|
|
||||||
##### Autosave on leave
|
##### Autosave on leave
|
||||||
|
|
||||||
@ -199,6 +199,33 @@ With this enabled you can use `<prefix> C-l` to clear the screen.
|
|||||||
|
|
||||||
Thanks to [Brian Hogan][] for the tip on how to re-map the clear screen binding.
|
Thanks to [Brian Hogan][] for the tip on how to re-map the clear screen binding.
|
||||||
|
|
||||||
|
#### Disable Wrapping
|
||||||
|
|
||||||
|
By default, if you tru to move past the edge of the screen, tmux/vim will
|
||||||
|
"wrap" around to the opposite side. To disable this, you'll need to
|
||||||
|
configure both tmux and vim:
|
||||||
|
|
||||||
|
For vim, you only need to enable this option:
|
||||||
|
```vim
|
||||||
|
let g:tmux_navigator_no_wrap = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
Tmux doesn't haave an option, so whatever key bindings you have need to be set
|
||||||
|
to conditionally wrap based on position on screen:
|
||||||
|
```tmux
|
||||||
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||||
|
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||||
|
bind-key -n 'C-h' if-shell "$is_vim" { send-keys C-h } { if-shell -F '#{pane_at_left}' {} { select-pane -L } }
|
||||||
|
bind-key -n 'C-j' if-shell "$is_vim" { send-keys C-j } { if-shell -F '#{pane_at_bottom}' {} { select-pane -D } }
|
||||||
|
bind-key -n 'C-k' if-shell "$is_vim" { send-keys C-k } { if-shell -F '#{pane_at_top}' {} { select-pane -U } }
|
||||||
|
bind-key -n 'C-l' if-shell "$is_vim" { send-keys C-l } { if-shell -F '#{pane_at_right}' {} { select-pane -R } }
|
||||||
|
|
||||||
|
bind-key -T copy-mode-vi 'C-h' if-shell -F '#{pane_at_left}' {} { select-pane -L }
|
||||||
|
bind-key -T copy-mode-vi 'C-j' if-shell -F '#{pane_at_bottom}' {} { select-pane -D }
|
||||||
|
bind-key -T copy-mode-vi 'C-k' if-shell -F '#{pane_at_top}' {} { select-pane -U }
|
||||||
|
bind-key -T copy-mode-vi 'C-l' if-shell -F '#{pane_at_right}' {} { select-pane -R }
|
||||||
|
```
|
||||||
|
|
||||||
#### Nesting
|
#### Nesting
|
||||||
If you like to nest your tmux sessions, this plugin is not going to work
|
If you like to nest your tmux sessions, this plugin is not going to work
|
||||||
properly. It probably never will, as it would require detecting when Tmux would
|
properly. It probably never will, as it would require detecting when Tmux would
|
||||||
@ -236,7 +263,7 @@ Troubleshooting
|
|||||||
|
|
||||||
This is likely due to conflicting key mappings in your `~/.vimrc`. You can use
|
This is likely due to conflicting key mappings in your `~/.vimrc`. You can use
|
||||||
the following search pattern to find conflicting mappings
|
the following search pattern to find conflicting mappings
|
||||||
`\vn(nore)?map\s+\<c-[hjkl]\>`. Any matching lines should be deleted or
|
`\v(nore)?map\s+\<c-[hjkl]\>`. Any matching lines should be deleted or
|
||||||
altered to avoid conflicting with the mappings from the plugin.
|
altered to avoid conflicting with the mappings from the plugin.
|
||||||
|
|
||||||
Another option is that the pattern matching included in the `.tmux.conf` is
|
Another option is that the pattern matching included in the `.tmux.conf` is
|
||||||
|
@ -30,10 +30,10 @@ CONFIGURATION *tmux-navigator-configuration*
|
|||||||
* Custom Key Bindings
|
* Custom Key Bindings
|
||||||
let g:tmux_navigator_no_mappings = 1
|
let g:tmux_navigator_no_mappings = 1
|
||||||
|
|
||||||
nnoremap <silent> {Left-mapping} :TmuxNavigateLeft<cr>
|
noremap <silent> {Left-mapping} :<C-U>TmuxNavigateLeft<cr>
|
||||||
nnoremap <silent> {Down-Mapping} :TmuxNavigateDown<cr>
|
noremap <silent> {Down-Mapping} :<C-U>TmuxNavigateDown<cr>
|
||||||
nnoremap <silent> {Up-Mapping} :TmuxNavigateUp<cr>
|
noremap <silent> {Up-Mapping} :<C-U>TmuxNavigateUp<cr>
|
||||||
nnoremap <silent> {Right-Mapping} :TmuxNavigateRight<cr>
|
noremap <silent> {Right-Mapping} :<C-U>TmuxNavigateRight<cr>
|
||||||
nnoremap <silent> {Previous-Mapping} :TmuxNavigatePrevious<cr>
|
noremap <silent> {Previous-Mapping} :<C-U><C-U>TmuxNavigatePrevious<cr>
|
||||||
|
|
||||||
vim:tw=78:ts=8:ft=help:norl:
|
vim:tw=78:ts=8:ft=help:norl:
|
||||||
|
@ -16,11 +16,11 @@ function! s:VimNavigate(direction)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if !get(g:, 'tmux_navigator_no_mappings', 0)
|
if !get(g:, 'tmux_navigator_no_mappings', 0)
|
||||||
nnoremap <silent> <c-h> :TmuxNavigateLeft<cr>
|
noremap <silent> <c-h> :<C-U>TmuxNavigateLeft<cr>
|
||||||
nnoremap <silent> <c-j> :TmuxNavigateDown<cr>
|
noremap <silent> <c-j> :<C-U>TmuxNavigateDown<cr>
|
||||||
nnoremap <silent> <c-k> :TmuxNavigateUp<cr>
|
noremap <silent> <c-k> :<C-U>TmuxNavigateUp<cr>
|
||||||
nnoremap <silent> <c-l> :TmuxNavigateRight<cr>
|
noremap <silent> <c-l> :<C-U>TmuxNavigateRight<cr>
|
||||||
nnoremap <silent> <c-\> :TmuxNavigatePrevious<cr>
|
noremap <silent> <c-\> :<C-U>TmuxNavigatePrevious<cr>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if empty($TMUX)
|
if empty($TMUX)
|
||||||
@ -50,6 +50,12 @@ if !exists("g:tmux_navigator_preserve_zoom")
|
|||||||
let g:tmux_navigator_preserve_zoom = 0
|
let g:tmux_navigator_preserve_zoom = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists("g:tmux_navigator_no_wrap")
|
||||||
|
let g:tmux_navigator_no_wrap = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:pane_position_from_direction = {'h': 'left', 'j': 'bottom', 'k': 'top', 'l': 'right'}
|
||||||
|
|
||||||
function! s:TmuxOrTmateExecutable()
|
function! s:TmuxOrTmateExecutable()
|
||||||
return (match($TMUX, 'tmate') != -1 ? 'tmate' : 'tmux')
|
return (match($TMUX, 'tmate') != -1 ? 'tmate' : 'tmux')
|
||||||
endfunction
|
endfunction
|
||||||
@ -120,6 +126,9 @@ function! s:TmuxAwareNavigate(direction)
|
|||||||
if g:tmux_navigator_preserve_zoom == 1
|
if g:tmux_navigator_preserve_zoom == 1
|
||||||
let l:args .= ' -Z'
|
let l:args .= ' -Z'
|
||||||
endif
|
endif
|
||||||
|
if g:tmux_navigator_no_wrap == 1
|
||||||
|
let args = 'if -F "#{pane_at_' . s:pane_position_from_direction[a:direction] . '}" "" "' . args . '"'
|
||||||
|
endif
|
||||||
silent call s:TmuxCommand(args)
|
silent call s:TmuxCommand(args)
|
||||||
if s:NeedsVitalityRedraw()
|
if s:NeedsVitalityRedraw()
|
||||||
redraw!
|
redraw!
|
||||||
|
@ -7,7 +7,7 @@ windows:
|
|||||||
panes:
|
panes:
|
||||||
- main:
|
- main:
|
||||||
- hgd gmscore
|
- hgd gmscore
|
||||||
- vim -S ~/.sessions/gmscore.vim
|
- vim
|
||||||
- other:
|
- other:
|
||||||
- hgd gmscore
|
- hgd gmscore
|
||||||
- other2:
|
- other2:
|
||||||
@ -18,7 +18,7 @@ windows:
|
|||||||
panes:
|
panes:
|
||||||
- main:
|
- main:
|
||||||
- hgd experimental
|
- hgd experimental
|
||||||
- vim -S ~/.sessions/experimental.vim
|
- vim
|
||||||
- other:
|
- other:
|
||||||
- hgd experimental
|
- hgd experimental
|
||||||
- other2:
|
- other2:
|
||||||
@ -29,7 +29,7 @@ windows:
|
|||||||
- main:
|
- main:
|
||||||
- hgd notes
|
- hgd notes
|
||||||
- cd ../company/users/cnieves/
|
- cd ../company/users/cnieves/
|
||||||
- vim -S ~/.sessions/notes.vim
|
- vim
|
||||||
- other:
|
- other:
|
||||||
- hgd notes
|
- hgd notes
|
||||||
- cd ../company/users/cnieves/
|
- cd ../company/users/cnieves/
|
||||||
@ -41,7 +41,7 @@ windows:
|
|||||||
panes:
|
panes:
|
||||||
- main:
|
- main:
|
||||||
- cd ~/.vim/prefs
|
- cd ~/.vim/prefs
|
||||||
- vim -S ~/.sessions/vim.vim
|
- vim
|
||||||
- other:
|
- other:
|
||||||
- cd ~/.vim/prefs
|
- cd ~/.vim/prefs
|
||||||
- other2:
|
- other2:
|
||||||
|
@ -28,6 +28,20 @@ lspkind.init()
|
|||||||
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
|
||||||
|
require'cmp'.setup.cmdline(':', {
|
||||||
|
sources = {
|
||||||
|
{ name = 'cmdline' }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
cmp.setup.cmdline('/', {
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'nvim_lsp_document_symbol' }
|
||||||
|
}, {
|
||||||
|
{ name = 'buffer' }
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
mapping = {
|
mapping = {
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
@ -82,6 +96,7 @@ cmp.setup({
|
|||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
{ name = "vim_vsnip" },
|
{ name = "vim_vsnip" },
|
||||||
|
{ name = 'nvim_lsp_signature_help' },
|
||||||
{ name = 'nvim_ciderlsp', priority = 9 },
|
{ name = 'nvim_ciderlsp', priority = 9 },
|
||||||
{ name = "buffer", keyword_length = 5 },
|
{ name = "buffer", keyword_length = 5 },
|
||||||
},
|
},
|
||||||
@ -230,7 +245,7 @@ local on_attach = function(client, bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
capabilities = require('cmp_nvim_ciderlsp').update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_ciderlsp').update_capabilities(capabilities)
|
||||||
capabilities['codeLens'] = {dynamicRegistration=false}
|
capabilities['codeLens'] = {dynamicRegistration=false}
|
||||||
-- capabilities.workspace.codeLens = {refreshSupport=true}
|
-- capabilities.workspace.codeLens = {refreshSupport=true}
|
||||||
|
@ -1,11 +1,155 @@
|
|||||||
-- Require CiderLSP and Diagnostics modules
|
local fn = vim.fn
|
||||||
-- IMPORTANT: Must come after plugins are loaded
|
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||||
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
|
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
|
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. vim.o.runtimepath
|
||||||
|
end
|
||||||
|
|
||||||
|
local packerGroup = vim.api.nvim_create_augroup("packer_auto_compile", { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = "*/vim/lua/plugins.lua",
|
||||||
|
command = "source <afile> | PackerCompile",
|
||||||
|
group = packerGroup,
|
||||||
|
})
|
||||||
|
|
||||||
|
require('packer').startup(function(use)
|
||||||
|
-- Packer can manage itself
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
|
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
||||||
|
|
||||||
|
-- Undo tree
|
||||||
|
use {
|
||||||
|
'mbbill/undotree',
|
||||||
|
cmd = 'UndotreeToggle',
|
||||||
|
config = [[vim.g.undotree_SetFocusWhenToggle = 1]],
|
||||||
|
}
|
||||||
|
|
||||||
|
use 'nvim-lua/plenary.nvim'
|
||||||
|
|
||||||
|
-- Pretty symbols
|
||||||
|
use 'kyazdani42/nvim-web-devicons'
|
||||||
|
|
||||||
|
use({"L3MON4D3/LuaSnip", tag = "v<CurrentMajor>.*"})
|
||||||
|
|
||||||
|
-- Completion and linting
|
||||||
|
use 'neovim/nvim-lspconfig'
|
||||||
|
use {
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
requires = {
|
||||||
|
'onsails/lspkind.nvim',
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
|
'lukas-reineke/cmp-under-comparator',
|
||||||
|
'hrsh7th/cmp-cmdline',
|
||||||
|
'hrsh7th/cmp-nvim-lsp-document-symbol',
|
||||||
|
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||||
|
'hrsh7th/cmp-nvim-lua',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
'hrsh7th/cmp-vsnip',
|
||||||
|
{ 'saadparwaiz1/cmp_luasnip', after = {'LuaSnip'} },
|
||||||
|
},
|
||||||
|
-- config = [[require('lsp')]],
|
||||||
|
-- event = 'InsertEnter',
|
||||||
|
}
|
||||||
|
use 'folke/trouble.nvim'
|
||||||
|
|
||||||
|
use 'hrsh7th/vim-vsnip'
|
||||||
|
use 'kosayoda/nvim-lightbulb'
|
||||||
|
use {'andymass/vim-matchup', event = 'VimEnter'}
|
||||||
|
use { 'ErichDonGubler/lsp_lines.nvim', config = [[require("lsp_lines").setup()]] }
|
||||||
|
|
||||||
|
use 'jghauser/mkdir.nvim'
|
||||||
|
use 'simrat39/symbols-outline.nvim'
|
||||||
|
use { 'petertriho/nvim-scrollbar', config = [[require("scrollbar").setup()]] }
|
||||||
|
|
||||||
|
use {
|
||||||
|
'nvim-telescope/telescope.nvim' , branch = '0.1.x',
|
||||||
|
requires = { {'nvim-lua/plenary.nvim'} }
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'rmagatti/auto-session',
|
||||||
|
config = function()
|
||||||
|
require("auto-session").setup {
|
||||||
|
log_level = "error",
|
||||||
|
auto_session_suppress_dirs = { "~/", "~/Downloads", "/"},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use 'sso://googler@user/vintharas/telescope-codesearch.nvim'
|
||||||
|
use 'nvim-lualine/lualine.nvim'
|
||||||
|
use 'rcarriga/nvim-notify'
|
||||||
|
|
||||||
|
-- Git
|
||||||
|
use {
|
||||||
|
{
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
requires = 'nvim-lua/plenary.nvim',
|
||||||
|
config = [[require('config.gitsigns')]],
|
||||||
|
event = 'User ActuallyEditing',
|
||||||
|
},
|
||||||
|
{ 'TimUntersberger/neogit', cmd = 'Neogit', config = [[require('config.neogit')]] },
|
||||||
|
{
|
||||||
|
'akinsho/git-conflict.nvim',
|
||||||
|
tag = '*',
|
||||||
|
config = [[require('git-conflict').setup()]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use { "catppuccin/nvim", as = "catppuccin"}
|
||||||
|
|
||||||
|
-- mine
|
||||||
|
use {
|
||||||
|
'squk/vim-quantum',
|
||||||
|
'squk/java-syntax.vim'
|
||||||
|
}
|
||||||
|
|
||||||
|
use 'ntpeters/vim-better-whitespace'
|
||||||
|
use 'junegunn/fzf.vim'
|
||||||
|
vim.opt.rtp:append(os.getenv("HOME") .. "/.fzf")
|
||||||
|
|
||||||
|
use 'nathanaelkane/vim-indent-guides'
|
||||||
|
use 'tversteeg/registers.nvim'
|
||||||
|
|
||||||
|
use 'airblade/vim-gitgutter'
|
||||||
|
use 'preservim/vimux'
|
||||||
|
use 'tmux-plugins/vim-tmux'
|
||||||
|
use 'christoomey/vim-tmux-navigator'
|
||||||
|
use 'whatyouhide/vim-tmux-syntax'
|
||||||
|
use 'skywind3000/asyncrun.vim'
|
||||||
|
|
||||||
|
use 'christoomey/vim-titlecase'
|
||||||
|
use 'chiedo/vim-case-convert'
|
||||||
|
|
||||||
|
use 'jremmen/vim-ripgrep'
|
||||||
|
|
||||||
|
use 'preservim/nerdtree'
|
||||||
|
use 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||||
|
|
||||||
|
use 'udalov/kotlin-vim'
|
||||||
|
|
||||||
|
use 'tmux-plugins/vim-tmux-focus-events'
|
||||||
|
use 'tpope/vim-obsession'
|
||||||
|
use 'Valloric/MatchTagAlways'
|
||||||
|
use 'wesQ3/vim-windowswap'
|
||||||
|
|
||||||
|
use 'tpope/vim-surround'
|
||||||
|
use 'scrooloose/nerdcommenter'
|
||||||
|
use 'mhinz/vim-signify'
|
||||||
|
use { 'j-hui/fidget.nvim', config = [[require("fidget").setup()]] }
|
||||||
|
|
||||||
|
-- Automatically set up your configuration after cloning packer.nvim
|
||||||
|
-- Put this at the end after all plugins
|
||||||
|
if packer_bootstrap then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
-- CiderLSP
|
-- CiderLSP
|
||||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
|
|
||||||
require 'lspconfig'
|
require('lspconfig')
|
||||||
|
|
||||||
require("lsp")
|
require("lsp")
|
||||||
require("diagnostics")
|
require("diagnostics")
|
||||||
require("treesitter")
|
require("treesitter")
|
||||||
@ -15,11 +159,7 @@ require("notify_config")
|
|||||||
require("catppuccin-config")
|
require("catppuccin-config")
|
||||||
require("symbols-outline-config")
|
require("symbols-outline-config")
|
||||||
|
|
||||||
require "fidget".setup{}
|
|
||||||
|
|
||||||
-- redundant w/ lsp_lines
|
-- redundant w/ lsp_lines
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = false,
|
virtual_text = false,
|
||||||
})
|
})
|
||||||
require("lsp_lines").setup()
|
|
||||||
require("scrollbar").setup()
|
|
||||||
|
Submodule vim/.vim/plugged/MatchTagAlways deleted from 352eb479a4
Submodule vim/.vim/plugged/asyncrun.vim deleted from eae766d218
Submodule vim/.vim/plugged/c-syntax.vim deleted from e0f36366b8
Submodule vim/.vim/plugged/catppuccin deleted from d5f8176232
Submodule vim/.vim/plugged/cloudformation-syntax.vim deleted from 20a5098e34
Submodule vim/.vim/plugged/cmp-buffer deleted from 3022dbc916
Submodule vim/.vim/plugged/cmp-nvim-lsp deleted from 3cf38d9c95
Submodule vim/.vim/plugged/cmp-nvim-lua deleted from d276254e71
Submodule vim/.vim/plugged/cmp-path deleted from 91ff86cd9c
Submodule vim/.vim/plugged/cmp-vsnip deleted from 1ae05c6c86
Submodule vim/.vim/plugged/ejs-syntax deleted from 0e704c523d
Submodule vim/.vim/plugged/emmet-vim deleted from def5d57a1a
Submodule vim/.vim/plugged/fidget.nvim deleted from 1097a86db8
Submodule vim/.vim/plugged/focuspoint-vim deleted from 72b6634d23
Submodule vim/.vim/plugged/gounit-vim deleted from 69ba1afa31
Submodule vim/.vim/plugged/gv.vim deleted from 1507838ee6
Submodule vim/.vim/plugged/java-syntax.vim deleted from 9a3d76a8c6
Submodule vim/.vim/plugged/kotlin-vim deleted from 1261f851e5
Submodule vim/.vim/plugged/linediff.vim deleted from c627858c6d
Submodule vim/.vim/plugged/lsp_lines.nvim deleted from 3b57922d2d
Submodule vim/.vim/plugged/lspkind.nvim deleted from c68b3a0034
Submodule vim/.vim/plugged/lualine.nvim deleted from edca2b03c7
Submodule vim/.vim/plugged/md-img-paste.vim deleted from 01d747cdde
Submodule vim/.vim/plugged/mkdir.nvim deleted from c55d1dee4f
Submodule vim/.vim/plugged/nerdcommenter deleted from fe74a1b890
Submodule vim/.vim/plugged/nerdtree deleted from fc85a6f07c
Submodule vim/.vim/plugged/nofrils deleted from bad6e49084
Submodule vim/.vim/plugged/nord-vim deleted from 0748955e9e
Submodule vim/.vim/plugged/nvim-cmp deleted from e94d348931
Submodule vim/.vim/plugged/nvim-gdb deleted from 4408d2c106
Submodule vim/.vim/plugged/nvim-lightbulb deleted from 56b9ce31ec
Submodule vim/.vim/plugged/nvim-lspconfig deleted from 2dd9e060f2
Submodule vim/.vim/plugged/nvim-notify deleted from 5e8d494297
Submodule vim/.vim/plugged/nvim-scrollbar deleted from ce0df6954a
Submodule vim/.vim/plugged/nvim-treesitter deleted from 9279bfea5e
Submodule vim/.vim/plugged/nvim-web-devicons deleted from 9061e2d355
Submodule vim/.vim/plugged/omnisharp-vim deleted from 7e88f137ad
Submodule vim/.vim/plugged/onedark.vim deleted from b6b5ffe31a
Submodule vim/.vim/plugged/onehalf deleted from 75eb2e97ac
Submodule vim/.vim/plugged/papercolor-theme deleted from 9051480ad9
Submodule vim/.vim/plugged/php.vim deleted from 930aec5c70
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user