I want to use template literals because they are convenient but it looks weird and bad in my code. Is there anyway to write this so it's more readable?
Here's the code:
async function minimize(){
const xdotool = `#!/bin/sh
pids=$(xdotool search --class "firefox")
for pid in $pids; do
xdotool windowminimize $pid
done`
await timeout(15000)
exec("sh -c " + xdotool)
minimize()
}