Where are toolbar configurations stored?
-
@klieber said in Where are toolbar configurations stored?:
the blunt hammer approach
I AM using ' the more blunt hammer approach of "just cp ~/.config/vivaldi-snapshot/Default" '
-
-
Appreciate the replies and I realize that syncing the entire folder will work. That said, I'd still like to know exactly where toolbar customizations are stored, if anyone knows.
-
@klieber
I guess only the Vivaldi developer knows, the most settings are in the file Preferences.
You can test this with a test profile, create one, change or install nothing and copy the file over from your default profile.
Many things in Vivaldi are in several databases and splitted in different files.Here is a post describing how to move a profile to a new system there is also a link which files do what:
-
OK, so after doing some poking around, the answer is:
$HOME/.config/vivaldi/<profile dir>/Preferences
This appears to be an unformatted json file that contains non-default preferences. Specifically for the navigation toolbar, here's an example of what it looks like:
"toolbars": { "navigation": [ "PanelToggle", "AccountButton", "WorkspaceButton", "Divider", "Back", "Forward", "Reload", "Home", "FlexibleSpacer", "AddressField", "SearchField", "DownloadButton", "Extensions", "FlexibleSpacer" ], "panel": [ "PanelBookmarks", "PanelReadingList", "PanelDownloads", "PanelHistory", "PanelNotes", "PanelTranslate", "PanelWindow", "PanelMail", "PanelCalendar", "PanelTasks", "PanelFeeds", "PanelContacts", "WEBPANEL_ckmam0bsw00002y5xoafpww5i", "WEBPANEL_ckn7fhhqx0000hc2roo8jshm4", "PanelWeb", "FlexibleSpacer", "Settings" ] },
Near as I can tell, no preferences will be included here unless you change things from the default setup. The navigation[] section, for example, didn't exist until I modified the navigation toolbar from the default via the vivaldi GUI.
Since I want the exact same navigation toolbar no matter what profile/machine I'm using, I've put the navigation key value into a standalone JSON file. Then, via jq, I can modify the Preferences file quite easily with:
jq --argjson navigation "$(cat ./my_navigation.json)" '.vivaldi.toolbars.navigation = $navigation' ~/.config/vivaldi/<profile dir>/Preferences >> newPreferences
I'll eventually wrap this into a script that safely backs up the existing Preferences file before mv'ing newPreferences into place, but hopefully this post helps someone else wanting to do the same thing. It's significantly more efficient and portable than just brute-force copying entire directories around.
Misc. other notes: When I was poking around the Preferences file, I formatted it in VS Code to make it easier to read. vivaldi happily reads that file back in the next time you launch the browser, but it will remove all formatting and reduce it back to a single line Preferences file. Just FYI. Also, consider this "lightly tested", which means it works on the two Arch linux machines I have access to, but I haven't tested it beyond that. ymmv.
Lastly, there are a TON of other preferences in that file and I suspect that's where the majority of prefs are set. It would be wonderful if a mod/developer could provide some confirmation and maybe also explain why this file isn't synchronized as part of vivaldi sync as-is?
-
@klieber said in Where are toolbar configurations stored?:
explain why this file isn't synchronized as part of vivaldi sync as-is?
Well, many people have different prefs for different machines... on purpose.
-
@Ayespy said in Where are toolbar configurations stored?:
Well, many people have different prefs for different machines... on purpose.
Which is why vivaldi has the 'sync selected data' option. Doesn't explain why preferences wouldn't be an optional toggle to be sync'd for those who want it.
-
@klieber "Preferences" is not translatable between mobile and desktop. Plus, it is an exceedingly complex set of settings - hard to parse as to which code has which effects.
To divvy these out and decide which to sync (and then write the sync code that picks and chooses settings) is not a trivial task.
-
For anyone else running across this thread, I've written a script that helps to at least keep toolbar configurations consistent across profiles.
-
@klieber Good job!
Since I want the exact same navigation toolbar no matter what profile/machine I'm using
me too!