AutoSave Sessions Mod


  • Moderator

    @QuHno said in AutoSave Sessions Mod:

    You could hack into mod the settings too to provide the configuration there

    I tried this, and it kind of works:
    d91ea20d-ffb5-4c53-bf74-bfd7d9797786-image.png

    The only issue is that when you switch to a different settings tab it looks a bit messy, as the custom added section doesn't go away.

    It also only works with settings in a tab.

    I haven't added it to the main post yet, but you can try it here



  • @LonM You could look how @luetage does it in Import and export themes and Backup search engines, though I haven't look at it so I don't know if it'll work.


  • Moderator

    @potmeklecbohdan That gave me some ideas.

    @ everyone who wanted to be able to save private window sessions:

    Try out the latest version at https://raw.githubusercontent.com/LonMcGregor/VivaldiMods/master/mods/autoSaveSessions.js

    I've added in an option (disabled by default) to allow saving of private windows - just turn it on from settings.

    00a79a24-d186-4d28-9375-ed567ca51895-image.png



  • @LonM Thanks for your effort πŸ‘ works for me πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€

    2019-10-04 17_59_57-Window.jpg



  • Now, after all the work is done, the Vivaldi Devs would only need Β΄to find nice and cosy place to embed it into their code ...

    @LonM said in AutoSave Sessions Mod:

    It also only works with settings in a tab.

    This means to set the setting Appearance > Window Appearance > Open Settings in a Tab



  • where do you open saved sessions from? i can't seem to find it



  • @nparekh see screenshots:

    2019-10-10 06_36_30-Window.jpg

    2019-10-10 06_37_23-Window.jpg

    2019-10-10 06_38_06-Window.jpg

    2019-10-10 06_39_05-Window.jpg



  • @stardepp i dont have the menu button, i hid the vivaldi icon



  • @nparekh Use whatever keyboard shortcut you have assigned to the action.



  • @bonetone Then press the F2 key and the quick commands will open and type into the search field "Open saved session".



  • @stardepp Yup, that works too, except for me it's a different shortcut to launch quick commands. There's also a keyboard shortcut to bring up a cheat sheet displaying all the keyboard shortcuts you have set. It won't display actions that have no shortcuts assigned. I don't remember what the default is for that, my keyboard shortcut won't be of use, but you can look it up in the settings.

    Edit, but it's not "then" use quick commands, if you use the shortcut assigned to that action there is no need to use quick commands. Assigning easy shortcuts to the actions you use often will save time over always using quick commands, but those are really useful for actions you don't remember the shortcut for, among other things. Quick commands is quite powerful, especially after configuring it to work how you prefer.



  • @bonetone said:

    Edit, but it's not "then" use quick commands, if you use the shortcut assigned to that action there is no need to use quick commands.

    The then was meant as something like β€œIf that is not your case and you also don't want to use this (…), then this should work for you.”



  • @stardepp

    Sorry for I really am no skill in CSS stuffs like what is talking in this thread.

    Please advise me how I am able to insert/install the CSS to the folder and let Vivaldi recognize it ?

    I understand & I can reach until File, setting , appearance..... but nothing more I can understand to do.

    Thank you very much.
    edmond.



  • @eeeemc see the first pinned post in this category



  • @LonM Thank you. Could be posible to save the session with the name of the first tab?

    To remember better what is about.


  • Moderator

    @barbudo2005 that would be doable.

    Does anyone else think this would be a useful feature?



  • @LonM I'd prefer if it pulled the name of the first tab group. If the user has given a name to the group, that's because this is what they want to see to know what it is about. If the user hasn't given a name to the group, then it will the name of the most recent active tab. Ideally, in my opinion, the mod would skip over loose tabs if groups exist and grab the name of either the first group or largest group. Perhaps, it could even skip over unnamed groups if another group exists and has been named.

    I write all this not knowing how or even if we can distinguish between a group that has been given a name and that which is just displaying a tab's title. Though Vivaldi is able to distinguish, it doesn't change the group name when the user has modified it, so there is something there.



  • Once again i'm late to the party... i did not know of this clever mod til some hours ago today, alerted by @BoneTone's https://forum.vivaldi.net/post/400345. The timing is rather exquisite, given my shock discovery this evening that chromium 86 has broken my hitherto successful tabs backups, per my https://forum.vivaldi.net/post/400417.

    I've now added this bit of further @LonM genius-work to both Stable's & Snapshot's custom.js & verified that in both it's working a treat. I have noticed however one little thing to quibble about.

    It assigns a timestamp that is UTC, not local time. Inspecting the few other pics of sessions already posted in this thread let me confirm it's not just unique to me -- others' also have what seems to be UTC.

    Is there a simple code tweak possible pls to use local rather than UTC for the assigned timestamps?



  • @Steffie one thing to consider, I suspect that a simple change to just pull the local system time for naming the sessions will likely lead to some funky behavior twice a year in most locales. Right around this time of year there can be hiccups as some newer sessions appear to be older than existing sessions after the clocks roll back to Standard Time. UTC isn't affected by Daylight Saving clock changes so it avoids this problem. In the Spring, some sessions will appear older than they actually are, and be deleted too soon.

    Addressing these issues takes a lot more code than is required for just using UTC. I can understand the desire to want to see local time, but there should be a warning included next to the option about this possibility.


  • Moderator

    @Steffie That should be doable, but there are some concerns I have which may delay a fix:

    • The session name is also the filename, so lots of care needs to be taken that changing the format won't produce filenames that are invalid on certain OSes, or clash with vivaldi's idea of what a valid filename is
    • As @BoneTone says, changing how data is stored when dealing with timezones is very tricky. The name and timestamp should be separate, but i will need to investigate further.

    Apologies to all people in this thread if my anglo/UTC0-centric development has caused issues, I will try and have a look at how this could be corrected πŸ™‚


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.