# `EDITOR`
for EDITOR in 'vim' 'nvim' 'vi' 'nano'
do
  [ "$(command -v "$EDITOR")" ] || continue
  export EDITOR && break
done

# `TERMINAL`
for TERMINAL in 'xfce4-terminal' 'gnome-terminal' 'xterm' 'x-terminal-emulator'
do
  [ "$(command -v "$TERMINAL")" ] || continue
  export TERMINAL && break
done

# `BROWSER`
for BROWSER in 'firefox' 'chromium-browser' 'x-www-browser'
do
  [ "$(command -v "$BROWSER")" ] || continue
  export BROWSER && break
done
