reload theme st and nvim

This commit is contained in:
ant 2025-01-08 10:11:41 +01:00
parent 540b2892ad
commit 616981a8bb

20
ui.nix
View file

@ -1,6 +1,6 @@
{ lib, config, pkgs, variant, ... }: { lib, config, pkgs, variant, ... }:
let let
defaultTerminal = "alacritty"; defaultTerminal = "st";
alacrittyLightTheme = "${pkgs.alacritty-theme}/night_owlish_light.toml"; alacrittyLightTheme = "${pkgs.alacritty-theme}/night_owlish_light.toml";
alacrittyDarkTheme = "${pkgs.alacritty-theme}/monokai_charcoal.toml"; alacrittyDarkTheme = "${pkgs.alacritty-theme}/monokai_charcoal.toml";
in in
@ -231,6 +231,12 @@ in
reload-hyprland = '' reload-hyprland = ''
hyprctl reload hyprctl reload
''; '';
reload-st = ''
kill -SIGUSR1 $(pgrep st) # reload st config
'';
reload-neovim = ''
kill -SIGUSR1 $(pgrep nvim)
'';
in { in {
lightModeScripts = { lightModeScripts = {
gtk-theme = '' gtk-theme = ''
@ -255,9 +261,9 @@ in
ln -s ${alacrittyLightTheme} ~/.config/alacritty/colors.toml ln -s ${alacrittyLightTheme} ~/.config/alacritty/colors.toml
''; '';
notify = "${pkgs.libnotify}/bin/notify-send \"Light mode\""; notify = "${pkgs.libnotify}/bin/notify-send \"Light mode\"";
set-st-colors = '' inherit reload-hyprland;
kill -SIGUSR1 $(pgrep st) # reload st config inherit reload-st;
''; inherit reload-neovim;
}; };
darkModeScripts = { darkModeScripts = {
@ -283,9 +289,9 @@ in
ln -s ${alacrittyDarkTheme} ~/.config/alacritty/colors.toml ln -s ${alacrittyDarkTheme} ~/.config/alacritty/colors.toml
''; '';
notify = "${pkgs.libnotify}/bin/notify-send \"Dark mode\""; notify = "${pkgs.libnotify}/bin/notify-send \"Dark mode\"";
set-st-colors = '' inherit reload-hyprland;
kill -SIGUSR1 $(pgrep st) # reload st config inherit reload-st;
''; inherit reload-neovim;
}; };
}; };