Save image to /tmp rather than current directory
This commit is contained in:
parent
96634a7e9e
commit
d834eed748
4
main.js
4
main.js
|
@ -67,8 +67,8 @@ async function getDominantColor(imageBuffer) {
|
|||
|
||||
async function setAsWallpaper(buffer) {
|
||||
try {
|
||||
await fs.promises.writeFile('current_album_cover.png', buffer);
|
||||
exec('feh --bg-center current_album_cover.png');
|
||||
await fs.promises.writeFile('/tmp/current_album_cover.png', buffer);
|
||||
exec('feh --bg-center /tmp/current_album_cover.png');
|
||||
console.log("Wallpaper set using feh.");
|
||||
} catch (error) {
|
||||
console.error("Error setting wallpaper:", error);
|
||||
|
|
Loading…
Reference in New Issue