Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#14 feat: toggle transparency #15

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ using `lazy`
lazy = false,
priority = 1000,
config = function()
-- Optional
-- vim.g.miasma_transparent = 1 -- Enable transparency
vim.cmd("colorscheme miasma")
end,
}
Expand All @@ -42,18 +44,27 @@ using `plug`

```vim
Plug 'xero/miasma.nvim'
" Optional
" let g:miasma_transparent = 1 -- Enable transparency
colorscheme miasma
```

using `packer`

```lua
use {"xero/miasma.nvim"}
use {
"xero/miasma.nvim",
config = function()
-- Optional
-- vim.g.miasma_transparent = 1 -- Enable transparency
end,
}
vim.cmd("colorscheme miasma")
```

## usage

enable transparency with `vim.g.miasma_transparent = 1` for lua or `let g:miasma_transparent = 1` for vim
set the color scheme with the builtin command `:colorscheme`

## customization
Expand Down
31 changes: 22 additions & 9 deletions colors/miasma.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@ endif
let colors_name="miasma"
let g:colors_name="miasma"

if exists("g:miasma_transparent") && g:miasma_transparent>= 1
hi Normal guifg=#D7C483 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi LineNr guifg=#666666 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi VertSplit guifg=#1c1c1c guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopeBorder guifg=#685742 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopePromptBorder guifg=#b36d43 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopeTitle guifg=#5f875f guibg=NONE guisp=NONE blend=NONE gui=NONE
hi Directory guifg=#78824b guibg=NONE guisp=NONE blend=NONE gui=NONE
hi StatusLine guifg=#d7c483 guibg=NONE guisp=NONE ctermbg=NONE blend=NONE gui=bold
hi StatusLineNC guifg=#666666 guibg=NONE guisp=NONE ctermbg=NONE blend=NONE gui=bold
else
hi Normal guifg=#D7C483 guibg=#222222 guisp=NONE blend=NONE gui=NONE
hi LineNr guifg=#666666 guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi VertSplit guifg=#1c1c1c guibg=#222222 guisp=NONE blend=NONE gui=NONE
hi TelescopeBorder guifg=#685742 guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi TelescopePromptBorder guifg=#b36d43 guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi TelescopeTitle guifg=#5f875f guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi Directory guifg=#78824b guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi StatusLine guifg=#d7c483 guibg=#222222 guisp=NONE blend=NONE gui=bold
hi StatusLineNC guifg=#666666 guibg=#222222 guisp=NONE blend=NONE gui=bold
endif

