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
+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
'';
};
};