Customizando o shell do Gnome 3 com gesettings

O
gesettings não acessa todas as configurações do Gnome, mas é muito útil
para quem precisa configurar o ambiente utilizando o modo texto.



Basicamente, o procedimento é:


  1. identificar o schema

  2. dentro do schema, identificar a key

  3. obter o valor atual da key (comando get)

  4. atribuir o novo valor para a key (comando set)


Exemplo:


$ gsettings
Usage:
gsettings COMMAND [ARGS...]

Commands:
help Show this information
list-schemas List installed schemas
list-relocatable-schemas List relocatable schemas
list-keys List keys in a schema
list-children List children of a schema
list-recursively List keys and values, recursively
range Queries the range of a key
get Get the value of a key
set Set the value of a key
reset Reset the value of a key
writable Check if a key is writable
monitor Watch for changes
Utilize 'gsettings help COMMAND' para ajuda mais detalhada.


 


$ gsettings list-schemas
org.gnome.nautilus.desktop
org.gnome.color-manager
org.gnome.gedit.plugins.filebrowser.nautilus
org.gnome.settings-daemon.peripherals.wacom
org.gnome.Empathy.hints
org.gnome.settings-daemon.peripherals.touchpad
org.gnome.settings-daemon.plugins.keyboard
org.gnome.Nautilus.Sendto
org.gnome.FileRoller.Dialogs.BatchAdd
org.freedesktop.Telepathy.Logger
org.gnome.yelp
....
....
org.gnome.desktop.thumbnailers
org.gnome.Empathy.sounds
org.gnome.desktop.a11y.keyboard



$ gsettings list-schemas | grep shell
org.gnome.shell
org.gnome.shell.clock
org.gnome.shell.recorder
org.gnome.shell.calendar




$ gsettings list-keys org.gnome.shell

command-history
development-tools
disabled-extensions
disabled-open-search-providers
enable-app-monitoring
favorite-apps
looking-glass-history

 

Configuração do relógio para exibir a data e segundos.

$ gsettings list-keys org.gnome.shell.clock
show-date
show-seconds
$ gsettings set org.gnome.shell.clock show-date true
$ gsettings set org.gnome.shell.clock show-seconds true 

Fonte: Musings 






Postagem Anterior Próxima Postagem

Formulário de contato