From 5f599e235abe138f1994556662c20ceb846f3dee Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sun, 19 Jan 2020 18:42:41 +0100 Subject: [PATCH] Fix wallpaper unit --- home/desktop/wallpaper.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home/desktop/wallpaper.nix b/home/desktop/wallpaper.nix index 4f8432c8..2e0a6819 100644 --- a/home/desktop/wallpaper.nix +++ b/home/desktop/wallpaper.nix @@ -6,9 +6,9 @@ let imports = [ "System.Random" ]; bins = [ pkgs.coreutils pkgs.sway ]; } '' - main = forever $ do - files <- fmap (lines . decodeUtf8) $ ls "/home/maralorn/.wallpapers" |> captureTrim - file <- fmap (files Unsafe.!!) $ getStdRandom $ randomR (0, length files - 1) + main = do + (lines . decodeUtf8 -> files) <- ls "/home/maralorn/.wallpapers" |> captureTrim + ((files Unsafe.!!) -> file) <- getStdRandom $ randomR (0, length files - 1) cp ([i|/home/maralorn/.wallpapers/#{file}|] :: String) "/home/maralorn/volatile/wallpaper.jpg" swaymsg "output * bg /home/maralorn/volatile/wallpaper.jpg fill" ''; @@ -23,7 +23,7 @@ in { }; }; timers.random-wallpaper = { - Timer = { OnCalendar = "*:*:0/5"; }; + Timer = { OnCalendar = "*:00/5:00"; }; Install = { WantedBy = [ "timers.target" ]; }; }; };