From bbc8bdbea2bfcc22ea28db97188072ad03f1d6a2 Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:33:29 +0100 Subject: [PATCH 1/9] btop theme --- btop/.config/themes/rose-pine.theme | 119 ++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 btop/.config/themes/rose-pine.theme 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" From b55ed535729273efa95aa8e36ffdcc577466f06f Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:33:40 +0100 Subject: [PATCH 2/9] add formatting for angular --- nvim/.config/nvim/lua/plugins/autoformat.lua | 1 + 1 file changed, 1 insertion(+) 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" }, }, }, } From 4fa602f75f2ac897a10b0135cbae24a8d094d9d0 Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:33:50 +0100 Subject: [PATCH 3/9] strip down lualine --- nvim/.config/nvim/lua/plugins/lualine.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/lualine.lua b/nvim/.config/nvim/lua/plugins/lualine.lua index 7828248..e501a4d 100644 --- a/nvim/.config/nvim/lua/plugins/lualine.lua +++ b/nvim/.config/nvim/lua/plugins/lualine.lua @@ -26,8 +26,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 = { --"vim.g.cwdShortened" -- "datetime", From cc0fd3c31a3028827c55b785264ed84dd98c0390 Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:34:08 +0100 Subject: [PATCH 4/9] wordcount --- nvim/.config/nvim/lua/plugins/section-wordcount.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 nvim/.config/nvim/lua/plugins/section-wordcount.lua 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, +} From 091d0ab6bb1860a993a2154e6be1bfeb526195a8 Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:34:12 +0100 Subject: [PATCH 5/9] add themes --- nvim/.config/nvim/lua/plugins/themes.lua | 2 ++ 1 file changed, 2 insertions(+) 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" }, } From 8b461f90789eff1594bc25e3493c9cb451110905 Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:34:26 +0100 Subject: [PATCH 6/9] custom v text --- nvim/.config/nvim/lua/plugins/ufo-folding.lua | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) 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, From 275a9e9d94c1e069891c1c79f021da409242dca3 Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:34:40 +0100 Subject: [PATCH 7/9] use wordcounter in prose mode --- nvim/.config/nvim/lua/prose_mode.lua | 1 + 1 file changed, 1 insertion(+) 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") From 994f2906bf3d8409dd1f8bfb5a6d7b7e082f32cf Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:34:57 +0100 Subject: [PATCH 8/9] shorter cwd for statusline --- nvim/.config/nvim/init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 From 609f11ab7dbfacd742510a9c599d6a188b8af5c5 Mon Sep 17 00:00:00 2001 From: andrzej Date: Thu, 7 Nov 2024 13:35:03 +0100 Subject: [PATCH 9/9] angular cli --- zsh/.zshrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index f6e4283..35814d9 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -45,3 +45,7 @@ SAVEHIST=10000 setopt SHARE_HISTORY [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + + +# Load Angular CLI autocompletion. +source <(ng completion script)