查询Gnome扩展disable-workspace-switcher-popup启用状态的存储位置
Hey there! Let's work through figuring out where that extension's enabled setting lives so you can automate the process without manual clicks.
First, let's confirm the extension's unique ID — this is crucial for targeting the right settings. Run this in your terminal:
gnome-extensions list
You should see an entry like disable-workspace-switcher-popup@windsorschmidt.github.io — that's the ID we need.
Next, check if the extension uses GSettings (the standard GNOME settings system). Try listing its settings with:
gsettings list-recursively disable-workspace-switcher-popup@windsorschmidt.github.io
If this returns a key like enabled with a boolean value (true/false), you've hit the jackpot! You can set it programmatically anytime with:
gsettings set disable-workspace-switcher-popup@windsorschmidt.github.io enabled true
If the GSettings command doesn't work, the extension might be storing its settings in a local JSON file. Head to the extension's directory (replace [EXTENSION_ID] with the ID you found earlier):
cd ~/.local/share/gnome-shell/extensions/[EXTENSION_ID]/
Look for files named settings.json or prefs.json. When you toggle the enabled button in the Extensions GUI, this file should update with a line like "enabled": true. You can edit this file directly in your automation script, but remember to restart the GNOME shell afterward (press Alt+F2, type r, hit Enter) for changes to take effect.
One last check: If the extension has a schemas folder in its directory, the GSettings schema might not be compiled yet. Fix that with:
glib-compile-schemas schemas/
Then try the gsettings commands again — they should pick up the settings now.
As for why dconf watch / didn't show changes: Some extensions use custom schemas that aren't registered system-wide, so dconf doesn't automatically track them until the schema is compiled and loaded.
备注:内容来源于stack exchange,提问作者Hilze

