Skip to content

Commit

Permalink
Rename static to image 🚚
Browse files Browse the repository at this point in the history
  • Loading branch information
danth committed Nov 18, 2023
1 parent 3ddd609 commit 4ba0a07
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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=";
Expand Down
2 changes: 1 addition & 1 deletion docs/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
'';
Expand Down
26 changes: 13 additions & 13 deletions docs/src/wallpaper-support.md
Original file line number Diff line number Diff line change
@@ -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 | ✔️ | ✔️ | ✔️ | ✔️ |
6 changes: 3 additions & 3 deletions lib/types.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ let

in mergeModules [
(objectModule {
name = "static";
description = "static wallpaper";
name = "image";
description = "image wallpaper";
descriptionClass = "noun";
constructor =
{ image, polarity ? "either" }:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stylix/darwin/etc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion stylix/hm/xdg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion stylix/nixos/etc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions stylix/palette.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
)))
Expand All @@ -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.
Expand Down Expand Up @@ -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";
};
Expand Down

0 comments on commit 4ba0a07

Please sign in to comment.