k 3 fetchWallpaper: use $HOME as default
This commit is contained in:
parent
43d6c89dd6
commit
6a3700da3c
|
@ -24,7 +24,7 @@ let
|
||||||
# TODO find a better default stateDir
|
# TODO find a better default stateDir
|
||||||
stateDir = mkOption {
|
stateDir = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "./wallpaper";
|
default = "$HOME/wallpaper";
|
||||||
};
|
};
|
||||||
display = mkOption {
|
display = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -49,8 +49,8 @@ let
|
||||||
fetchWallpaperScript = pkgs.writeDash "fetchWallpaper" ''
|
fetchWallpaperScript = pkgs.writeDash "fetchWallpaper" ''
|
||||||
set -euf
|
set -euf
|
||||||
|
|
||||||
mkdir -p ${shell.escape cfg.stateDir}
|
mkdir -p ${cfg.stateDir}
|
||||||
cd ${shell.escape cfg.stateDir}
|
cd ${cfg.stateDir}
|
||||||
(curl --max-time ${toString cfg.maxTime} -s -o wallpaper.tmp -z wallpaper ${shell.escape cfg.url} && mv wallpaper.tmp wallpaper) || :
|
(curl --max-time ${toString cfg.maxTime} -s -o wallpaper.tmp -z wallpaper ${shell.escape cfg.url} && mv wallpaper.tmp wallpaper) || :
|
||||||
feh --no-fehbg --bg-scale wallpaper
|
feh --no-fehbg --bg-scale wallpaper
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user