Launch with specific workspace or session
-
Re: Launch vivaldi with specific session/workspace
Putting this in feature requests as this seems like the most fitting category.
It would be great if we could start vivaldi with a specific workspace pre-selected. It could be via command-line or uri for starters. F-e: vivaldi://workspaces/my-workspace
-
In case you are interested, I have a workaround for this.
let's say you have two workspaces, "astronomy" and "cats".
first you need to create two html files. put them in ~/.config/vivaldi and name them
workspace-astronomy.html
andworkspace-cats.html
.in each html file insert this code:
<!DOCTYPE html> <html> <head> <script> window.onload = function() { setTimeout(function() { window.close(); }, 100); } </script> </head> </html>
This javascript code will close the tab/html file immediately after 100 milliseconds.
Now open vivaldi and go to the rules. here you set two rules:
- if the url contains workspace-astronomy -> open in workspace astronomy
- if the url contrain workspace-cats -> open in workspace cats
Here you can see that only the pattern in the filename is important for us, therefore the above js code will close the tab, since it only functioned as a placeholder.
okay, so the final step is to execute the correct command. you can test it first from command line. let say we want to open the cats workspace:
export "VIVA=/home/your-user-name/.config/vivaldi" && vivaldi --user-data-dir=$VIVA --url $VIVA/workspace-cats.html
that's pretty much it. if everything works fine than i would suggest to create a fancy .desktop file either one per workspace, or one only one .desktop file with various right-click menu options for the different workspaces.