From 36a0e6b83409e33f5b751a065111fcad1944c9b3 Mon Sep 17 00:00:00 2001 From: ant Date: Tue, 31 Dec 2024 14:09:30 +0100 Subject: [PATCH] Add signals to reload the st terminal in darkman scripts --- bin/dark.nix | 4 ++++ ui.nix | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/bin/dark.nix b/bin/dark.nix index 374df01..3f40c9d 100755 --- a/bin/dark.nix +++ b/bin/dark.nix @@ -15,6 +15,8 @@ if test $LIGHT = 1; ln -rs ~/.config/kitty/light.conf ~/.config/kitty/colors.conf kill -SIGUSR1 $(pgrep kitty) # reload kitty config + kill -SIGUSR1 $(pgrep st) # reload st config + rm -f ~/.local/share/bg/* ln -rs ~/.local/share/bg-light.* ~/.local/share/bg/ ${pkgs.hyprland}/bin/hyprctl reload @@ -30,6 +32,8 @@ else ln -rs ~/.config/kitty/dark.conf ~/.config/kitty/colors.conf kill -SIGUSR1 $(pgrep kitty) # reload kitty config + kill -SIGUSR1 $(pgrep st) # reload st config + rm -f ~/.local/share/bg/* ln -rs ~/.local/share/bg-dark.* ~/.local/share/bg/ ${pkgs.hyprland}/bin/hyprctl reload diff --git a/ui.nix b/ui.nix index a5307ff..5af5cb3 100644 --- a/ui.nix +++ b/ui.nix @@ -254,6 +254,9 @@ in ln -s ${alacrittyLightTheme} ~/.config/alacritty/colors.toml ''; notify = "${pkgs.libnotify}/bin/notify-send \"Light mode\""; + set-st-colors = '' + kill -SIGUSR1 $(pgrep st) # reload st config + ''; }; darkModeScripts = { @@ -279,6 +282,9 @@ in ln -s ${alacrittyDarkTheme} ~/.config/alacritty/colors.toml ''; notify = "${pkgs.libnotify}/bin/notify-send \"Dark mode\""; + set-st-colors = '' + kill -SIGUSR1 $(pgrep st) # reload st config + ''; }; };