feat(wallpaper): add better wallpaper module
This commit is contained in:
parent
326b14d39a
commit
3e9468d872
8 changed files with 99 additions and 23 deletions
|
|
@ -9,7 +9,6 @@ let
|
|||
cfg = config.my.bin;
|
||||
cycleSinks = import ./cycleSinks.nix { inherit pkgs; };
|
||||
protonge = import ./protonge.nix { inherit pkgs; };
|
||||
randomWallpaper = import ./randomWallpaper.nix { inherit pkgs; };
|
||||
share = import ./share.nix { inherit pkgs; };
|
||||
sxhkdHelp = import ./sxhkdHelp.nix { inherit pkgs; };
|
||||
in
|
||||
|
|
@ -17,10 +16,9 @@ in
|
|||
options.my.bin.enable = mkEnableOption "bin";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
environment.systemPackages = [
|
||||
cycleSinks
|
||||
protonge
|
||||
randomWallpaper
|
||||
share
|
||||
sxhkdHelp
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
{ pkgs }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "randomWallpaper";
|
||||
|
||||
runtimeInputs = with pkgs; [ findutils coreutils feh hyprland jq ];
|
||||
|
||||
text = ''
|
||||
wallpaper="$(find ~/.config/wallpapers/ -type f,l | shuf -n 1)"
|
||||
if [ -z ''${WAYLAND_DISPLAY+x} ]; then
|
||||
feh --bg-fill "$wallpaper"
|
||||
else
|
||||
hyprctl hyprpaper preload "$wallpaper"
|
||||
hyprctl monitors -j | jq '.[].name' | xargs -I{} hyprctl hyprpaper wallpaper '{}',"$wallpaper"
|
||||
hyprctl hyprpaper unload all
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue