lightsOn
lightsOn copied to clipboard
Checks in isAppRunning look very repetitive - can this be shortened?
Example:
# Check if user want to detect VLC fullscreen.
if [ $vlc_detection == 1 ]; then
if [[ "$activ_win_title" = *vlc* ]]; then
# Check if VLC is running.
if [ "$(pidof -s vlc)" ]; then
log "isAppRunning(): vlc fullscreen detected"
return 1
fi
fi
fi
# Check if user want to detect Minitube fullscreen.
if [ $minitube_detection == 1 ]; then
if [[ "$activ_win_title" = *minitube* ]]; then
# Check if Minitube is running.
if [ "$(pidof -s minitube)" ]; then
log "isAppRunning(): minitube fullscreen detected"
return 1
fi
fi
fi
Take care though, some look slightly different (when involving flash).