我的 GNOME Shell 扩展如何检测 GNOME 版本?
How can my GNOME Shell extension detect the GNOME version?
我想用我的 shell 扩展支持多个 GNOME 版本。如何检测 运行 所在的 GNOME 版本并适当地分支代码?
const Config = imports.misc.config;
if (Config.PACKAGE_VERSION.startsWith("3.42"))
// etc.
我想用我的 shell 扩展支持多个 GNOME 版本。如何检测 运行 所在的 GNOME 版本并适当地分支代码?
const Config = imports.misc.config;
if (Config.PACKAGE_VERSION.startsWith("3.42"))
// etc.