mirror of
https://github.com/danth/stylix
synced 2024-11-25 21:50:22 +00:00
Support transparency in Helix ✨
This commit is contained in:
parent
952ba1c756
commit
cdf7e2ded1
1 changed files with 14 additions and 3 deletions
|
@ -5,17 +5,28 @@ let
|
|||
templateRepo = pkgs.fetchFromGitHub {
|
||||
owner = "tinted-theming";
|
||||
repo = "base16-helix";
|
||||
rev = "6bc29bacf5d7d2d5865f0935c8af20cec81ce91f";
|
||||
sha256 = "pVDxOgk+WV+xEwAeZCCjNTguQLo/sw7VUHeuaHX6uNM=";
|
||||
rev = "3e391da3aaf2fa43dc9cfb67e4e6216c7ce163dc";
|
||||
sha256 = "elhPirlFx9UaZGTht9jFl8lLfT4Af38ITTPJT90yrHs=";
|
||||
};
|
||||
};
|
||||
|
||||
# Removing the background exposes transparency from the terminal. The
|
||||
# background might be helpful if the terminal isn't themed, so we only
|
||||
# do this if transparency is actually enabled.
|
||||
transparentTheme = pkgs.runCommandLocal "helix-transparent.toml" {} ''
|
||||
sed 's/,\? bg = "base00"//g' <${theme} >$out
|
||||
'';
|
||||
|
||||
in {
|
||||
options.stylix.targets.helix.enable =
|
||||
config.lib.stylix.mkEnableTarget "Helix" config.programs.helix.enable;
|
||||
|
||||
config = lib.mkIf config.stylix.targets.helix.enable {
|
||||
programs.helix.settings.theme = "stylix";
|
||||
xdg.configFile."helix/themes/stylix.toml".source = theme;
|
||||
|
||||
xdg.configFile."helix/themes/stylix.toml".source =
|
||||
if config.stylix.opacity.terminal == 1.0
|
||||
then theme
|
||||
else transparentTheme;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue