Script Gnome settings (gsettings)
Most of this is from: https://linux.m2osw.com/transform-gnome-settings-command-lines
You can list all settings using:
# export your current settings to a file
gsettings list-recursively > a.txt
# change the settings you want using the GUI then re-export and diff
Change the settings you want to script using the settings GUI then re-export:
gsettings list-recursively > b.txt
You can then diff:
diff a.txt b.txt
Set a setting using gsettings set
(eg. workspaces settings I use):
gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 5
gsettings set org.gnome.mutter workspaces-only-on-primary false
For extension activation/deactivation use:
gnome-extensions enable '[email protected]' # allow setting monitor brightness, quite awesome
gnome-extensions disable '[email protected]'
(bonus) removing dash-to-dock shortcuts
I map those keys to go to workspace 1-5, and those shortcuts are not configurable in gnome keyboard settings GUI. Some Gnome spin of force the extension so you might need to remove those shortcuts:
for e in {1..10}; do
gsettings set org.gnome.shell.extensions.dash-to-dock "app-ctrl-hotkey-$e" \[\]
gsettings set org.gnome.shell.extensions.dash-to-dock "app-shift-hotkey-$e" \[\]
gsettings set org.gnome.shell.extensions.dash-to-dock "app-hotkey-$e" \[\]
done