Tuesday, April 26, 2016

Edit gnome settings with your favorite editor

Using the vipe command, we can read from stdin, edit the contents in the default editor and send it down the pipe.

First get vipe by installing the moreutils package in ubuntu:

sudo apt-get install moreutils

Then if you need to, you can select your editor of choce:

sudo update-alternatives --config editor

Then you can edit all your settings for your extensions with:

(export gnomepath="/org/gnome/shell/extensions/"; dconf dump "$gnomepath" | vipe | dconf load "$gnomepath")

You can use any path you like, even the root ('/') if you want to edit all the settings at once.. If you save and close, your settings will be updated. To quit without loading new settings, just clear the text completely and nothing will change (just like an interactive git commit message).

No comments :