()
| 372 | } |
| 373 | |
| 374 | function getRandomImage() { |
| 375 | const imagesFolder = path.join(__dirname, 'Assets', 'wallpapers') |
| 376 | const imageFiles = fs.readdirSync(imagesFolder) |
| 377 | const randomIndex = Math.floor(Math.random() * imageFiles.length) |
| 378 | return path.join(imagesFolder, imageFiles[randomIndex]) |
| 379 | } |
| 380 | |
| 381 | |
| 382 | ipcMain.on('show-context-menu', (event) => { |