]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - setup/apple/netradiant
macos: support for macOS-like GTK theme with light and dark variant selection
[xonotic/netradiant.git] / setup / apple / netradiant
index 9e27101db097a1f771cfd50dc3e3fd323ebe80d9..782f013f0cf1a9170b687d5692d69610cd36366d 100755 (executable)
@@ -35,4 +35,18 @@ then
        export GTK_PATH="${bundle_dir}"
 fi
 
+if [ "$(defaults read -g AppleInterfaceStyle 2>/dev/null)" = 'Dark' ]
+then
+       color='dark'
+else
+       color='light'
+fi
+
+gtkrc_file="${bundle_dir}/share/themes/Mojave-${color}/gtk-2.0/gtkrc"
+
+if [ -f "${gtkrc_file}" ]
+then
+       export GTK2_RC_FILES="${gtkrc_file}"
+fi
+
 ./netradiant &