Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -446,18 +446,18 @@ let
"</colgroup>"
"<tbody>"
]
++ (lib.optional (option ? type) (renderDetailsRow "Type" option.type))
++ (lib.optional (option ? default) (
++ lib.optional (option ? type) (renderDetailsRow "Type" option.type)
++ lib.optional (option ? default) (
renderDetailsRow "Default" (renderValue option.default)
))
++ (lib.optional (option ? example) (
)
++ lib.optional (option ? example) (
renderDetailsRow "Example" (renderValue option.example)
))
++ (lib.optional (option ? declarations) (
)
++ lib.optional (option ? declarations) (
renderDetailsRow "Source" (
lib.concatLines (map renderDeclaration option.declarations)
)
))
)
++ [
"</tbody>"
"</table>"
Expand Down
4 changes: 2 additions & 2 deletions modules/discord/nixcord.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mkTarget {
};
};

config = (import ./common/theme-elements.nix "nixcord") ++ [
config = import ./common/theme-elements.nix "nixcord" ++ [
(
{ cfg }:
let
Expand All @@ -43,7 +43,7 @@ mkTarget {
];
in
lib.mkIf
(cfg.themeBody != (import ./common/theme-header.nix) || cfg.extraCss != "")
(cfg.themeBody != import ./common/theme-header.nix || cfg.extraCss != "")
(
lib.optionalAttrs (options.programs ? nixcord) (
lib.mkMerge [
Expand Down
4 changes: 2 additions & 2 deletions modules/discord/vencord.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ mkTarget {
};
};

config = (import ./common/theme-elements.nix "vencord") ++ [
config = import ./common/theme-elements.nix "vencord" ++ [
(
{ cfg }:
lib.mkIf
(cfg.themeBody != (import ./common/theme-header.nix) || cfg.extraCss != "")
(cfg.themeBody != import ./common/theme-header.nix || cfg.extraCss != "")
{
xdg.configFile."Vencord/themes/stylix.theme.css".text =
cfg.themeBody + cfg.extraCss;
Expand Down
4 changes: 2 additions & 2 deletions modules/discord/vesktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ mkTarget {
internal = true;
};

config = (import ./common/theme-elements.nix "vesktop") ++ [
config = import ./common/theme-elements.nix "vesktop" ++ [
(
{ cfg }:
lib.mkIf (cfg.themeBody != (import ./common/theme-header.nix)) {
lib.mkIf (cfg.themeBody != import ./common/theme-header.nix) {
programs.vesktop.vencord = {
themes.stylix = cfg.themeBody;
settings.enabledThemes = [ "stylix.css" ];
Expand Down
2 changes: 1 addition & 1 deletion modules/dunst/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mkTarget {
with colors.withHashtag;
let
dunstOpacity = lib.toHexString (
((builtins.floor (opacity.popups * 100 + 0.5)) * 255) / 100
builtins.floor (opacity.popups * 100 + 0.5) * 255 / 100
);
in
{
Expand Down
2 changes: 1 addition & 1 deletion modules/fnott/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mkTarget {
bg =
c:
"${c}${
lib.toHexString (((builtins.floor (opacity.popups * 100 + 0.5)) * 255) / 100)
lib.toHexString (builtins.floor (opacity.popups * 100 + 0.5) * 255 / 100)
}";
in
with colors;
Expand Down
16 changes: 8 additions & 8 deletions modules/glance/rgb-to-hsl.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{ lib, colors, ... }:
color:
let
r = ((lib.toInt colors."${color}-rgb-r") * 100.0) / 255;
g = ((lib.toInt colors."${color}-rgb-g") * 100.0) / 255;
b = ((lib.toInt colors."${color}-rgb-b") * 100.0) / 255;
r = lib.toInt colors."${color}-rgb-r" * 100.0 / 255;
g = lib.toInt colors."${color}-rgb-g" * 100.0 / 255;
b = lib.toInt colors."${color}-rgb-b" * 100.0 / 255;
max = lib.max r (lib.max g b);
min = lib.min r (lib.min g b);
delta = max - min;
fmod = base: int: base - (int * builtins.floor (base / int));
fmod = base: int: base - int * builtins.floor (base / int);
h =
if delta == 0 then
0
else if max == r then
60 * (fmod ((g - b) / delta) 6)
60 * fmod ((g - b) / delta) 6
else if max == g then
60 * (((b - r) / delta) + 2)
60 * ((b - r) / delta + 2)
else if max == b then
60 * (((r - g) / delta) + 4)
60 * ((r - g) / delta + 4)
else
0;
l = (max + min) / 2;
s =
if delta == 0 then
0
else
100 * delta / (100 - lib.max (2 * l - 100) (100 - (2 * l)));
100 * delta / (100 - lib.max (2 * l - 100) (100 - 2 * l));
roundToString = value: toString (builtins.floor (value + 0.5));
in
lib.concatMapStringsSep " " roundToString [
Expand Down
10 changes: 5 additions & 5 deletions modules/kde/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let
mergeWithImage =
default: withImage:
let
satisfies = check: (check default) && (check withImage);
satisfies = check: check default && check withImage;
in
if image == null || !cfg.useWallpaper then
default
Expand Down Expand Up @@ -278,9 +278,9 @@ let
kded5rc = formatConfig kded5rc;
kdeglobals = formatConfig kdeglobals;
}
// (lib.optionalAttrs (config.stylix.cursor != null) {
// lib.optionalAttrs (config.stylix.cursor != null) {
kcminputrc = formatConfig kcminputrc;
})
}
)
(
''
Expand All @@ -289,9 +289,9 @@ let
printf '%s\n' "$kded5rc" >"$out/kded5rc"
printf '%s\n' "$kdeglobals" >"$out/kdeglobals"
''
+ (lib.optionalString (
+ lib.optionalString (
config.stylix.cursor != null
) ''printf '%s\n' "$kcminputrc" >"$out/kcminputrc"'')
) ''printf '%s\n' "$kcminputrc" >"$out/kcminputrc"''
);

# plasma-apply-wallpaperimage is necessary to change the wallpaper
Expand Down
10 changes: 5 additions & 5 deletions modules/qt/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ mkTarget {
in
{
warnings =
(lib.optional (cfg.platform != "qtct")
lib.optional (cfg.platform != "qtct")
"stylix: qt: `config.stylix.targets.qt.platform` other than 'qtct' are currently unsupported: ${cfg.platform}. Support may be added in the future."
)
++ (lib.optional (config.qt.style.name != recommendedStyle)
"stylix: qt: Changing `config.qt.style` is unsupported and may result in breakage! Use with caution!"
);

++
lib.optional (config.qt.style.name != recommendedStyle)
"stylix: qt: Changing `config.qt.style` is unsupported and may result in breakage! Use with caution!";

qt = lib.mkMerge [
{
Expand Down
2 changes: 1 addition & 1 deletion modules/swaync/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mkTarget {
@define-color base0C ${base0C}; @define-color base0D ${base0D};
@define-color base0E ${base0E}; @define-color base0F ${base0F};
''
+ (builtins.readFile ./base.css);
+ builtins.readFile ./base.css;
})
];
}
2 changes: 1 addition & 1 deletion modules/waybar/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ mkTarget {
color: @base05;
}
''
+ (builtins.readFile ./base.css)
+ builtins.readFile ./base.css
+ (
if cfg.enableLeftBackColors then
(import ./colors.nix "left")
Expand Down
2 changes: 1 addition & 1 deletion modules/wayfire/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mkTarget {
{ colors }:
let
rgba = rgb: a: "\\#${rgb}${a}";
rgb = (lib.flip rgba) "ff";
rgb = lib.flip rgba "ff";
in
{
wayland.windowManager.wayfire = {
Expand Down
16 changes: 8 additions & 8 deletions modules/yazi/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mkTarget {
};

cwd = mkFg cyan;
find_keyword = (mkFg green) // {
find_keyword = mkFg green // {
bold = true;
};
find_position = mkFg magenta;
Expand All @@ -41,29 +41,29 @@ mkTarget {
};

indicator = rec {
current = (mkBg base02) // {
current = mkBg base02 // {
bold = true;
};
preview = current;
};

tabs = {
active = (mkBoth base00 blue) // {
active = mkBoth base00 blue // {
bold = true;
};
inactive = mkBoth blue base01;
};

mode = {
normal_main = (mkBoth base00 blue) // {
normal_main = mkBoth base00 blue // {
bold = true;
};
normal_alt = mkBoth blue base00;
select_main = (mkBoth base00 green) // {
select_main = mkBoth base00 green // {
bold = true;
};
select_alt = mkBoth green base00;
unset_main = (mkBoth base00 brown) // {
unset_main = mkBoth base00 brown // {
bold = true;
};
unset_alt = mkBoth brown base00;
Expand Down Expand Up @@ -163,7 +163,7 @@ mkTarget {
let
mkDirIcon =
name: text: fg:
((mkIcon text fg) // { inherit name; });
mkIcon text fg // { inherit name; };
in
[
(mkDirIcon ".config" "" orange)
Expand All @@ -186,7 +186,7 @@ mkTarget {
let
mkCondsIcon =
cond: text: fg:
((mkIcon text fg) // { "if" = cond; });
mkIcon text fg // { "if" = cond; };
in
[
# Special files
Expand Down
2 changes: 1 addition & 1 deletion stylix/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ in
(
config.stylix.enable
&& config.stylix.enableReleaseChecks
&& (config.stylix.release != config.system.darwinRelease)
&& config.stylix.release != config.system.darwinRelease
)
[
''
Expand Down
2 changes: 1 addition & 1 deletion stylix/hm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ in
(
config.stylix.enable
&& config.stylix.enableReleaseChecks
&& (config.stylix.release != config.home.version.release)
&& config.stylix.release != config.home.version.release
)
[
''
Expand Down
2 changes: 1 addition & 1 deletion stylix/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ in
(
config.stylix.enable
&& config.stylix.enableReleaseChecks
&& (config.stylix.release != config.system.nixos.release)
&& config.stylix.release != config.system.nixos.release
)
[
''
Expand Down
2 changes: 1 addition & 1 deletion stylix/palette.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ in
description = "The palette generated by the palette generator.";
readOnly = true;
internal = true;
default = (lib.importJSON cfg.generated.json) // {
default = lib.importJSON cfg.generated.json // {
author = "Stylix";
scheme = "Stylix";
slug = "stylix";
Expand Down
Loading