diff --git a/btop/.config/themes/rose-pine.theme b/btop/.config/themes/rose-pine.theme new file mode 100644 index 0000000..85fcdb5 --- /dev/null +++ b/btop/.config/themes/rose-pine.theme @@ -0,0 +1,119 @@ +# Main background, empty for terminal default, need to be empty if you want transparent background +theme[main_bg]="" +# Base + +# Main text color +theme[main_fg]="#e0def4" +# Text + +# Title color for boxes +theme[title]="#908caa" +# Subtle + +# Highlight color for keyboard shortcuts +theme[hi_fg]="#e0def4" +# Text + +# Background color of selected item in processes box +theme[selected_bg]="#524f67" +# HL High + +# Foreground color of selected item in processes box +theme[selected_fg]="#f6c177" +# Gold + +# Color of inactive/disabled text +theme[inactive_fg]="#403d52" +# HL Med + +# Color of text appearing on top of graphs, i.e uptime and current network graph scaling +theme[graph_text]="#9ccfd8" +# Foam + +# Background color of the percentage meters +theme[meter_bg]="#9ccfd8" +# Foam + +# Misc colors for processes box including mini cpu graphs, details memory graph and details status text +theme[proc_misc]="#c4a7e7" +# Iris + +# Cpu box outline color +theme[cpu_box]="#ebbcba" +# Rose + +# Memory/disks box outline color +theme[mem_box]="#31748f" +# Pine + +# Net up/down box outline color +theme[net_box]="#c4a7e7" +# Iris + +# Processes box outline color +theme[proc_box]="#eb6f92" +# Love + +# Box divider line and small boxes line color +theme[div_line]="#6e6a86" +# Muted + +# Temperature graph colors +theme[temp_start]="#ebbcba" +# Rose +theme[temp_mid]="#f6c177" +# Gold +theme[temp_end]="#eb6f92" +# Love + +# CPU graph colors +theme[cpu_start]="#f6c177" +# Gold +theme[cpu_mid]="#ebbcba" +# Rose +theme[cpu_end]="#eb6f92" +# Love + +# Mem/Disk free meter +# all love +theme[free_start]="#eb6f92" +theme[free_mid]="#eb6f92" +theme[free_end]="#eb6f92" + +# Mem/Disk cached meter +# all iris +theme[cached_start]="#c4a7e7" +theme[cached_mid]="#c4a7e7" +theme[cached_end]="#c4a7e7" + +# Mem/Disk available meter +# all pine +theme[available_start]="#31748f" +theme[available_mid]="#31748f" +theme[available_end]="#31748f" + +# Mem/Disk used meter +# all rose +theme[used_start]="#ebbcba" +theme[used_mid]="#ebbcba" +theme[used_end]="#ebbcba" + +# Download graph colors +# Pine for start, foam for the rest +theme[download_start]="#31748f" +theme[download_mid]="#9ccfd8" +theme[download_end]="#9ccfd8" + +# Upload graph colors +theme[upload_start]="#ebbcba" +# Rose for start +theme[upload_mid]="#eb6f92" +# Love for mid and end +theme[upload_end]="#eb6f92" + +# Process box color gradient for threads, mem and cpu usage +theme[process_start]="#31748f" +# Pine +theme[process_mid]="#9ccfd8" +# Foam for mid and end +theme[process_end]="#9ccfd8" diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index da0a4d0..3cb8438 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -40,7 +40,14 @@ vim.api.nvim_create_autocmd({ "DirChanged", "VimEnter" }, { callback = function() local cwdString = vim.fn.getcwd() local length = cwdString:len() - local desiredLength = 32 + local _, j = string.find(cwdString, "/home/andrzej/") + if j ~= nil then + cwdString = "~" .. string.sub(cwdString, j, length) + length = cwdString:len() + end + + length = cwdString:len() + local desiredLength = 40 if desiredLength < length then vim.g.cwdShortened = "..." .. cwdString:sub(length - 16, length) else diff --git a/nvim/.config/nvim/lua/plugins/autoformat.lua b/nvim/.config/nvim/lua/plugins/autoformat.lua index 485e286..49046ff 100644 --- a/nvim/.config/nvim/lua/plugins/autoformat.lua +++ b/nvim/.config/nvim/lua/plugins/autoformat.lua @@ -21,6 +21,7 @@ return { -- Autoformat -- is found. javascript = { { "prettierd", "prettier" } }, bash = { "shellcheck" }, + htmlangular = { "prettierd", "prettier", "ts_ls" }, }, }, } diff --git a/nvim/.config/nvim/lua/plugins/lualine.lua b/nvim/.config/nvim/lua/plugins/lualine.lua index de415eb..60ba9cc 100644 --- a/nvim/.config/nvim/lua/plugins/lualine.lua +++ b/nvim/.config/nvim/lua/plugins/lualine.lua @@ -27,8 +27,8 @@ return { lualine_a = { "mode", "vim.g.cmptoggle and 'cmp'", "branch" }, lualine_b = { "vim.g.cwdShortened", "diff", "diagnostics" }, lualine_c = { "filename" }, - lualine_x = { "buffers" }, - lualine_y = { "encoding", "filetype", "progress" }, + lualine_x = {}, + lualine_y = { "filetype" }, lualine_z = { { prose.word_count, cond = prose.is_available }, { prose.reading_time, cond = prose.is_available }, diff --git a/nvim/.config/nvim/lua/plugins/section-wordcount.lua b/nvim/.config/nvim/lua/plugins/section-wordcount.lua new file mode 100644 index 0000000..55bf542 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/section-wordcount.lua @@ -0,0 +1,10 @@ +return { + "dimfeld/section-wordcount.nvim", + config = function() + require("section-wordcount").setup({ + -- These are the default values and can be omitted + highlight = "String", + virt_text_pos = "eol", + }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/themes.lua b/nvim/.config/nvim/lua/plugins/themes.lua index ae6a67b..59bcaad 100644 --- a/nvim/.config/nvim/lua/plugins/themes.lua +++ b/nvim/.config/nvim/lua/plugins/themes.lua @@ -83,4 +83,6 @@ return { { "EdenEast/nightfox.nvim", priority = 1000 }, { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, { "folke/tokyonight.nvim", priority = 1000 }, + { "mellow-theme/mellow.nvim" }, + { "bettervim/yugen.nvim" }, } diff --git a/nvim/.config/nvim/lua/plugins/ufo-folding.lua b/nvim/.config/nvim/lua/plugins/ufo-folding.lua index 39ff839..39f053d 100644 --- a/nvim/.config/nvim/lua/plugins/ufo-folding.lua +++ b/nvim/.config/nvim/lua/plugins/ufo-folding.lua @@ -8,7 +8,47 @@ return { vim.o.foldenable = true vim.keymap.set("n", "zR", require("ufo").openAllFolds) vim.keymap.set("n", "zM", require("ufo").closeAllFolds) + + local handler = function(virtText, lnum, endLnum, width, truncate, x) + -- local newVirtText = {} + -- local suffix = (" 󰁂 %d "):format(endLnum - lnum) + -- local sufWidth = vim.fn.strdisplaywidth(suffix) + -- local targetWidth = width - sufWidth + -- local curWidth = 0 + -- for _, chunk in ipairs(virtText) do + -- local chunkText = chunk[1] + -- local chunkWidth = vim.fn.strdisplaywidth(chunkText) + -- if targetWidth > curWidth + chunkWidth then + -- table.insert(newVirtText, chunk) + -- else + -- chunkText = truncate(chunkText, targetWidth - curWidth) + -- local hlGroup = chunk[2] + -- table.insert(newVirtText, { chunkText, hlGroup }) + -- chunkWidth = vim.fn.strdisplaywidth(chunkText) + -- -- str width returned from truncate() may less than 2nd argument, need padding + -- if curWidth + chunkWidth < targetWidth then + -- suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) + -- end + -- break + -- end + -- curWidth = curWidth + chunkWidth + -- end + -- table.insert(newVirtText, { suffix, "MoreMsg" }) + return virtText + end + require("ufo").setup({ + fold_virt_text_handler = handler, + open_fold_hl_timeout = 0, + close_fold_kinds_for_ft = {}, + enable_get_fold_virt_text = true, + preview = { + win_config = { + border = { "", "─", "", "", "", "─", "", "" }, + winhighlight = "Normal:Folded", + winblend = 0, + }, + }, provider_selector = function(bufnr, filetype, buftype) return { "treesitter", "indent" } end, diff --git a/nvim/.config/nvim/lua/prose_mode.lua b/nvim/.config/nvim/lua/prose_mode.lua index 46a7580..5f75b42 100644 --- a/nvim/.config/nvim/lua/prose_mode.lua +++ b/nvim/.config/nvim/lua/prose_mode.lua @@ -6,6 +6,7 @@ vim.api.nvim_create_autocmd({ "Bufenter" }, { callback = function() if vim.bo.buftype ~= "nofile" and vim.bo.filetype == "markdown" then vim.cmd("PencilSoft") + require("section-wordcount").wordcounter({}) setProseModeVars(true) else vim.cmd("PencilOff") diff --git a/zsh/.zshrc b/zsh/.zshrc index cac2896..ce53674 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -44,8 +44,8 @@ SAVEHIST=10000 # Share history in every terminal session setopt SHARE_HISTORY -# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -##GO -export GOPATH=$HOME/go -path+=("${GOPATH}/bin") + +# Load Angular CLI autocompletion. +source <(ng completion script)