Comments (17)
Here is a very basic watcher plugin:
https://github.com/rktjmp/fwatch.nvim
The API for that plugin might change as I think about it more and it probably has a bug or two, but it should let you at least try the idea.
You need to make your background change effect a file somehow.
from lush.nvim.
@rktjmp the watch works perfect making this totally dynamic! Thanks!
from lush.nvim.
Stumbled upon this thread after I found your pywal lush theme and modified to work with wpgtk, and was looking for dynamic reloading. Thanks a lot to both of you for your work
from lush.nvim.
Closing this as it seems to be sorted out.
from lush.nvim.
I'm working on a pywal based theme, which ingesting the pywal colors from ~/.cache/was/colors and thanks working great. However, I'm unable to get the background to be transparent.
Generally that's dependent on the terminal and set separately I think?
Also is there any facility to reapply lush based on an event? Currently I have to rerun Lushify when I change a background.
You mean from an external-to-vim event? I think you can hook into nvim via it's RPC system and basically use that to tell lush to re-run (or rather, just tell vim to reload it's colorscheme). I'm not sure how complicated that would be though, depends on what's changing your wallpaper and your language/msgpack library.
Another option would be making a small plugin that watches a file for changes and executes a command when they change. I might look at making that actually.
from lush.nvim.
In your case you're probably doing something like:
lua << EOF
local fwatch = require('fwatch')
fwatch.watch("/home/deepsix/.config/feh_config_file_or_whatever", "colorscheme my_scheme")
EOF
?
from lush.nvim.
@rktjmp I've published my really rough (but working) pywal based theme, I am definitely open to suggestions, this is my first Lua program, and I really don't consider myself a developer per se. I'm sure you can improve upon it, more importantly I think long term basing it on pywal might not be the greatest idea because it often times doesn't extract more than 8 colours for a pallete.
I am still unable to get lightline or transparency to work..
Code is here:
https://github.com/Deep-Six/pywal-lush
from lush.nvim.
That's actually pretty neat if not somewhat unpredictable.
I managed to get the auto application working with fwatch
, but you have to put a small timer to avoid trying to generate the scheme from a half updated file.
I just put this after where I set my colorscheme
lua << EOF
fwatch = require('fwatch')
fwatch.watch("/home/soup/.cache/wal/colors", {
-- when file changes
on_event = function()
-- wait 200ms then
vim.defer_fn(function()
-- reapply the colorscheme
vim.cmd("colorscheme pywal")
end, 200)
end
})
EOF
Lightline is pretty awkward. You can see in the examples a bit on how to get it to work, it involves basically building a separate dictionary for lightline and then turning it off and on again.
Not sure if all status lines are like that or not, I think lualine just uses regular highlight groups so lush should just be able to set them no problem.
The transparency (as in, see wallpaper through vim) stuff will be per-terminal and not controlled by lush or vim.
from lush.nvim.
from lush.nvim.
Since the issue title is still background transparency, I am experiencing the following; with some wallpapers (and associated color scheme) my vim background is non-existent (as desired), but with some, there is a background. I'm not sure what's causing this, do you have any idea how I can make them all transparent?
from lush.nvim.
Possibly pywal/wpgtk sets something funny depending on what the background is? Sounds weird though.
Does it persist if you re-open the terminal? It may be something like compiz/picom/whatever acting up.
That sporadic strip down the right is from the ColorColumn
group, see :h colorcolumn
for info on disabling it.
Actually, the ColorColumn seems like it's never being blended, maybe because it's so dark. I wonder if the term/compositor has trouble mixing dark colours and some wallpapers just have darker backgrounds?
from lush.nvim.
The background colors do change per wallpaper, but are all a slightly different shade of black/gray. Re-opening the terminal doesn't change anything. What's funny is that only with 3 specific wallpapers I always have a transparent background, with the rest I don't.
Before migrating over to lua, I used the native .vim theme for pywal/wpgtk, and there I had no problems. However then I was also in 8 bit color mode, this is 24 bit color mode.
The color column is intentional yeah
from lush.nvim.
Okay so its probaby because a background is explicitly set on all highlight groups. If I remove the bg=
call from a specific highlight group, that group gets transparent.
Edit: after removing all bg = color1
in my case everything is transparent. I do agree this is probably only necessary because picom doesn't mix them properly.
from lush.nvim.
from lush.nvim.
Background works perfectly now, after deleting all explicit bg =
color definitions for right highlight groups
from lush.nvim.
from lush.nvim.
Just run :%s/ bg = color1,//g
<< that's all I've done to solve the the background issue
from lush.nvim.
Related Issues (20)
- Unreliable Lushify behaviour HOT 1
- Using new Treesitter groups/tags HOT 4
- How to specify treesitter highlight groups? HOT 2
- How to define treesitter `@x.y` groups HOT 14
- Transparent function HOT 4
- separate colors for keywords and brackets in JavaScript? HOT 3
- Theme the nvim-cmp HOT 2
- `:LushImport` broken HOT 5
- `:Lushify` doesn't work with `lush.extends()` HOT 2
- Built-in support for `g:terminal_color_*` variables HOT 1
- Following the guide to configure an existing theme removes icon colors HOT 7
- Changing boilerplate `sed` code results in error in Mac HOT 4
- `Cursor` highlight group appears not to be working HOT 1
- HSV support ? HOT 2
- `LushImport` doesn't work and errors saying bad argument HOT 3
- slow startup time HOT 8
- Cannot add colour variation for filetype sh HOT 4
- Add warning in :LushRunTutorial to avoid loss of work with naive `:w`'s HOT 1
- Error `bad argument #1 to 'unpack' (table expected, got nil)` HOT 8
- altfont style support is missing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lush.nvim.