From bb854ed3c1d303c5c7f51fde300e89f94444fa69 Mon Sep 17 00:00:00 2001 From: Abhishek Keshri Date: Mon, 10 Jun 2024 23:28:03 +0530 Subject: [PATCH 1/5] feat: move transparency to configs --- configs/{ => neovim}/lazyvim.json | 0 configs/neovim/transparency.lua | 22 ++++++++++++++++++++++ install/app-neovim.sh | 4 +++- 3 files changed, 25 insertions(+), 1 deletion(-) rename configs/{ => neovim}/lazyvim.json (100%) create mode 100644 configs/neovim/transparency.lua diff --git a/configs/lazyvim.json b/configs/neovim/lazyvim.json similarity index 100% rename from configs/lazyvim.json rename to configs/neovim/lazyvim.json diff --git a/configs/neovim/transparency.lua b/configs/neovim/transparency.lua new file mode 100644 index 0000000..a7717fc --- /dev/null +++ b/configs/neovim/transparency.lua @@ -0,0 +1,22 @@ +-- transparent background +vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'Pmenu', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'Terminal', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'EndOfBuffer', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'FoldColumn', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'Folded', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'SignColumn', { bg = 'none' }) + +-- transparent background for neotree +vim.api.nvim_set_hl(0, 'NeoTreeNormal', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NeoTreeNormalNC', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NeoTreeVertSplit', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NeoTreeWinSeparator', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NeoTreeEndOfBuffer', { bg = 'none' }) + +-- transparent background for nvim-tree +vim.api.nvim_set_hl(0, 'NvimTreeNormal', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NvimTreeVertSplit', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NvimTreeEndOfBuffer', { bg = 'none' }) diff --git a/install/app-neovim.sh b/install/app-neovim.sh index 0152f64..df3b77f 100644 --- a/install/app-neovim.sh +++ b/install/app-neovim.sh @@ -4,8 +4,10 @@ sudo apt install -y neovim if [ ! -d "$HOME/.config/nvim" ]; then git clone https://github.com/LazyVim/starter ~/.config/nvim + mkdir -p ~/.config/nvim/lua/plugin/after + cp ~/.local/share/omakub/configs/neovim/transparency.lua ~/.config/nvim/plugin/after/ cp ~/.local/share/omakub/themes/neovim/tokyo-night.lua ~/.config/nvim/lua/plugins/theme.lua # Enable default extras - cp ~/.local/share/omakub/configs/lazyvim.json ~/.config/nvim/lazyvim.json + cp ~/.local/share/omakub/configs/neovim/lazyvim.json ~/.config/nvim/lazyvim.json fi From eb8555334a69fef5c736828bc7f425045e580321 Mon Sep 17 00:00:00 2001 From: Abhishek Keshri Date: Mon, 10 Jun 2024 23:31:54 +0530 Subject: [PATCH 2/5] fix: typos in theme names --- themes/neovim/tokyo-night.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/themes/neovim/tokyo-night.lua b/themes/neovim/tokyo-night.lua index d8ea440..cb343dd 100644 --- a/themes/neovim/tokyo-night.lua +++ b/themes/neovim/tokyo-night.lua @@ -1,18 +1,9 @@ return { + { "folke/tokyonight.nvim" }, { "LazyVim/LazyVim", opts = { colorscheme = "tokyonight", }, }, - { - "folke/tokyonight.nvim", - opts = { - transparent = true, - styles = { - sidebars = "transparent", - floats = "transparent", - }, - }, - }, } From ff1d91d246eee284c5c7e09abacecedd79e4ea2f Mon Sep 17 00:00:00 2001 From: Abhishek Keshri Date: Mon, 10 Jun 2024 23:48:22 +0530 Subject: [PATCH 3/5] feat: check nvim transparency on theme change --- bin/omakub-theme | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/omakub-theme b/bin/omakub-theme index 291b640..165a0ba 100644 --- a/bin/omakub-theme +++ b/bin/omakub-theme @@ -7,6 +7,12 @@ THEME=$(gum choose "${THEME_NAMES[@]}" --header "Choose your theme" --height 9 | # Install theme in Gnome, Terminal, and both default editors source $OMAKUB_PATH/themes/gnome/$THEME.sh cp $OMAKUB_PATH/themes/alacritty/$THEME.toml ~/.config/alacritty/theme.toml + +if [ ! -f ~/.config/nvim/plugin/after/transparency.lua ]; then + mkdir -p ~/.config/nvim/plugin/after + cp $OMAKUB_PATH/configs/neovim/transparency.lua ~/.config/nvim/plugin/after/transparency.lua +fi + cp $OMAKUB_PATH/themes/neovim/$THEME.lua ~/.config/nvim/lua/plugins/theme.lua sed -i "s/theme \".*\"/theme \"$THEME\"/g" ~/.config/zellij/config.kdl From 03c313b9600339f623e080c8cf52dd8c4b5c3c06 Mon Sep 17 00:00:00 2001 From: Abhishek Keshri Date: Tue, 11 Jun 2024 00:52:49 +0530 Subject: [PATCH 4/5] fix: mkdir path for after folder --- install/app-neovim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/app-neovim.sh b/install/app-neovim.sh index df3b77f..d209dda 100644 --- a/install/app-neovim.sh +++ b/install/app-neovim.sh @@ -4,7 +4,7 @@ sudo apt install -y neovim if [ ! -d "$HOME/.config/nvim" ]; then git clone https://github.com/LazyVim/starter ~/.config/nvim - mkdir -p ~/.config/nvim/lua/plugin/after + mkdir -p ~/.config/nvim/plugin/after cp ~/.local/share/omakub/configs/neovim/transparency.lua ~/.config/nvim/plugin/after/ cp ~/.local/share/omakub/themes/neovim/tokyo-night.lua ~/.config/nvim/lua/plugins/theme.lua From 42208fb48833f0364fc4c396dd80f3dd5bfab06e Mon Sep 17 00:00:00 2001 From: Abhishek Keshri Date: Tue, 11 Jun 2024 01:36:55 +0530 Subject: [PATCH 5/5] fix: remove custom theme configs --- themes/neovim/catppuccin.lua | 6 ------ themes/neovim/tokyo-night.lua | 1 - 2 files changed, 7 deletions(-) diff --git a/themes/neovim/catppuccin.lua b/themes/neovim/catppuccin.lua index a1cd989..dbe34f5 100644 --- a/themes/neovim/catppuccin.lua +++ b/themes/neovim/catppuccin.lua @@ -1,10 +1,4 @@ return { - { - "catppuccin", - opts = { - transparent_background = true, - }, - }, { "LazyVim/LazyVim", opts = { diff --git a/themes/neovim/tokyo-night.lua b/themes/neovim/tokyo-night.lua index cb343dd..dad2d30 100644 --- a/themes/neovim/tokyo-night.lua +++ b/themes/neovim/tokyo-night.lua @@ -1,5 +1,4 @@ return { - { "folke/tokyonight.nvim" }, { "LazyVim/LazyVim", opts = {