diff --git a/zsh/exports/70-java-options.zsh b/zsh/exports/70-java-options.zsh index a4ed7ec..e768f4a 100644 --- a/zsh/exports/70-java-options.zsh +++ b/zsh/exports/70-java-options.zsh @@ -1,7 +1,10 @@ # Java-specific exports. # More or less pretty fonts in Java programs. # It should be exported only if we have X session running. -if [ ! -z ${DISPLAY} ]; then - export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' - export JAVA_FONTS=/usr/share/fonts/TTF +# Also, these settings should be applied only on Linux. +if [[ "${OS}" == "Linux" ]]; then + if [ ! -z ${DISPLAY} ]; then + export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' + export JAVA_FONTS=/usr/share/fonts/TTF + fi fi