Use swaybg to change the background
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
hl.on("hyprland.start", function()
|
||||||
|
hl.exec_cmd("swaybg -m stretch -i ./wallpaper/XP.jpg")
|
||||||
|
end)
|
||||||
@@ -13,13 +13,23 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
hypr = pkgs.hyprland;
|
hypr = pkgs.hyprland;
|
||||||
configFile = "${self}/hyprland.lua";
|
|
||||||
|
configDir = pkgs.lib.cleanSource ./.;
|
||||||
|
configFile = "${configDir}/hyprland.lua";
|
||||||
|
|
||||||
|
runtimePackages = with pkgs; [
|
||||||
|
swaybg
|
||||||
|
];
|
||||||
|
|
||||||
|
runtimePath = pkgs.lib.makeBinPath runtimePackages;
|
||||||
|
|
||||||
verifyScript = pkgs.writeShellScript "hyprland-verify" ''
|
verifyScript = pkgs.writeShellScript "hyprland-verify" ''
|
||||||
|
export PATH=${runtimePath}:$PATH
|
||||||
exec ${hypr}/bin/Hyprland --config ${configFile} --verify-config
|
exec ${hypr}/bin/Hyprland --config ${configFile} --verify-config
|
||||||
'';
|
'';
|
||||||
|
|
||||||
runScript = pkgs.writeShellScript "hyprland-run" ''
|
runScript = pkgs.writeShellScript "hyprland-run" ''
|
||||||
|
export PATH=${runtimePath}:$PATH
|
||||||
exec ${hypr}/bin/Hyprland --config ${configFile}
|
exec ${hypr}/bin/Hyprland --config ${configFile}
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
@@ -36,6 +46,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.${system}.default = hypr;
|
packages.${system}.default = pkgs.runCommand "hyprland-config-check" { } ''
|
||||||
|
${verifyScript}
|
||||||
|
touch $out
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
require("monitor")
|
require("monitor")
|
||||||
|
require("background")
|
||||||
|
|||||||
Reference in New Issue
Block a user