cormacrelf / dark-notify Goto Github PK
View Code? Open in Web Editor NEWWatcher for macOS 10.14+ light/dark mode changes
Watcher for macOS 10.14+ light/dark mode changes
Currently there's an option to run a shell command when calling dark-notify directly. Is that possible when inside neovim?
I've got dark-notify setup like thus:
local dn = require('dark_notify')
dn.run({
schemes = {
dark = {
colorscheme = My_theme_dark,
lightline = My_themel_dark
},
light = {
colorscheme = My_theme_light,
lightline = My_themel_light
}
};
})
-- Draw the blinds for now
dn.set_mode("dark")
-- Swap to whatever it isn't currently
dn.toggle()
-- Match the system
dn.update()
-- Stop reacting to changes
dn.stop()
-- Start reacting again, with previous settings
dn.run()
With the above lines, loading and automatic switching of themes work well. But (neo)vim opens up to an empty screen. The intro isn't shown. Admittedly, this is a minor issue; still annoying though.
Actual result: empty screen; no intro info.
Expected result: intro info (as shown if running command intro
).
Any pointers?
Pretty much the title and if yes, would this still work if nvim was running inside tmux?
Amazing little thing you have got here, thanks a lot! I am wondering if you are planing to move swift branch forward, as I understand it would allow dark-notify to also run on apple chips computers.
Anything I could do to help?
Simple test, something like
dark-notify -c 'touch' &
Change system theme while this is running, file is not created. But when back into fg
, then you see the file dark
or light
appear. I would like this to work even in background process to change my kitty theme.
When macOS is in dark mode and I invoke nvim
, the screen flashes white.
However, if I have dn.update()
in my init.vim
, the opposite happens, i.e. in light mode the screen flashes black.
This only happens with colorscheme toast
, presumably because it allows set background=light
/set background=dark
nvim
First, thanks for this great plugin. I very much enjoy not having to manually toggle all vim instances when the system mode changes!
Lately I've came across at least three plugins that does something with text highlighting that does not work super great with dark-notify.
onchange
method.onchange
method did not work in this case.Would it be possible to make this plugin more compatible by default with other plugins? Or would you have an idea on how to work around using any of the two latter plugins above together with dark-notify?
I'm on Neovim v0.7.2
.
Thanks in advance!
I would like to query the current theme and not listen to changes. Is that possible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.