From 4ba0a07871769c18efb7ece8544812b422e4e642 Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Sat, 18 Nov 2023 20:22:36 +0000 Subject: [PATCH] Rename `static` to `image` :truck: --- docs/settings.nix | 2 +- docs/src/installation.md | 2 +- docs/src/tricks.md | 2 +- docs/src/wallpaper-support.md | 26 +++++++++++++------------- lib/types.nix | 6 +++--- stylix/darwin/etc.nix | 2 +- stylix/hm/xdg.nix | 2 +- stylix/nixos/etc.nix | 2 +- stylix/palette.nix | 10 +++++----- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/settings.nix b/docs/settings.nix index a99d1670f..d99d6e8e9 100644 --- a/docs/settings.nix +++ b/docs/settings.nix @@ -3,7 +3,7 @@ { pkgs, config, ... }: { - stylix.wallpaper = config.lib.stylix.make.static { + stylix.wallpaper = config.lib.stylix.make.image { image = pkgs.fetchurl { url = "https://picsum.photos/seed/stylix/1920/1080.jpg"; sha256 = "tow7DBO+/tgkDDD8diif+0V/6aDzrYl02/J7SCA8RCU="; diff --git a/docs/src/installation.md b/docs/src/installation.md index 7669ebfcd..03cbb2ce3 100644 --- a/docs/src/installation.md +++ b/docs/src/installation.md @@ -119,7 +119,7 @@ let in { imports = [ (import stylix).homeManagerModules.stylix ]; - stylix.wallpaper = config.lib.stylix.make.static { + stylix.wallpaper = config.lib.stylix.make.image { image = ./wallpaper.jpg; }; } diff --git a/docs/src/tricks.md b/docs/src/tricks.md index a76589ad2..e558b73f8 100644 --- a/docs/src/tricks.md +++ b/docs/src/tricks.md @@ -16,7 +16,7 @@ let fillColor = "black" in { - stylix.wallpaper = config.lib.stylix.make.static { + stylix.wallpaper = config.lib.stylix.make.image { image = pkgs.runCommand "dimmed-background.png" { } '' ${pkgs.imagemagick}/bin/convert "${inputImage}" -brightness-contrast ${brightness},${contrast} -fill ${fillColor} $out ''; diff --git a/docs/src/wallpaper-support.md b/docs/src/wallpaper-support.md index aa045de3a..29290a596 100644 --- a/docs/src/wallpaper-support.md +++ b/docs/src/wallpaper-support.md @@ -1,15 +1,15 @@ # Wallpaper support -| | Static | Slideshow | Animation | Video | -|--------------|--------|-----------|-----------|-------| -| bspwm | ✔️ | ✔️ | ✔️ | ✔️ | -| GNOME | ✔️ | ✔️ | ❌ | ❌ | -| GRUB | ✔️ | ❌ | ❌ | ❌ | -| herbstluftwm | ✔️ | ✔️ | ✔️ | ✔️ | -| Hyprland | ✔️ | ✔️ | ✔️ | ✔️ | -| i3 | ✔️ | ✔️ | ✔️ | ✔️ | -| KDE | ✔️ | ❌ | ❌ | ❌ | -| LightDM | ✔️ | ❌ | ❌ | ❌ | -| spectrwm | ✔️ | ✔️ | ✔️ | ✔️ | -| Sway | ✔️ | ✔️ | ✔️ | ✔️ | -| Xmonad | ✔️ | ✔️ | ✔️ | ✔️ | +| | Image | Slideshow | Animation | Video | +|--------------|-------|-----------|-----------|-------| +| bspwm | ✔️ | ✔️ | ✔️ | ✔️ | +| GNOME | ✔️ | ✔️ | ❌ | ❌ | +| GRUB | ✔️ | ❌ | ❌ | ❌ | +| herbstluftwm | ✔️ | ✔️ | ✔️ | ✔️ | +| Hyprland | ✔️ | ✔️ | ✔️ | ✔️ | +| i3 | ✔️ | ✔️ | ✔️ | ✔️ | +| KDE | ✔️ | ❌ | ❌ | ❌ | +| LightDM | ✔️ | ❌ | ❌ | ❌ | +| spectrwm | ✔️ | ✔️ | ✔️ | ✔️ | +| Sway | ✔️ | ✔️ | ✔️ | ✔️ | +| Xmonad | ✔️ | ✔️ | ✔️ | ✔️ | diff --git a/lib/types.nix b/lib/types.nix index 2f4e37e10..d3f6f0389 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -59,8 +59,8 @@ let in mergeModules [ (objectModule { - name = "static"; - description = "static wallpaper"; + name = "image"; + description = "image wallpaper"; descriptionClass = "noun"; constructor = { image, polarity ? "either" }: @@ -112,7 +112,7 @@ in mergeModules [ { types.wallpaper = with config.lib.stylix.types; - types.oneOf [ static slideshow animation video ]; + types.oneOf [ image slideshow animation video ]; } (let diff --git a/stylix/darwin/etc.nix b/stylix/darwin/etc.nix index 531ef60cc..44e4bb797 100644 --- a/stylix/darwin/etc.nix +++ b/stylix/darwin/etc.nix @@ -5,7 +5,7 @@ args: imports = [ (import ../palette.nix args) ]; config.environment.etc = { - "stylix/wallpaper".source = if (config.lib.stylix.types.static.check config.stylix.wallpaper) then config.stylix.wallpaper.image + "stylix/wallpaper".source = if (config.lib.stylix.types.image.check config.stylix.wallpaper) then config.stylix.wallpaper.image else if (config.lib.stylix.types.animation.check config.stylix.wallpaper) then config.stylix.wallpaper.animation else if (config.lib.stylix.types.video.check config.stylix.wallpaper) then config.stylix.wallpaper.video else config.stylix.wallpaper.images; diff --git a/stylix/hm/xdg.nix b/stylix/hm/xdg.nix index d14c11c19..562ceb928 100644 --- a/stylix/hm/xdg.nix +++ b/stylix/hm/xdg.nix @@ -5,7 +5,7 @@ args: imports = [ (import ../palette.nix args) ]; config.xdg.configFile = { - "stylix/wallpaper".source = if (config.lib.stylix.types.static.check config.stylix.wallpaper) then config.stylix.wallpaper.image + "stylix/wallpaper".source = if (config.lib.stylix.types.image.check config.stylix.wallpaper) then config.stylix.wallpaper.image else if (config.lib.stylix.types.animation.check config.stylix.wallpaper) then config.stylix.wallpaper.animation else if (config.lib.stylix.types.video.check config.stylix.wallpaper) then config.stylix.wallpaper.video else config.stylix.wallpaper.images; diff --git a/stylix/nixos/etc.nix b/stylix/nixos/etc.nix index 531ef60cc..44e4bb797 100644 --- a/stylix/nixos/etc.nix +++ b/stylix/nixos/etc.nix @@ -5,7 +5,7 @@ args: imports = [ (import ../palette.nix args) ]; config.environment.etc = { - "stylix/wallpaper".source = if (config.lib.stylix.types.static.check config.stylix.wallpaper) then config.stylix.wallpaper.image + "stylix/wallpaper".source = if (config.lib.stylix.types.image.check config.stylix.wallpaper) then config.stylix.wallpaper.image else if (config.lib.stylix.types.animation.check config.stylix.wallpaper) then config.stylix.wallpaper.animation else if (config.lib.stylix.types.video.check config.stylix.wallpaper) then config.stylix.wallpaper.video else config.stylix.wallpaper.images; diff --git a/stylix/palette.nix b/stylix/palette.nix index 145d1b3c9..566a0bb1e 100644 --- a/stylix/palette.nix +++ b/stylix/palette.nix @@ -26,10 +26,10 @@ in { with values.stylix; mkIf (image != "_mkMergedOptionModule") ( if polarity == "_mkMergedOptionModule" - then config.lib.stylix.make.static { + then config.lib.stylix.make.image { inherit image; } - else config.lib.stylix.make.static { + else config.lib.stylix.make.image { inherit image polarity; } ))) @@ -46,13 +46,13 @@ in { ```nix { config, ... }: { - stylix.wallpaper = config.lib.stylix.make.static { + stylix.wallpaper = config.lib.stylix.make.image { image = ./path/to/image.png; }; } ``` - Static wallpapers work everywhere. + Image wallpapers work everywhere. [This table](https://danth.github.io/stylix/wallpaper-support.html) shows which software supports the other wallpaper types. @@ -101,7 +101,7 @@ in { ```nix { config, ... }: { - stylix.wallpaper = config.lib.stylix.make.static { + stylix.wallpaper = config.lib.stylix.make.image { image = ./night-sky.jpg; polarity = "dark"; };