hi Boolean guifg=#78834b guibg=NONE guisp=NONE blend=NONE gui=NONE
hi ColorColumn guifg=NONE guibg=#222222 guisp=NONE blend=NONE gui=NONE
hi Comment guifg=#666666 guibg=NONE guisp=NONE blend=NONE gui=NONE
Expand Down Expand Up @@ -53,7 +75,6 @@ hi DiffChange guifg=#222222 guibg=#685742 guisp=NONE blend=NONE gui=NONE
hi DiffDelete guifg=#222222 guibg=#b36d43 guisp=NONE blend=NONE gui=bold
hi DiffRemoved guifg=#b36d43 guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi DiffText guifg=#222222 guibg=#c9a554 guisp=NONE blend=NONE gui=bold
hi Directory guifg=#78824b guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi Error guifg=#c2c2b0 guibg=#bb7744 guisp=NONE blend=NONE gui=NONE
hi ErrorMsg guifg=#b36d43 guibg=#222222 guisp=NONE blend=NONE gui=NONE
hi FloatShadow guifg=NONE guibg=#101010 guisp=NONE blend=NONE gui=NONE
Expand Down Expand Up @@ -120,7 +141,6 @@ hi LazyUrl guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi LazyValue guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi lCursor guifg=bg guibg=fg guisp=NONE blend=NONE gui=NONE
hi lessVariable guifg=#b36d43 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi LineNr guifg=#666666 guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi! link @boolean Boolean
hi! link Character Constant
hi! link @comment Comment
Expand Down Expand Up @@ -311,7 +331,6 @@ hi mustacheVariableUnescape guifg=#685742 guibg=NONE guisp=NONE blend=NONE gui=N
hi netrwClassify guifg=#666666 guibg=NONE guisp=NONE blend=NONE gui=bold
hi netrwExe guifg=#685742 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi NonText guifg=#666666 guibg=NONE guisp=NONE blend=NONE gui=bold
hi Normal guifg=#D7C483 guibg=#222222 guisp=NONE blend=NONE gui=NONE
hi Number guifg=#78824b guibg=NONE guisp=NONE blend=NONE gui=NONE
hi NvimInternalError guifg=#1c1c1c guibg=#b36d43 guisp=NONE blend=NONE gui=NONE
hi phpIdentifier guifg=#b36d43 guibg=NONE guisp=NONE blend=NONE gui=NONE
Expand Down Expand Up @@ -356,8 +375,6 @@ hi SpellCap guifg=#5f875f guibg=NONE guisp=#d7c483 blend=NONE gui=underline
hi SpellLocal guifg=#bb7744 guibg=NONE guisp=#d7c483 blend=NONE gui=underline
hi SpellRare guifg=#b36d43 guibg=NONE guisp=#d7c483 blend=NONE gui=underline
hi Statement guifg=#5f875f guibg=NONE guisp=NONE blend=NONE gui=bold
hi StatusLine guifg=#d7c483 guibg=#222222 guisp=NONE blend=NONE gui=bold
hi StatusLineNC guifg=#666666 guibg=#222222 guisp=NONE blend=NONE gui=bold
hi String guifg=#685742 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi SyntasticErrorSign guifg=#b36d43 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi SyntasticWarningSign guifg=#685742 guibg=NONE guisp=NONE blend=NONE gui=NONE
Expand All @@ -366,7 +383,6 @@ hi TabLine guifg=#666666 guibg=#111111 guisp=NONE blend=NONE gui=NONE
hi TabLineSel guifg=#111111 guibg=#78834b guisp=NONE blend=NONE gui=bold
hi TabLineSelSep guifg=#78834b guibg=#1c1c1c guisp=NONE blend=NONE gui=bold
hi TabLineSep guifg=#111111 guibg=#222222 guisp=NONE blend=NONE gui=NONE
hi TelescopeBorder guifg=#685742 guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi TelescopeMultiIcon guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopeMultiSelection guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopeNormal guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
Expand All @@ -389,7 +405,6 @@ hi TelescopePreviewSocket guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopePreviewSticky guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopePreviewUser guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopePreviewWrite guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopePromptBorder guifg=#b36d43 guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi TelescopePromptNormal guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopeResultsClass guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopeResultsComment guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
Expand All @@ -407,7 +422,6 @@ hi TelescopeResultsSpecialComment guifg=NONE guibg=NONE guisp=NONE blend=NONE gu
hi TelescopeResultsStruct guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopeResultsVariable guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=NONE
hi TelescopeSelectionCaret guifg=#d7c483 guibg=#78824b guisp=NONE blend=NONE gui=NONE
hi TelescopeTitle guifg=#5f875f guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
hi TermCursor guifg=NONE guibg=NONE guisp=NONE blend=NONE gui=reverse
hi Title guifg=#b36d43 guibg=NONE guisp=NONE blend=NONE gui=bold
hi Todo guifg=#d7c483 guibg=NONE guisp=NONE blend=NONE gui=bold,underline
Expand All @@ -422,7 +436,6 @@ hi User6 guifg=#d7c483 guibg=#c9a554 guisp=NONE blend=NONE gui=NONE
hi User7 guifg=#d7c483 guibg=#78824b guisp=NONE blend=NONE gui=NONE
hi User8 guifg=#d7c483 guibg=#b36d43 guisp=NONE blend=NONE gui=NONE
hi User9 guifg=#d7c483 guibg=#666666 guisp=NONE blend=NONE gui=NONE
hi VertSplit guifg=#1c1c1c guibg=#222222 guisp=NONE blend=NONE gui=NONE
hi Visual guifg=#222222 guibg=#78824b guisp=NONE blend=NONE gui=NONE
hi WarningMsg guifg=#b36d43 guibg=NONE guisp=NONE blend=NONE gui=NONE
hi WhichKeyBorder guifg=NONE guibg=#1c1c1c guisp=NONE blend=NONE gui=NONE
Expand Down