auto light/dark scheme for neovim
This commit is contained in:
@@ -129,6 +129,7 @@ Singleton {
|
|||||||
schemeGeneration: general.color.schemeGeneration,
|
schemeGeneration: general.color.schemeGeneration,
|
||||||
scheduleDarkStart: general.color.scheduleDarkStart,
|
scheduleDarkStart: general.color.scheduleDarkStart,
|
||||||
scheduleDarkEnd: general.color.scheduleDarkEnd
|
scheduleDarkEnd: general.color.scheduleDarkEnd
|
||||||
|
neovimColors: general.color.neovimColors
|
||||||
},
|
},
|
||||||
apps: {
|
apps: {
|
||||||
terminal: general.apps.terminal,
|
terminal: general.apps.terminal,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ JsonObject {
|
|||||||
property string mode: "dark"
|
property string mode: "dark"
|
||||||
property int scheduleDarkStart: 0
|
property int scheduleDarkStart: 0
|
||||||
property int scheduleDarkEnd: 0
|
property int scheduleDarkEnd: 0
|
||||||
|
property bool neovimColors: false
|
||||||
}
|
}
|
||||||
|
|
||||||
component Apps: JsonObject {
|
component Apps: JsonObject {
|
||||||
|
|||||||
@@ -47,12 +47,14 @@ Singleton {
|
|||||||
|
|
||||||
Quickshell.execDetached(["sh", "-c", `sed -i 's/color_scheme_path=\\(.*\\)Light.colors/color_scheme_path=\\1Dark.colors/' ${Paths.home}/.config/qt6ct/qt6ct.conf`])
|
Quickshell.execDetached(["sh", "-c", `sed -i 's/color_scheme_path=\\(.*\\)Light.colors/color_scheme_path=\\1Dark.colors/' ${Paths.home}/.config/qt6ct/qt6ct.conf`])
|
||||||
|
|
||||||
|
Quickshell.execDetached(["sed", "-i", "'s/\\(vim.cmd.colorscheme \\).*/\\1\"tokyodark\"/'", "~/.config/nvim/lua/config/load-colorscheme.lua"])
|
||||||
|
|
||||||
if( Config.general.color.wallust )
|
if( Config.general.color.wallust )
|
||||||
Wallust.generateColors(WallpaperPath.currentWallpaperPath);
|
Wallust.generateColors(WallpaperPath.currentWallpaperPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyLightMode() {
|
function applyLightMode() {
|
||||||
if ( Config.general.color.schemeGeneration ) {
|
if ( Config.general.color.neovimColors ) {
|
||||||
Quickshell.execDetached(["zshell-cli", "scheme", "generate", "--image-path", `${WallpaperPath.currentWallpaperPath}`, "--thumbnail-path", `${Paths.cache}/imagecache/thumbnail.jpg`, "--output", `${Paths.state}/scheme.json`, "--scheme", `${Config.colors.schemeType}`, "--mode", "light"]);
|
Quickshell.execDetached(["zshell-cli", "scheme", "generate", "--image-path", `${WallpaperPath.currentWallpaperPath}`, "--thumbnail-path", `${Paths.cache}/imagecache/thumbnail.jpg`, "--output", `${Paths.state}/scheme.json`, "--scheme", `${Config.colors.schemeType}`, "--mode", "light"]);
|
||||||
} else {
|
} else {
|
||||||
Quickshell.execDetached(["zshell-cli", "scheme", "generate", "--preset", `${DynamicColors.scheme}:${DynamicColors.flavour}`, "--output", `${Paths.state}/scheme.json`, "--mode", "light"]);
|
Quickshell.execDetached(["zshell-cli", "scheme", "generate", "--preset", `${DynamicColors.scheme}:${DynamicColors.flavour}`, "--output", `${Paths.state}/scheme.json`, "--mode", "light"]);
|
||||||
@@ -64,6 +66,9 @@ Singleton {
|
|||||||
|
|
||||||
Quickshell.execDetached(["sh", "-c", `sed -i 's/color_scheme_path=\\(.*\\)Dark.colors/color_scheme_path=\\1Light.colors/' ${Paths.home}/.config/qt6ct/qt6ct.conf`])
|
Quickshell.execDetached(["sh", "-c", `sed -i 's/color_scheme_path=\\(.*\\)Dark.colors/color_scheme_path=\\1Light.colors/' ${Paths.home}/.config/qt6ct/qt6ct.conf`])
|
||||||
|
|
||||||
|
if ( Config.general.color.neovimColors )
|
||||||
|
Quickshell.execDetached(["sed", "-i", "'s/\\(vim.cmd.colorscheme \\).*/\\1\"onelight\"/'", "~/.config/nvim/lua/config/load-colorscheme.lua"])
|
||||||
|
|
||||||
if( Config.general.color.wallust )
|
if( Config.general.color.wallust )
|
||||||
Wallust.generateColors(WallpaperPath.currentWallpaperPath);
|
Wallust.generateColors(WallpaperPath.currentWallpaperPath);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user