MCPcopy
hub / github.com/alexpinel/Dot / getRandomImage

Function getRandomImage

src/index.js:374–379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372}
373
374function 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
382ipcMain.on('show-context-menu', (event) => {

Callers 1

toggleGalleryViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected