resetdpi() {
echo "resetting dpi"
sed -i '/^Xft\.dpi/d' ~/.Xresources
+ sed -i '/^st.font/d' ~/.Xresources
}
appendpi() {
echo "setting dpi to $DPI"
echo "Xft.dpi: $DPI" >>~/.Xresources
+ NEWDPI="$(echo "( $DPI / 96 ) * 15" | bc -l | grep -o '^[^\.]*')"
+ sed -i '/^st.font/d' ~/.Xresources
+ echo "st.font: Fira Code Nerd Font Mono:pixelsize=$NEWDPI:antialias=true:autohint=true" >>~/.Xresources
+ echo "st.font2: JoyPixels:pixelsize=$NEWDPI:antialias=true:autohint=true" >>~/.Xresources
}
if [ -z "$DPI" ]; then