auto switch vim theme

This commit is contained in:
Miguel Palhas
2026-02-18 10:20:18 +00:00
parent a5089b77e9
commit bd80c370bf
2 changed files with 17 additions and 3 deletions
Generated
+3 -3
View File
@@ -904,11 +904,11 @@
"nvchad-starter": {
"flake": false,
"locked": {
"lastModified": 1771259985,
"narHash": "sha256-WDAH2Rn5udhULSMV76g6qj8WUZNKKtQJwn6SiqZmIfU=",
"lastModified": 1771409949,
"narHash": "sha256-dlG2mQI9GL6mO8A3XwpeNjoJGf7SHvnqCbC4inebjYA=",
"owner": "naps62",
"repo": "nvchad-starter",
"rev": "a16bb42a45a02836c449d88f78f823de81be6971",
"rev": "562ac89abb5fdd2c762862f4c1cb6f87eec083a7",
"type": "github"
},
"original": {
+14
View File
@@ -38,6 +38,13 @@
noctalia-theme = ''
noctalia-shell ipc call darkMode setDark
'';
neovim-theme = ''
for sock in /run/user/$(id -u)/nvim.*.0; do
[ -S "$sock" ] && ${pkgs.neovim}/bin/nvim --server "$sock" \
--remote-expr 'luaeval("require(\"theme-sync\").apply_theme(\"dark\")")' \
2>/dev/null || true
done
'';
};
lightModeScripts = {
gtk-theme = ''
@@ -71,6 +78,13 @@
noctalia-theme = ''
noctalia-shell ipc call darkMode setLight
'';
neovim-theme = ''
for sock in /run/user/$(id -u)/nvim.*.0; do
[ -S "$sock" ] && ${pkgs.neovim}/bin/nvim --server "$sock" \
--remote-expr 'luaeval("require(\"theme-sync\").apply_theme(\"light\")")' \
2>/dev/null || true
done
'';
};
};