I've modified \item to insert a \vfill after each occurrence to space out bulleted lists on slides so they do not cluster in the center following this answer. However, to balance out my vertical spacing, I have to include a \vfill at the end of each slide.
\begin{frame}
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
\end{frame}
I'd like to avoid this repeated effort by modifying the frame environment to automatically include a \vfill before the \end{frame}:
\begin{frame}
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
\vfill % I want this automatically inserted
\end{frame}
Thus, I need to run a command before the end of each frame. The top answer to this question details how to use etoolbox to tap into the low level commands in beamerbaseframe.sty to add arbitrary TeX code to the end of each slide. However, I've tried modifying the provided code and it results in placing a test string after the frame environment ends, resulting in a blank slide after each slide with the test string at the top, or before, with a blank slide before each slide with the test string at the top. Needless to say since my test string is appearing on slides by itself, when I replace it with \vfill, my the items on my slides are not spaced out like they should be.
I don't understand beamerbaseframe.sty well enough to know which command I should be patching to achieve my desired outcome. Where should I be looking to patch to add a command directly before the end of every frame?
MWE with my attempt at solving this and demonstrating the spacing I'd like to achieve:
\documentclass{beamer}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\beamer@doseveralframes}% <cmd>
{\beamer@reseteecodes}% <search>
{\beamer@reseteecodes\textbf{aaa}}% <replace>
{}{}% <success><failure>
\makeatother
\let\olditem\item
\renewcommand{\item}{%
\olditem\vfill}
\begin{document}
\begin{frame}
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
\end{frame}
\begin{frame} % this slide is spaced how I want
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
\vfill
\end{frame}
\end{document}
\begin{frame}[t], i.e. thetoption makes the contents "move up" (as if there was a\vfillat the end). – Sep 25 '19 at 22:03\vfillat the end does, probably because each\itemis now followed by a\vfill. – jayrobwilliams Sep 25 '19 at 22:31