diff --git a/doc/default.nix b/doc/default.nix index ab5cfafd5..724379f09 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -446,18 +446,18 @@ let "" "" ] - ++ (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) ) - )) + ) ++ [ "" "" diff --git a/modules/discord/nixcord.nix b/modules/discord/nixcord.nix index af86da352..2b10e3f1c 100644 --- a/modules/discord/nixcord.nix +++ b/modules/discord/nixcord.nix @@ -23,7 +23,7 @@ mkTarget { }; }; - config = (import ./common/theme-elements.nix "nixcord") ++ [ + config = import ./common/theme-elements.nix "nixcord" ++ [ ( { cfg }: let @@ -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 [ diff --git a/modules/discord/vencord.nix b/modules/discord/vencord.nix index f7647412e..6a2132ccd 100644 --- a/modules/discord/vencord.nix +++ b/modules/discord/vencord.nix @@ -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; diff --git a/modules/discord/vesktop.nix b/modules/discord/vesktop.nix index 24103a487..82413f83f 100644 --- a/modules/discord/vesktop.nix +++ b/modules/discord/vesktop.nix @@ -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" ]; diff --git a/modules/dunst/hm.nix b/modules/dunst/hm.nix index fec251aa7..1773a260d 100644 --- a/modules/dunst/hm.nix +++ b/modules/dunst/hm.nix @@ -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 { diff --git a/modules/fnott/hm.nix b/modules/fnott/hm.nix index 2c1386388..9880a67fc 100644 --- a/modules/fnott/hm.nix +++ b/modules/fnott/hm.nix @@ -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; diff --git a/modules/glance/rgb-to-hsl.nix b/modules/glance/rgb-to-hsl.nix index cb44c004e..43832f106 100644 --- a/modules/glance/rgb-to-hsl.nix +++ b/modules/glance/rgb-to-hsl.nix @@ -1,22 +1,22 @@ { 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; @@ -24,7 +24,7 @@ let 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 [ diff --git a/modules/kde/hm.nix b/modules/kde/hm.nix index 7a3920b53..bdd82a21d 100644 --- a/modules/kde/hm.nix +++ b/modules/kde/hm.nix @@ -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 @@ -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; - }) + } ) ( '' @@ -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 diff --git a/modules/qt/hm.nix b/modules/qt/hm.nix index 6804f862c..735b72ed6 100644 --- a/modules/qt/hm.nix +++ b/modules/qt/hm.nix @@ -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 [ { diff --git a/modules/swaync/hm.nix b/modules/swaync/hm.nix index 8fdbf5fae..f99e0e8b6 100644 --- a/modules/swaync/hm.nix +++ b/modules/swaync/hm.nix @@ -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; }) ]; } diff --git a/modules/waybar/hm.nix b/modules/waybar/hm.nix index 373f78aa7..8d8b1b4d2 100644 --- a/modules/waybar/hm.nix +++ b/modules/waybar/hm.nix @@ -107,7 +107,7 @@ mkTarget { color: @base05; } '' - + (builtins.readFile ./base.css) + + builtins.readFile ./base.css + ( if cfg.enableLeftBackColors then (import ./colors.nix "left") diff --git a/modules/wayfire/hm.nix b/modules/wayfire/hm.nix index f2c5e5752..516413d45 100644 --- a/modules/wayfire/hm.nix +++ b/modules/wayfire/hm.nix @@ -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 = { diff --git a/modules/yazi/hm.nix b/modules/yazi/hm.nix index e79aa1d58..52d16867b 100644 --- a/modules/yazi/hm.nix +++ b/modules/yazi/hm.nix @@ -26,7 +26,7 @@ mkTarget { }; cwd = mkFg cyan; - find_keyword = (mkFg green) // { + find_keyword = mkFg green // { bold = true; }; find_position = mkFg magenta; @@ -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; @@ -163,7 +163,7 @@ mkTarget { let mkDirIcon = name: text: fg: - ((mkIcon text fg) // { inherit name; }); + mkIcon text fg // { inherit name; }; in [ (mkDirIcon ".config" "" orange) @@ -186,7 +186,7 @@ mkTarget { let mkCondsIcon = cond: text: fg: - ((mkIcon text fg) // { "if" = cond; }); + mkIcon text fg // { "if" = cond; }; in [ # Special files diff --git a/stylix/darwin/default.nix b/stylix/darwin/default.nix index 7e61dd006..bbc3ecb75 100644 --- a/stylix/darwin/default.nix +++ b/stylix/darwin/default.nix @@ -27,7 +27,7 @@ in ( config.stylix.enable && config.stylix.enableReleaseChecks - && (config.stylix.release != config.system.darwinRelease) + && config.stylix.release != config.system.darwinRelease ) [ '' diff --git a/stylix/hm/default.nix b/stylix/hm/default.nix index 7aacf5a15..61d2602de 100644 --- a/stylix/hm/default.nix +++ b/stylix/hm/default.nix @@ -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 ) [ '' diff --git a/stylix/nixos/default.nix b/stylix/nixos/default.nix index beced1398..8cdfd15ef 100644 --- a/stylix/nixos/default.nix +++ b/stylix/nixos/default.nix @@ -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 ) [ '' diff --git a/stylix/palette.nix b/stylix/palette.nix index 260f850f4..5e0530e36 100644 --- a/stylix/palette.nix +++ b/stylix/palette.nix @@ -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";