From c513825d83113d63c3af917dd543f477bc22b54b Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Mon, 31 Aug 2026 21:04:57 -0400 Subject: [PATCH] Fix neovim theming --- home/aselimov/theme/theme.nix | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/home/aselimov/theme/theme.nix b/home/aselimov/theme/theme.nix index 215bc61..083839a 100644 --- a/home/aselimov/theme/theme.nix +++ b/home/aselimov/theme/theme.nix @@ -1,5 +1,23 @@ {config, pkgs, ... }: { + services.darkman = { + enable = true; + + settings = { + lat = 33.7490; + lng = -84.3880; + }; + + darkModeScripts.gsettings = '' + ${pkgs.glib}/bin/gsettings \ + set org.gnome.desktop.interface color-scheme prefer-dark + ''; + + lightModeScripts.gsettings = '' + ${pkgs.glib}/bin/gsettings \ + set org.gnome.desktop.interface color-scheme prefer-light + ''; + }; home.file."bin/themer.sh" = { executable = true; text = '' @@ -33,11 +51,8 @@ ln -sf "$tmux" $HOME/.config/tmux/theme.conf makoctl reload tmux source-file ~/.config/tmux/theme.conf - for dir in "$XDG_RUNTIME_DIR-}" "/tmp" "$HOME/.local/state/nvim"; do - [ -d "$dir" ] || continue - find "$dir" -type s -name 'nvim*' 2>/dev/null | while read -r sock; do - timeout 1s nvim --server "$sock" --remote-send "$keys" >/dev/null 2>&1 || true - done + for sock in "$XDG_RUNTIME_DIR"/nvim.*.0; do + timeout 1s nvim --server "$sock" --remote-send "$keys" >/dev/null 2>&1 || true done }