#!/bin/sh PROGRAMS=' aerc bemenu-run brightnessctl dunst foot gammastep grim htop khard lf mpv nvim pactl rifle slurp swappy sway swaylock vdirsyncer ' check_programs() { echo "$PROGRAMS" | sort | while read -r program do if [ "$program" = '' ] then continue fi local state='' if command -v "$program" > /dev/null 2>&1 then state='x' else state=' ' fi echo "[${state}] $program" done }