-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e24e1e
commit 329f219
Showing
10 changed files
with
95 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## mkStaticImage | ||
takes an image, as well as optionally polarity, and an override, which can either be a path to a base16 yaml file or and attrset. | ||
example | ||
```nix | ||
stylix.wallpaper = config.lib.stylix.mkStaticImage { | ||
image = /path/to/image; | ||
polarity = "dark"; | ||
override = /path/to/scheme.yml; | ||
} | ||
``` | ||
## mkStaticFill | ||
takes a colorscheme as an input. | ||
```nix | ||
stylix.wallpaper = config.lib.stylix.mkStaticFill /path/to/scheme.yml; | ||
``` | ||
## mkSlideshow | ||
takes an image directory, polarity, override, and a delay rate in seconds as an input. | ||
```nix | ||
stylix.wallpaper = config.lib.stylix.mkSlideshow { | ||
imageDir = /path/to/dir; | ||
delay = 300; | ||
}; | ||
``` | ||
## mkAnimation | ||
takes an animation (gif or similar format), as well as polarity and an override as an input. | ||
```nix | ||
stylix.wallpaper = config.lib.stylix.mkAnimation { | ||
animation = /path/to/animation.gif; | ||
}; | ||
``` | ||
## mkVideo | ||
takes an video (mp4 or similar format), as well as polarity and an override as an input. | ||
```nix | ||
stylix.wallpaper = config.lib.stylix.mkAnimation { | ||
video = /path/to/video.mp4; | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ pkgs, config, lib, ... }: | ||
|
||
{ | ||
options.stylix.targets.xorg.enable = | ||
config.lib.stylix.mkEnableTarget | ||
"the desktop background using Feh" | ||
(with config.xsession.windowManager; bspwm.enable | ||
|| herbstluftwm.enable | ||
|| i3.enable | ||
|| spectrwm.enable | ||
|| xmonad.enable); | ||
|
||
config.xsession.initExtra = lib.mkIf config.stylix.targets.xorg.enable | ||
(if (config.lib.stylix.isAnimation config.stylix.wallpaper) then '' | ||
${pkgs.xwinwrap}/bin/xwinwrap -fs -ni -b -nf -ov -- mpv -wid WID --loop --no-audio ${config.stylix.wallpaper.animation} | ||
'' else (if (config.lib.stylix.isVideo config.stylix.wallpaper) then '' | ||
'' else "${pkgs.feh}/bin/feh --no-fehbg --bg-scale ${config.stylix.wallpaper.image}")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ pkgs, config, lib, ... }: | ||
|
||
{ | ||
options.stylix.targets.xorg.enable = | ||
config.lib.stylix.mkEnableTarget | ||
"the desktop background of an xorg session" | ||
(with config.services.xserver.windowManager; xmonad.enable || i3.enable); | ||
|
||
config.services.xserver.displayManager.sessionCommands = lib.mkIf config.stylix.targets.xorg.enable | ||
(if (config.lib.stylix.isAnimation config.stylix.wallpaper) then '' | ||
${pkgs.xwinwrap}/bin/xwinwrap -fs -ni -b -nf -ov -- mpv -wid WID --loop --no-audio ${config.stylix.wallpaper.animation} | ||
'' else (if (config.lib.stylix.isVideo config.stylix.wallpaper) then '' | ||
'' else "${pkgs.feh}/bin/feh --no-fehbg --bg-scale ${config.stylix.wallpaper.image}")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters