Fix wallpaper unit
This commit is contained in:
parent
74c287a996
commit
5f599e235a
1 changed files with 4 additions and 4 deletions
|
@ -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" ]; };
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue