vmavromatis / gnome-layout-manager

A bash script that batch installs and tweaks GNOME extensions as well as GTK/Shell themes. There are currently three options available: Unity, Windows and macOS.
GNU General Public License v3.0
405 stars 39 forks source link

Idea for backup and restore #6

Closed modoj closed 7 years ago

modoj commented 7 years ago

Current settings can be easily pulled with 'dconf dump', or 'gsettings get', how about a script option for backup and restore? The necessary entries could be dumped to a backup file, and loaded with 'dconf load' easily, or 'gsettings set' with a little more work.

The simplest solution for backup and restore would be quick and dirty

'dconf dump /org/gnome/desktop/ > backup-file.txt' and 'dconf load /org/gnome/desktop/ < backup-file.txt'

Which should get the job done, but touches way more than necessary... this is fine FOR ME, but for release, when people will be running the script willy nilly after being posted on OMGUbuntu and the like, should be a more elegant approach.

That would probably involve piping individual entries with 'gsettings get', and then parsing the backup to pull individual entries.

I'm sure you're thinking, 'duh, you're not telling me anything I don't already know', I just wanted to get your thoughts on backup and restore, whether it's necessary, and if you have any thoughts on better implementing this, before I run off and do so myself.

vmavromatis commented 7 years ago

Hey I got many requests regarding that. It's a great idea. I will try to work with dconf dump/load and see how well it works. Feel free to make any pull requests.

Flagging as enhancement.

robyle commented 7 years ago

when my system reboot . the layout will change to system default before. how can I save it by default login my system?

vmavromatis commented 7 years ago

@cyroby the standard behavior should be to save your layout. GNOME does not reset any extensions on reboot AFAIK. Could you give me any more details on which extensions/theme changes? Your settings are saved under your user, so if you're attempting to login as another user that might be causing it. Did you run the script as root by any chance? In that case try to re-run it as user.

vmavromatis commented 7 years ago

@modoj I have a very basic version of save/load function in the testing branch. If you want to test it, have a look here: https://github.com/bill-mavromatis/gnome-layout-manager/blob/testing/layoutmanager.sh

vmavromatis commented 7 years ago

Merged into master. Please open a new issue if you have any problems/ideas.